From cc7f6f0362b8f1983195106f8e67bbadf5d5d4ae Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Wed, 16 Jan 2019 10:47:35 -0800 Subject: [PATCH 001/299] Initial commit from kubernetes-template-project --- .../CONTRIBUTING.md | 31 +++ .../LICENSE | 201 ++++++++++++++++++ .../OWNERS | 6 + .../OWNERS_ALIASES | 20 ++ .../README.md | 29 +++ .../RELEASE.md | 9 + .../SECURITY_CONTACTS | 14 ++ .../code-of-conduct.md | 3 + 8 files changed, 313 insertions(+) create mode 100644 container-object-storage-interface-controller/CONTRIBUTING.md create mode 100644 container-object-storage-interface-controller/LICENSE create mode 100644 container-object-storage-interface-controller/OWNERS create mode 100644 container-object-storage-interface-controller/OWNERS_ALIASES create mode 100644 container-object-storage-interface-controller/README.md create mode 100644 container-object-storage-interface-controller/RELEASE.md create mode 100644 container-object-storage-interface-controller/SECURITY_CONTACTS create mode 100644 container-object-storage-interface-controller/code-of-conduct.md diff --git a/container-object-storage-interface-controller/CONTRIBUTING.md b/container-object-storage-interface-controller/CONTRIBUTING.md new file mode 100644 index 00000000..de471151 --- /dev/null +++ b/container-object-storage-interface-controller/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/container-object-storage-interface-controller/LICENSE b/container-object-storage-interface-controller/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/container-object-storage-interface-controller/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS new file mode 100644 index 00000000..e4c79b9d --- /dev/null +++ b/container-object-storage-interface-controller/OWNERS @@ -0,0 +1,6 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: + # TODO: in your repo created from this template, you should replace the + # steering-committee with a list of project owners, see the doc linked above. + - steering-committee diff --git a/container-object-storage-interface-controller/OWNERS_ALIASES b/container-object-storage-interface-controller/OWNERS_ALIASES new file mode 100644 index 00000000..8bcd3a60 --- /dev/null +++ b/container-object-storage-interface-controller/OWNERS_ALIASES @@ -0,0 +1,20 @@ +# See the OWNERS_ALIASES docs: https://git.k8s.io/community/contributors/guide/owners.md#owners_aliases + +aliases: + # TODO: remove this alias, it will go stale in your repo, and in your repo + # you should have your own set of approvers (see OWNERS) + # in the original template repo, we must maintain this list to approve changes + # to the template itself + steering-committee: + - bgrant0607 + - brendandburns + - derekwaynecarr + - dims + - jbeda + - michelleN + - philips + - pwittrock + - sarahnovotny + - smarterclayton + - spiffxp + - timothysc diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md new file mode 100644 index 00000000..9431b7bb --- /dev/null +++ b/container-object-storage-interface-controller/README.md @@ -0,0 +1,29 @@ +# Kubernetes Template Project + +The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: + +- a `README.md` outlining the project goals, sponsoring sig, and community contact information +- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) +- a `CONTRIBUTING.md` outlining how to contribute to the project +- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code +- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content +- a `SECURITY_CONTACTS` with the contact points for the Product Security Team + to reach out to for triaging and handling of incoming issues. They must agree to abide by the + [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) + and will be removed and replaced if they violate that agreement. + +## Community, discussion, contribution, and support + +Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). + +You can reach the maintainers of this project at: + +- [Slack](http://slack.k8s.io/) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) + +### Code of conduct + +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). + +[owners]: https://git.k8s.io/community/contributors/guide/owners.md +[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE diff --git a/container-object-storage-interface-controller/RELEASE.md b/container-object-storage-interface-controller/RELEASE.md new file mode 100644 index 00000000..7274b344 --- /dev/null +++ b/container-object-storage-interface-controller/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The Kubernetes Template Project is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/container-object-storage-interface-controller/SECURITY_CONTACTS b/container-object-storage-interface-controller/SECURITY_CONTACTS new file mode 100644 index 00000000..39689175 --- /dev/null +++ b/container-object-storage-interface-controller/SECURITY_CONTACTS @@ -0,0 +1,14 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +bob +alice diff --git a/container-object-storage-interface-controller/code-of-conduct.md b/container-object-storage-interface-controller/code-of-conduct.md new file mode 100644 index 00000000..0d15c00c --- /dev/null +++ b/container-object-storage-interface-controller/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) From fea22feaa2bbc35ccca81ff42dbd4932ebc066c0 Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Wed, 16 Jan 2019 10:51:52 -0800 Subject: [PATCH 002/299] Add files from github.com/pohly/csi-build-rules --- .../README.md | 79 +- .../build.make | 1211 +++++++++++++++++ .../travis.yml | 14 + 3 files changed, 1275 insertions(+), 29 deletions(-) create mode 100644 container-object-storage-interface-controller/build.make create mode 100644 container-object-storage-interface-controller/travis.yml diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 9431b7bb..c67e9308 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -1,29 +1,50 @@ -# Kubernetes Template Project - -The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: - -- a `README.md` outlining the project goals, sponsoring sig, and community contact information -- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) -- a `CONTRIBUTING.md` outlining how to contribute to the project -- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code -- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content -- a `SECURITY_CONTACTS` with the contact points for the Product Security Team - to reach out to for triaging and handling of incoming issues. They must agree to abide by the - [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) - and will be removed and replaced if they violate that agreement. - -## Community, discussion, contribution, and support - -Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). - -You can reach the maintainers of this project at: - -- [Slack](http://slack.k8s.io/) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) - -### Code of conduct - -Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). - -[owners]: https://git.k8s.io/community/contributors/guide/owners.md -[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE +# [csi-build-rules](https://github.com/kubernetes-csi/csi-build-rules) + +These build and test rules can be shared between different Go projects +without modifications. Customization for the different projects happen +in the top-level Makefile. + +The rules include support for building and pushing Docker images, with +the following features: + - one or more command and image per project + - push canary and/or tagged release images + - automatically derive the image tag(s) from repo tags + - the source code revision is stored in a "revision" image label + - never overwrites an existing release image + +Usage +----- + +The expected repository layout is: + - `cmd/*/*.go` - source code for each command + - `cmd/*/Dockerfile` - docker file for each command or + Dockerfile in the root when only building a single command + - `Makefile` - includes `build-rules/build.make` and sets + configuration variables + - `.travis.yml` - a symlink to `build-rules/.travis.yml` + +To create a release, tag a certain revision with a name that +starts with `v`, for example `v1.0.0`, then `make push` +while that commit is checked out. + +It does not matter on which branch that revision exists, i.e. it is +possible to create releases directly from master. A release branch can +still be created for maintenance releases later if needed. + +Release branches are expected to be named `release-x.y` for releases +`x.y.z`. Building from such a branch creates `x.y-canary` +images. Building from master creates the main `canary` image. + +Sharing and updating +-------------------- + +[`git subtree`](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt) +is the recommended way of maintaining a copy of the rules inside the +`build-rules` directory of a project. This way, it is possible to make +changes also locally, test them and then push them back to the shared +repository at a later time. + +Cheat sheet: + +- `git subtree pull --prefix=build-rules https://github.com/kubernetes-csi/csi-build-rules.git master` - update local copy to latest upstream +- edit, `git commit`, `git subtree push --prefix=build-rules git@github.com:/csi-build-rules.git ` - push to a new branch before submitting a PR diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make new file mode 100644 index 00000000..460ee71c --- /dev/null +++ b/container-object-storage-interface-controller/build.make @@ -0,0 +1,1211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + csi-build-rules/build.make at master · pohly/csi-build-rules · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Skip to content +
+ + + + + + + + + +
+ +
+ +
+ +
+ + + +
+
+
+ + + + + + + + + + + +
+
+ + + + + + + + Permalink + + + + + + +
+ +
+ + +
+
+
+
+ +
+
+
+
+ +
+ + Find file + + + Copy path + +
+ +
+ + + +
+ + + c03f108 + + Jan 9, 2019 + + + +
+ +
+ + + 1 contributor + + +
+ +

Users who have contributed to this file

+
+ + + +
+
+ +
+
+ + + + +
+ +
+ +
+ + +
+ Raw + Blame + History +
+ + + + +
+ +
+ 100 lines (83 sloc) + + 3.78 KB +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
.PHONY: build-% build container-% container push-% push clean test
+
# A space-separated list of all commands in the repository, must be
# set in main Makefile of a repository.
# CMDS=
+
# This is the default. It can be overridden in the main Makefile after
# including build.make.
REGISTRY_NAME=quay.io/k8scsi
+
# Revision that gets built into each binary via the main.version
# string. Uses the `git describe` output based on the most recent
# version tag with a short revision suffix or, if nothing has been
# tagged yet, just the revision.
#
# Beware that tags may also be missing in shallow clones as done by
# some CI systems (like TravisCI, which pulls only 50 commits).
REV=$(shell git describe --long --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD)
+
# A space-separated list of image tags under which the current build is to be pushed.
# Determined dynamically.
IMAGE_TAGS=
+
# A "canary" image gets built if the current commit is the head of the remote "master" branch.
# That branch does not exist when building some other branch in TravisCI.
IMAGE_TAGS+=$(shell if [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 origin/master 2>/dev/null)" ]; then echo "canary"; fi)
+
# A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch.
# The actual suffix does not matter, only the "release-" prefix is checked.
IMAGE_TAGS+=$(shell git branch -r --points-at=HEAD | grep 'origin/release-' | grep -v -e ' -> ' | sed -e 's;.*/release-\(.*\);\1-canary;')
+
# A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit.
# --abbrev=0 suppresses long format, only showing the closest tag.
IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if [ "$$tagged" ] && [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 $$tagged)" ]; then echo $$tagged; fi)
+
# Images are named after the command contained in them.
IMAGE_NAME=$(REGISTRY_NAME)/$*
+
ifdef V
TESTARGS = -v -args -alsologtostderr -v 5
else
TESTARGS =
endif
+
build-%:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
+
container-%: build-%
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
+
push-%: container-%
set -ex; \
push_image () { \
docker tag $*:latest $(IMAGE_NAME):$$tag; \
docker push $(IMAGE_NAME):$$tag; \
}; \
for tag in $(IMAGE_TAGS); do \
if echo $$tag | grep -q -e '-canary$$'; then \
: "creating or overwriting canary image"; \
push_image; \
elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \
: "creating release image"; \
push_image; \
else \
: "release image $(IMAGE_NAME):$$tag already exists, skipping push"; \
fi; \
done
+
build: $(CMDS:%=build-%)
container: $(CMDS:%=container-%)
push: $(CMDS:%=push-%)
+
clean:
-rm -rf bin
+
test:
go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
go vet `go list ./... | grep -v vendor`
files=$$(find . -name '*.go' | grep -v './vendor'); \
if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \
echo "formatting errors:"; \
gofmt -d $$files; \
false; \
fi
+ + + +
+ +
+ + + +
+ + +
+ + +
+
+ + + +
+ +
+ +
+
+ +
+ + + + + + +
+ + + You can’t perform that action at this time. +
+ + + + + + + + + +
+ + You signed in with another tab or window. Reload to refresh your session. + You signed out in another tab or window. Reload to refresh your session. +
+ + + + + + +
+ Press h to open a hovercard with more details. +
+ +
+ + + + diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml new file mode 100644 index 00000000..a44b0017 --- /dev/null +++ b/container-object-storage-interface-controller/travis.yml @@ -0,0 +1,14 @@ +language: go +sudo: required +services: + - docker +matrix: + include: + - go: 1.11.1 +script: +- make all test +after_success: + - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io; + make push; + fi From 55b2020309e4d8110e8b020bdea64b70af01a3f9 Mon Sep 17 00:00:00 2001 From: Aaron Crickenberger Date: Wed, 16 Jan 2019 11:19:16 -0800 Subject: [PATCH 003/299] Port over information from kubernetes/org --- .../OWNERS | 11 +++++++--- .../OWNERS_ALIASES | 20 ------------------- .../RELEASE.md | 8 +------- .../SECURITY_CONTACTS | 4 ++-- 4 files changed, 11 insertions(+), 32 deletions(-) delete mode 100644 container-object-storage-interface-controller/OWNERS_ALIASES diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index e4c79b9d..6d2f474e 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -1,6 +1,11 @@ # See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md approvers: - # TODO: in your repo created from this template, you should replace the - # steering-committee with a list of project owners, see the doc linked above. - - steering-committee +- saad-ali +- msau42 +- pohly + +reviewers: +- saad-ali +- msau42 +- pohly diff --git a/container-object-storage-interface-controller/OWNERS_ALIASES b/container-object-storage-interface-controller/OWNERS_ALIASES deleted file mode 100644 index 8bcd3a60..00000000 --- a/container-object-storage-interface-controller/OWNERS_ALIASES +++ /dev/null @@ -1,20 +0,0 @@ -# See the OWNERS_ALIASES docs: https://git.k8s.io/community/contributors/guide/owners.md#owners_aliases - -aliases: - # TODO: remove this alias, it will go stale in your repo, and in your repo - # you should have your own set of approvers (see OWNERS) - # in the original template repo, we must maintain this list to approve changes - # to the template itself - steering-committee: - - bgrant0607 - - brendandburns - - derekwaynecarr - - dims - - jbeda - - michelleN - - philips - - pwittrock - - sarahnovotny - - smarterclayton - - spiffxp - - timothysc diff --git a/container-object-storage-interface-controller/RELEASE.md b/container-object-storage-interface-controller/RELEASE.md index 7274b344..491044d2 100644 --- a/container-object-storage-interface-controller/RELEASE.md +++ b/container-object-storage-interface-controller/RELEASE.md @@ -1,9 +1,3 @@ # Release Process -The Kubernetes Template Project is released on an as-needed basis. The process is as follows: - -1. An issue is proposing a new release with a changelog since the last release -1. All [OWNERS](OWNERS) must LGTM this release -1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` -1. The release issue is closed -1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` +TODO: describe the release process for this project diff --git a/container-object-storage-interface-controller/SECURITY_CONTACTS b/container-object-storage-interface-controller/SECURITY_CONTACTS index 39689175..2af1414e 100644 --- a/container-object-storage-interface-controller/SECURITY_CONTACTS +++ b/container-object-storage-interface-controller/SECURITY_CONTACTS @@ -10,5 +10,5 @@ # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE # INSTRUCTIONS AT https://kubernetes.io/security/ -bob -alice +saad-ali +msau42 From 1f3e95ce4275fae86a931a17d1a333033168ffe4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 21 Jan 2019 10:08:51 +0100 Subject: [PATCH 004/299] build.make: initial content The repo was created with an HTML version of the build.make file from https://github.com/pohly/csi-build-rules/. Here's the raw file. --- .../build.make | 1310 ++--------------- 1 file changed, 99 insertions(+), 1211 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 460ee71c..42146483 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -1,1211 +1,99 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - csi-build-rules/build.make at master · pohly/csi-build-rules · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Skip to content -
- - - - - - - - - -
- -
- -
- -
- - - -
-
-
- - - - - - - - - - - -
-
- - - - - - - - Permalink - - - - - - -
- -
- - -
-
-
-
- -
-
-
-
- -
- - Find file - - - Copy path - -
- -
- - - -
- - - c03f108 - - Jan 9, 2019 - - - -
- -
- - - 1 contributor - - -
- -

Users who have contributed to this file

-
- - - -
-
- -
-
- - - - -
- -
- -
- - -
- Raw - Blame - History -
- - - - -
- -
- 100 lines (83 sloc) - - 3.78 KB -
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
.PHONY: build-% build container-% container push-% push clean test
-
# A space-separated list of all commands in the repository, must be
# set in main Makefile of a repository.
# CMDS=
-
# This is the default. It can be overridden in the main Makefile after
# including build.make.
REGISTRY_NAME=quay.io/k8scsi
-
# Revision that gets built into each binary via the main.version
# string. Uses the `git describe` output based on the most recent
# version tag with a short revision suffix or, if nothing has been
# tagged yet, just the revision.
#
# Beware that tags may also be missing in shallow clones as done by
# some CI systems (like TravisCI, which pulls only 50 commits).
REV=$(shell git describe --long --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD)
-
# A space-separated list of image tags under which the current build is to be pushed.
# Determined dynamically.
IMAGE_TAGS=
-
# A "canary" image gets built if the current commit is the head of the remote "master" branch.
# That branch does not exist when building some other branch in TravisCI.
IMAGE_TAGS+=$(shell if [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 origin/master 2>/dev/null)" ]; then echo "canary"; fi)
-
# A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch.
# The actual suffix does not matter, only the "release-" prefix is checked.
IMAGE_TAGS+=$(shell git branch -r --points-at=HEAD | grep 'origin/release-' | grep -v -e ' -> ' | sed -e 's;.*/release-\(.*\);\1-canary;')
-
# A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit.
# --abbrev=0 suppresses long format, only showing the closest tag.
IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if [ "$$tagged" ] && [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 $$tagged)" ]; then echo $$tagged; fi)
-
# Images are named after the command contained in them.
IMAGE_NAME=$(REGISTRY_NAME)/$*
-
ifdef V
TESTARGS = -v -args -alsologtostderr -v 5
else
TESTARGS =
endif
-
build-%:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$*
-
container-%: build-%
docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) .
-
push-%: container-%
set -ex; \
push_image () { \
docker tag $*:latest $(IMAGE_NAME):$$tag; \
docker push $(IMAGE_NAME):$$tag; \
}; \
for tag in $(IMAGE_TAGS); do \
if echo $$tag | grep -q -e '-canary$$'; then \
: "creating or overwriting canary image"; \
push_image; \
elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \
: "creating release image"; \
push_image; \
else \
: "release image $(IMAGE_NAME):$$tag already exists, skipping push"; \
fi; \
done
-
build: $(CMDS:%=build-%)
container: $(CMDS:%=container-%)
push: $(CMDS:%=push-%)
-
clean:
-rm -rf bin
-
test:
go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
go vet `go list ./... | grep -v vendor`
files=$$(find . -name '*.go' | grep -v './vendor'); \
if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \
echo "formatting errors:"; \
gofmt -d $$files; \
false; \
fi
- - - -
- -
- - - -
- - -
- - -
-
- - - -
- -
- -
-
- -
- - - - - - -
- - - You can’t perform that action at this time. -
- - - - - - - - - -
- - You signed in with another tab or window. Reload to refresh your session. - You signed out in another tab or window. Reload to refresh your session. -
- - - - - - -
- Press h to open a hovercard with more details. -
- -
- - - - +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +.PHONY: build-% build container-% container push-% push clean test + +# A space-separated list of all commands in the repository, must be +# set in main Makefile of a repository. +# CMDS= + +# This is the default. It can be overridden in the main Makefile after +# including build.make. +REGISTRY_NAME=quay.io/k8scsi + +# Revision that gets built into each binary via the main.version +# string. Uses the `git describe` output based on the most recent +# version tag with a short revision suffix or, if nothing has been +# tagged yet, just the revision. +# +# Beware that tags may also be missing in shallow clones as done by +# some CI systems (like TravisCI, which pulls only 50 commits). +REV=$(shell git describe --long --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD) + +# A space-separated list of image tags under which the current build is to be pushed. +# Determined dynamically. +IMAGE_TAGS= + +# A "canary" image gets built if the current commit is the head of the remote "master" branch. +# That branch does not exist when building some other branch in TravisCI. +IMAGE_TAGS+=$(shell if [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 origin/master 2>/dev/null)" ]; then echo "canary"; fi) + +# A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch. +# The actual suffix does not matter, only the "release-" prefix is checked. +IMAGE_TAGS+=$(shell git branch -r --points-at=HEAD | grep 'origin/release-' | grep -v -e ' -> ' | sed -e 's;.*/release-\(.*\);\1-canary;') + +# A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit. +# --abbrev=0 suppresses long format, only showing the closest tag. +IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if [ "$$tagged" ] && [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 $$tagged)" ]; then echo $$tagged; fi) + +# Images are named after the command contained in them. +IMAGE_NAME=$(REGISTRY_NAME)/$* + +ifdef V +TESTARGS = -v -args -alsologtostderr -v 5 +else +TESTARGS = +endif + +build-%: + mkdir -p bin + CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* + +container-%: build-% + docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . + +push-%: container-% + set -ex; \ + push_image () { \ + docker tag $*:latest $(IMAGE_NAME):$$tag; \ + docker push $(IMAGE_NAME):$$tag; \ + }; \ + for tag in $(IMAGE_TAGS); do \ + if echo $$tag | grep -q -e '-canary$$'; then \ + : "creating or overwriting canary image"; \ + push_image; \ + elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \ + : "creating release image"; \ + push_image; \ + else \ + : "release image $(IMAGE_NAME):$$tag already exists, skipping push"; \ + fi; \ + done + +build: $(CMDS:%=build-%) +container: $(CMDS:%=container-%) +push: $(CMDS:%=push-%) + +clean: + -rm -rf bin + +test: + go test `go list ./... | grep -v 'vendor'` $(TESTARGS) + go vet `go list ./... | grep -v vendor` + files=$$(find . -name '*.go' | grep -v './vendor'); \ + if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \ + echo "formatting errors:"; \ + gofmt -d $$files; \ + false; \ + fi From dfdc97c32f6f52a5d320bc5525a8a7f008e2377a Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 21 Jan 2019 10:18:56 +0100 Subject: [PATCH 005/299] RELEASE.md: clarify release process It's worth calling out explicitly that only the master branch is maintained. --- container-object-storage-interface-controller/RELEASE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/RELEASE.md b/container-object-storage-interface-controller/RELEASE.md index 491044d2..a0fd815b 100644 --- a/container-object-storage-interface-controller/RELEASE.md +++ b/container-object-storage-interface-controller/RELEASE.md @@ -1,3 +1,5 @@ # Release Process -TODO: describe the release process for this project +No tagged releases are planned at this point. The intention is to keep +the master branch in a state such that it can be used for all +supported branches in downstream repos which use these files. From 4b7cdfa8eab5cd939bed4f5f55c951a08f2f291c Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 21 Jan 2019 10:26:11 +0100 Subject: [PATCH 006/299] README.md: update repo name, add initial setup step The actual repository was not named like the prototype repo. --- .../README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index c67e9308..286be88d 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -1,4 +1,4 @@ -# [csi-build-rules](https://github.com/kubernetes-csi/csi-build-rules) +# [csi-release-tools](https://github.com/kubernetes-csi/csi-release-tools) These build and test rules can be shared between different Go projects without modifications. Customization for the different projects happen @@ -19,9 +19,9 @@ The expected repository layout is: - `cmd/*/*.go` - source code for each command - `cmd/*/Dockerfile` - docker file for each command or Dockerfile in the root when only building a single command - - `Makefile` - includes `build-rules/build.make` and sets + - `Makefile` - includes `release-tools/build.make` and sets configuration variables - - `.travis.yml` - a symlink to `build-rules/.travis.yml` + - `.travis.yml` - a symlink to `release-tools/.travis.yml` To create a release, tag a certain revision with a name that starts with `v`, for example `v1.0.0`, then `make push` @@ -40,11 +40,12 @@ Sharing and updating [`git subtree`](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt) is the recommended way of maintaining a copy of the rules inside the -`build-rules` directory of a project. This way, it is possible to make +`release-tools` directory of a project. This way, it is possible to make changes also locally, test them and then push them back to the shared repository at a later time. Cheat sheet: -- `git subtree pull --prefix=build-rules https://github.com/kubernetes-csi/csi-build-rules.git master` - update local copy to latest upstream -- edit, `git commit`, `git subtree push --prefix=build-rules git@github.com:/csi-build-rules.git ` - push to a new branch before submitting a PR +- `git subtree add --prefix=release-tools https://github.com/pohly/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once) +- `git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes) +- edit, `git commit`, `git subtree push --prefix=release-tools git@github.com:/csi-release-tools.git ` - push to a new branch before submitting a PR From aef352cb21d4648c722ec50642ab9d62e0b90930 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 22 Jan 2019 10:28:11 +0100 Subject: [PATCH 007/299] README.md: fix repo URL for initial setup Copy-and-paste error from the time when the kubernetes-csi/csi-release-tools repo didn't have the code... --- container-object-storage-interface-controller/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 286be88d..56d2248c 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -46,6 +46,6 @@ repository at a later time. Cheat sheet: -- `git subtree add --prefix=release-tools https://github.com/pohly/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once) +- `git subtree add --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once) - `git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes) - edit, `git commit`, `git subtree push --prefix=release-tools git@github.com:/csi-release-tools.git ` - push to a new branch before submitting a PR From 181f902df8125d8c390118e166055f0f5f4a4b1b Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 23 Jan 2019 14:41:26 +0100 Subject: [PATCH 008/299] verify-subtree.sh: ensure that there are no local commits The goal is to enforce that changes get merged upstream first and only get into the local repo via a normal "git subtree merge". --- .../verify-subtree.sh | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 container-object-storage-interface-controller/verify-subtree.sh diff --git a/container-object-storage-interface-controller/verify-subtree.sh b/container-object-storage-interface-controller/verify-subtree.sh new file mode 100755 index 00000000..ce8375fc --- /dev/null +++ b/container-object-storage-interface-controller/verify-subtree.sh @@ -0,0 +1,41 @@ +#! /bin/sh -e +# +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script verifies that the content of a directory managed +# by "git subtree" has not been modified locally. It does that +# by looking for commits that modify the files with the +# subtree prefix (aka directory) while ignoring merge +# commits. Merge commits are where "git subtree" pulls the +# upstream files into the directory. +# +# Theoretically a developer can subvert this check by modifying files +# in a merge commit, but in practice that shouldn't happen. + +DIR="$1" +if [ ! "$DIR" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +REV=$(git log -n1 --format=format:%H --no-merges -- "$DIR") +if [ "$REV" ]; then + echo "Directory '$DIR' contains non-upstream changes:" + echo + git log --no-merges -- "$DIR" + exit 1 +else + echo "$DIR is a clean copy of upstream." +fi From 7315a97b47473fceea8d4eeb602a4e0ac9afd535 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 23 Jan 2019 14:49:07 +0100 Subject: [PATCH 009/299] test: split up into individual targets, run all "make test" used to abort after the first test failure. That was partly intentional: if the simple tests already fail (for example, because of a syntax error), then there is no point in continuing to test. However, it also makes it harder to find all errors in a CI system when the errors are unrelated (first error shows up, gets fixed, next error shows up, etc.). Now "make test" still aborts early, but "make -k test" is used in the CI and will run all individual tests because they are split up into different targets. --- .../build.make | 15 +++++++++++++++ .../travis.yml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 42146483..4818b512 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -89,8 +89,23 @@ clean: -rm -rf bin test: + +.PHONY: test-go +test: test-go +test-go: + @ echo; echo $@ go test `go list ./... | grep -v 'vendor'` $(TESTARGS) + +.PHONY: test-vet +test: test-vet +test-vet: + @ echo; echo $@ go vet `go list ./... | grep -v vendor` + +.PHONY: test-fmt +test: test-fmt +test-fmt: + @ echo; echo $@ files=$$(find . -name '*.go' | grep -v './vendor'); \ if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \ echo "formatting errors:"; \ diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index a44b0017..b5a360af 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -6,7 +6,7 @@ matrix: include: - go: 1.11.1 script: -- make all test +- make -k all test after_success: - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io; From 6c581d6e60706021dc415d867cae92c9c12c3abc Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 23 Jan 2019 14:52:09 +0100 Subject: [PATCH 010/299] test: verify that 'release-tools' subtree is clean We don't want to allow local modifications in the subtree. Everything should go to the csi-release-tools repo first. --- container-object-storage-interface-controller/build.make | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 4818b512..f07f25e8 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -112,3 +112,9 @@ test-fmt: gofmt -d $$files; \ false; \ fi + +.PHONY: test-subtree +test: test-subtree +test-subtree: + @ echo; echo $@ + ./release-tools/verify-subtree.sh release-tools From b58e54398c3d6de40977b1c0cb3ec89e33b76263 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 24 Jan 2019 16:42:23 +0100 Subject: [PATCH 011/299] build.make: clarify usage of "make V=1" This may or may not work, depending on which packages have tests and whether they contain glog. --- container-object-storage-interface-controller/build.make | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index f07f25e8..010dcb94 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -51,6 +51,7 @@ IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if IMAGE_NAME=$(REGISTRY_NAME)/$* ifdef V +# Adding "-alsologtostderr" assumes that all test binaries contain glog. This is not guaranteed. TESTARGS = -v -args -alsologtostderr -v 5 else TESTARGS = From df330dd71332afba23889cd145d1af01799953fb Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 24 Jan 2019 16:43:24 +0100 Subject: [PATCH 012/299] build.make: support suppressing checks Individual repos may have to filter out certain packages from testing. For example, in csi-test the cmd/csi-sanity directory contains a special test that depends on additional parameters that set the CSI driver to test against. --- container-object-storage-interface-controller/build.make | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 010dcb94..dfc405e0 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -57,6 +57,9 @@ else TESTARGS = endif +# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables +# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. + build-%: mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* @@ -95,19 +98,19 @@ test: test: test-go test-go: @ echo; echo $@ - go test `go list ./... | grep -v 'vendor'` $(TESTARGS) + go test `go list ./... | grep -v 'vendor' $(TEST_GO_FILTER_CMD)` $(TESTARGS) .PHONY: test-vet test: test-vet test-vet: @ echo; echo $@ - go vet `go list ./... | grep -v vendor` + go vet `go list ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` .PHONY: test-fmt test: test-fmt test-fmt: @ echo; echo $@ - files=$$(find . -name '*.go' | grep -v './vendor'); \ + files=$$(find . -name '*.go' | grep -v './vendor' $(TEST_FMT_FILTER_CMD)); \ if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \ echo "formatting errors:"; \ gofmt -d $$files; \ From 24e609b5c346068f9d81d8adcad989318775d84d Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 25 Jan 2019 11:48:59 +0100 Subject: [PATCH 013/299] build.make: fix pushing of "canary" image from master branch After merging into external-attacher, the next Travis CI run did not push the "canary" image because the check for "canary" only covered the case where "-canary" is used as suffix (https://travis-ci.org/kubernetes-csi/external-attacher/builds/484095261). --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index f07f25e8..a6a8916e 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -70,7 +70,7 @@ push-%: container-% docker push $(IMAGE_NAME):$$tag; \ }; \ for tag in $(IMAGE_TAGS); do \ - if echo $$tag | grep -q -e '-canary$$'; then \ + if [ "$$tag" = "canary" ] || echo "$$tag" | grep -q -e '-canary$$'; then \ : "creating or overwriting canary image"; \ push_image; \ elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \ From b69a86ed3e7029941cb3e4d3a32187f4888680ab Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 25 Jan 2019 11:53:36 +0100 Subject: [PATCH 014/299] build.make: more readable "make test" output The introduction for each individual test looked like an actual command: test-subtree ./release-tools/verify-subtree.sh release-tools Directory 'release-tools' contains non-upstream changes: ... It's better to make it look like a shell comment and increase its visibility with a longer prefix: ### test-subtree: ./release-tools/verify-subtree.sh release-tools ... --- container-object-storage-interface-controller/build.make | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index dfc405e0..4296ff47 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -97,19 +97,19 @@ test: .PHONY: test-go test: test-go test-go: - @ echo; echo $@ + @ echo; echo "### $@:" go test `go list ./... | grep -v 'vendor' $(TEST_GO_FILTER_CMD)` $(TESTARGS) .PHONY: test-vet test: test-vet test-vet: - @ echo; echo $@ + @ echo; echo "### $@:" go vet `go list ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` .PHONY: test-fmt test: test-fmt test-fmt: - @ echo; echo $@ + @ echo; echo "### $@:" files=$$(find . -name '*.go' | grep -v './vendor' $(TEST_FMT_FILTER_CMD)); \ if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \ echo "formatting errors:"; \ @@ -120,5 +120,5 @@ test-fmt: .PHONY: test-subtree test: test-subtree test-subtree: - @ echo; echo $@ + @ echo; echo "### $@:" ./release-tools/verify-subtree.sh release-tools From 9423e5a38638753c2990c763bf1e34c7de2589ae Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 6 Mar 2019 17:23:07 +0100 Subject: [PATCH 015/299] verify-subtree.sh: relax check and ignore old content If for whatever reasons a repo already had a `release-tools` directory before doing a clean import of it with `git subtree`, the check used to fail because it found those old commits. This can be fixed by telling `git log` to stop when the directory disappears from the repo. There has to be a commit with removes the old content, because otherwise `git subtree add` doesn't work. Fixes: https://github.com/kubernetes-csi/external-resizer/issues/21 --- container-object-storage-interface-controller/verify-subtree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/verify-subtree.sh b/container-object-storage-interface-controller/verify-subtree.sh index ce8375fc..f04a9fa2 100755 --- a/container-object-storage-interface-controller/verify-subtree.sh +++ b/container-object-storage-interface-controller/verify-subtree.sh @@ -30,7 +30,7 @@ if [ ! "$DIR" ]; then exit 1 fi -REV=$(git log -n1 --format=format:%H --no-merges -- "$DIR") +REV=$(git log -n1 --remove-empty --format=format:%H --no-merges -- "$DIR") if [ "$REV" ]; then echo "Directory '$DIR' contains non-upstream changes:" echo From 98d115544ed1012482442f6bacf596b0371efcf8 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 15 Mar 2019 11:08:53 +0100 Subject: [PATCH 016/299] build.make: avoid unit-testing E2E test suite In repos that have a test/e2e, that test suite should be run separately because it depends on a running cluster. --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 8ca0b2c2..6ea32795 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -98,7 +98,7 @@ test: test: test-go test-go: @ echo; echo "### $@:" - go test `go list ./... | grep -v 'vendor' $(TEST_GO_FILTER_CMD)` $(TESTARGS) + go test `go list ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS) .PHONY: test-vet test: test-vet From 71c44c3ee0aa5ea7233ecc749a418fe4ace864be Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 15 Mar 2019 11:55:06 +0100 Subject: [PATCH 017/299] verify-shellcheck.sh: import from Kubernetes This is an unmodified copy of kubernetes/hack/verify-shellcheck.sh revision d5a3db003916b1d33b503ccd2e4897e094d8af77. --- .../util.sh | 839 ++++++++++++++++++ .../verify-shellcheck.sh | 187 ++++ 2 files changed, 1026 insertions(+) create mode 100755 container-object-storage-interface-controller/util.sh create mode 100755 container-object-storage-interface-controller/verify-shellcheck.sh diff --git a/container-object-storage-interface-controller/util.sh b/container-object-storage-interface-controller/util.sh new file mode 100755 index 00000000..31ce9fc4 --- /dev/null +++ b/container-object-storage-interface-controller/util.sh @@ -0,0 +1,839 @@ +#!/usr/bin/env bash + +# Copyright 2014 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function kube::util::sourced_variable { + # Call this function to tell shellcheck that a variable is supposed to + # be used from other calling context. This helps quiet an "unused + # variable" warning from shellcheck and also document your code. + true +} + +kube::util::sortable_date() { + date "+%Y%m%d-%H%M%S" +} + +# arguments: target, item1, item2, item3, ... +# returns 0 if target is in the given items, 1 otherwise. +kube::util::array_contains() { + local search="$1" + local element + shift + for element; do + if [[ "${element}" == "${search}" ]]; then + return 0 + fi + done + return 1 +} + +kube::util::wait_for_url() { + local url=$1 + local prefix=${2:-} + local wait=${3:-1} + local times=${4:-30} + local maxtime=${5:-1} + + command -v curl >/dev/null || { + kube::log::usage "curl must be installed" + exit 1 + } + + local i + for i in $(seq 1 "${times}"); do + local out + if out=$(curl --max-time "${maxtime}" -gkfs "${url}" 2>/dev/null); then + kube::log::status "On try ${i}, ${prefix}: ${out}" + return 0 + fi + sleep "${wait}" + done + kube::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each" + return 1 +} + +# Example: kube::util::trap_add 'echo "in trap DEBUG"' DEBUG +# See: http://stackoverflow.com/questions/3338030/multiple-bash-traps-for-the-same-signal +kube::util::trap_add() { + local trap_add_cmd + trap_add_cmd=$1 + shift + + for trap_add_name in "$@"; do + local existing_cmd + local new_cmd + + # Grab the currently defined trap commands for this trap + existing_cmd=$(trap -p "${trap_add_name}" | awk -F"'" '{print $2}') + + if [[ -z "${existing_cmd}" ]]; then + new_cmd="${trap_add_cmd}" + else + new_cmd="${trap_add_cmd};${existing_cmd}" + fi + + # Assign the test. Disable the shellcheck warning telling that trap + # commands should be single quoted to avoid evaluating them at this + # point instead evaluating them at run time. The logic of adding new + # commands to a single trap requires them to be evaluated right away. + # shellcheck disable=SC2064 + trap "${new_cmd}" "${trap_add_name}" + done +} + +# Opposite of kube::util::ensure-temp-dir() +kube::util::cleanup-temp-dir() { + rm -rf "${KUBE_TEMP}" +} + +# Create a temp dir that'll be deleted at the end of this bash session. +# +# Vars set: +# KUBE_TEMP +kube::util::ensure-temp-dir() { + if [[ -z ${KUBE_TEMP-} ]]; then + KUBE_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t kubernetes.XXXXXX) + kube::util::trap_add kube::util::cleanup-temp-dir EXIT + fi +} + +kube::util::host_os() { + local host_os + case "$(uname -s)" in + Darwin) + host_os=darwin + ;; + Linux) + host_os=linux + ;; + *) + kube::log::error "Unsupported host OS. Must be Linux or Mac OS X." + exit 1 + ;; + esac + echo "${host_os}" +} + +kube::util::host_arch() { + local host_arch + case "$(uname -m)" in + x86_64*) + host_arch=amd64 + ;; + i?86_64*) + host_arch=amd64 + ;; + amd64*) + host_arch=amd64 + ;; + aarch64*) + host_arch=arm64 + ;; + arm64*) + host_arch=arm64 + ;; + arm*) + host_arch=arm + ;; + i?86*) + host_arch=x86 + ;; + s390x*) + host_arch=s390x + ;; + ppc64le*) + host_arch=ppc64le + ;; + *) + kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." + exit 1 + ;; + esac + echo "${host_arch}" +} + +# This figures out the host platform without relying on golang. We need this as +# we don't want a golang install to be a prerequisite to building yet we need +# this info to figure out where the final binaries are placed. +kube::util::host_platform() { + echo "$(kube::util::host_os)/$(kube::util::host_arch)" +} + +kube::util::find-binary-for-platform() { + local -r lookfor="$1" + local -r platform="$2" + local locations=( + "${KUBE_ROOT}/_output/bin/${lookfor}" + "${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}" + "${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}" + "${KUBE_ROOT}/platforms/${platform}/${lookfor}" + ) + # Also search for binary in bazel build tree. + # The bazel go rules place some binaries in subtrees like + # "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure + # the platform name is matched in the path. + while IFS=$'\n' read -r location; do + locations+=("$location"); + done < <(find "${KUBE_ROOT}/bazel-bin/" -type f -executable \ + \( -path "*/${platform/\//_}*/${lookfor}" -o -path "*/${lookfor}" \) 2>/dev/null || true) + + # List most recently-updated location. + local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) + echo -n "${bin}" +} + +kube::util::find-binary() { + kube::util::find-binary-for-platform "$1" "$(kube::util::host_platform)" +} + +# Run all known doc generators (today gendocs and genman for kubectl) +# $1 is the directory to put those generated documents +kube::util::gen-docs() { + local dest="$1" + + # Find binary + gendocs=$(kube::util::find-binary "gendocs") + genkubedocs=$(kube::util::find-binary "genkubedocs") + genman=$(kube::util::find-binary "genman") + genyaml=$(kube::util::find-binary "genyaml") + genfeddocs=$(kube::util::find-binary "genfeddocs") + + # TODO: If ${genfeddocs} is not used from anywhere (it isn't used at + # least from k/k tree), remove it completely. + kube::util::sourced_variable "${genfeddocs}" + + mkdir -p "${dest}/docs/user-guide/kubectl/" + "${gendocs}" "${dest}/docs/user-guide/kubectl/" + mkdir -p "${dest}/docs/admin/" + "${genkubedocs}" "${dest}/docs/admin/" "kube-apiserver" + "${genkubedocs}" "${dest}/docs/admin/" "kube-controller-manager" + "${genkubedocs}" "${dest}/docs/admin/" "cloud-controller-manager" + "${genkubedocs}" "${dest}/docs/admin/" "kube-proxy" + "${genkubedocs}" "${dest}/docs/admin/" "kube-scheduler" + "${genkubedocs}" "${dest}/docs/admin/" "kubelet" + "${genkubedocs}" "${dest}/docs/admin/" "kubeadm" + + mkdir -p "${dest}/docs/man/man1/" + "${genman}" "${dest}/docs/man/man1/" "kube-apiserver" + "${genman}" "${dest}/docs/man/man1/" "kube-controller-manager" + "${genman}" "${dest}/docs/man/man1/" "cloud-controller-manager" + "${genman}" "${dest}/docs/man/man1/" "kube-proxy" + "${genman}" "${dest}/docs/man/man1/" "kube-scheduler" + "${genman}" "${dest}/docs/man/man1/" "kubelet" + "${genman}" "${dest}/docs/man/man1/" "kubectl" + "${genman}" "${dest}/docs/man/man1/" "kubeadm" + + mkdir -p "${dest}/docs/yaml/kubectl/" + "${genyaml}" "${dest}/docs/yaml/kubectl/" + + # create the list of generated files + pushd "${dest}" > /dev/null || return 1 + touch docs/.generated_docs + find . -type f | cut -sd / -f 2- | LC_ALL=C sort > docs/.generated_docs + popd > /dev/null || return 1 +} + +# Removes previously generated docs-- we don't want to check them in. $KUBE_ROOT +# must be set. +kube::util::remove-gen-docs() { + if [ -e "${KUBE_ROOT}/docs/.generated_docs" ]; then + # remove all of the old docs; we don't want to check them in. + while read -r file; do + rm "${KUBE_ROOT}/${file}" 2>/dev/null || true + done <"${KUBE_ROOT}/docs/.generated_docs" + # The docs/.generated_docs file lists itself, so we don't need to explicitly + # delete it. + fi +} + +# Takes a group/version and returns the path to its location on disk, sans +# "pkg". E.g.: +# * default behavior: extensions/v1beta1 -> apis/extensions/v1beta1 +# * default behavior for only a group: experimental -> apis/experimental +# * Special handling for empty group: v1 -> api/v1, unversioned -> api/unversioned +# * Special handling for groups suffixed with ".k8s.io": foo.k8s.io/v1 -> apis/foo/v1 +# * Very special handling for when both group and version are "": / -> api +kube::util::group-version-to-pkg-path() { + local group_version="$1" + + while IFS=$'\n' read -r api; do + if [[ "${api}" = "${group_version/.*k8s.io/}" ]]; then + echo "vendor/k8s.io/api/${group_version/.*k8s.io/}" + return + fi + done < <(cd "${KUBE_ROOT}/staging/src/k8s.io/api" && find . -name types.go -exec dirname {} \; | sed "s|\./||g" | sort) + + # "v1" is the API GroupVersion + if [[ "${group_version}" == "v1" ]]; then + echo "vendor/k8s.io/api/core/v1" + return + fi + + # Special cases first. + # TODO(lavalamp): Simplify this by moving pkg/api/v1 and splitting pkg/api, + # moving the results to pkg/apis/api. + case "${group_version}" in + # both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API. + __internal) + echo "pkg/apis/core" + ;; + meta/v1) + echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1" + ;; + meta/v1beta1) + echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1" + ;; + *.k8s.io) + echo "pkg/apis/${group_version%.*k8s.io}" + ;; + *.k8s.io/*) + echo "pkg/apis/${group_version/.*k8s.io/}" + ;; + *) + echo "pkg/apis/${group_version%__internal}" + ;; + esac +} + +# Takes a group/version and returns the swagger-spec file name. +# default behavior: extensions/v1beta1 -> extensions_v1beta1 +# special case for v1: v1 -> v1 +kube::util::gv-to-swagger-name() { + local group_version="$1" + case "${group_version}" in + v1) + echo "v1" + ;; + *) + echo "${group_version%/*}_${group_version#*/}" + ;; + esac +} + +# Returns the name of the upstream remote repository name for the local git +# repo, e.g. "upstream" or "origin". +kube::util::git_upstream_remote_name() { + git remote -v | grep fetch |\ + grep -E 'github.com[/:]kubernetes/kubernetes|k8s.io/kubernetes' |\ + head -n 1 | awk '{print $1}' +} + +# Ensures the current directory is a git tree for doing things like restoring or +# validating godeps +kube::util::create-fake-git-tree() { + local -r target_dir=${1:-$(pwd)} + + pushd "${target_dir}" >/dev/null || return 1 + git init >/dev/null + git config --local user.email "nobody@k8s.io" + git config --local user.name "$0" + git add . >/dev/null + git commit -q -m "Snapshot" >/dev/null + if (( ${KUBE_VERBOSE:-5} >= 6 )); then + kube::log::status "${target_dir} is now a git tree." + fi + popd >/dev/null || return 1 +} + +# Checks whether godep restore was run in the current GOPATH, i.e. that all referenced repos exist +# and are checked out to the referenced rev. +kube::util::godep_restored() { + local -r godeps_json=${1:-Godeps/Godeps.json} + local -r gopath=${2:-${GOPATH%:*}} + + kube::util::require-jq + + local root + local old_rev="" + while read -r path rev; do + rev="${rev//[\'\"]}" # remove quotes which are around revs sometimes + + if [[ "${rev}" == "${old_rev}" ]] && [[ "${path}" == "${root}"* ]]; then + # avoid checking the same git/hg root again + continue + fi + + root="${path}" + while [ "${root}" != "." ] && [ ! -d "${gopath}/src/${root}/.git" ] && [ ! -d "${gopath}/src/${root}/.hg" ]; do + root=$(dirname "${root}") + done + if [ "${root}" == "." ]; then + echo "No checkout of ${path} found in GOPATH \"${gopath}\"." 1>&2 + return 1 + fi + local head + if [ -d "${gopath}/src/${root}/.git" ]; then + head="$(cd "${gopath}/src/${root}" && git rev-parse HEAD)" + else + head="$(cd "${gopath}/src/${root}" && hg parent --template '{node}')" + fi + if [ "${head}" != "${rev}" ]; then + echo "Unexpected HEAD '${head}' at ${gopath}/src/${root}, expected '${rev}'." 1>&2 + return 1 + fi + old_rev="${rev}" + done < <(jq '.Deps|.[]|.ImportPath + " " + .Rev' -r < "${godeps_json}") + return 0 +} + +# Exits script if working directory is dirty. If it's run interactively in the terminal +# the user can commit changes in a second terminal. This script will wait. +kube::util::ensure_clean_working_dir() { + while ! git diff HEAD --exit-code &>/dev/null; do + echo -e "\nUnexpected dirty working directory:\n" + if tty -s; then + git status -s + else + git diff -a # be more verbose in log files without tty + exit 1 + fi | sed 's/^/ /' + echo -e "\nCommit your changes in another terminal and then continue here by pressing enter." + read -r + done 1>&2 +} + +# Ensure that the given godep version is installed and in the path. Almost +# nobody should use any version but the default. +# +# Sets: +# KUBE_GODEP: The path to the godep binary +# +kube::util::ensure_godep_version() { + local godep_target_version=${1:-"v80-k8s-r1"} # this version is known to work + + # If KUBE_GODEP is already set, and it's the right version, then use it. + if [[ -n "${KUBE_GODEP:-}" && "$(${KUBE_GODEP:?} version 2>/dev/null)" == *"godep ${godep_target_version}"* ]]; then + kube::log::status "Using ${KUBE_GODEP}" + return + fi + + # Otherwise, install forked godep + kube::log::status "Installing godep version ${godep_target_version}" + GOBIN="${KUBE_OUTPUT_BINPATH}" go install k8s.io/kubernetes/third_party/forked/godep + export KUBE_GODEP="${KUBE_OUTPUT_BINPATH}/godep" + kube::log::status "Installed ${KUBE_GODEP}" + + # Verify that the installed godep from fork is what we expect + if [[ "$(${KUBE_GODEP:?} version 2>/dev/null)" != *"godep ${godep_target_version}"* ]]; then + kube::log::error "Expected godep ${godep_target_version} from ${KUBE_GODEP}, got $(${KUBE_GODEP:?} version)" + return 1 + fi +} + +# Ensure that none of the staging repos is checked out in the GOPATH because this +# easily confused godep. +kube::util::ensure_no_staging_repos_in_gopath() { + kube::util::ensure_single_dir_gopath + local error=0 + for repo_file in "${KUBE_ROOT}"/staging/src/k8s.io/*; do + if [[ ! -d "${repo_file}" ]]; then + # not a directory or there were no files + continue; + fi + repo="$(basename "${repo_file}")" + if [ -e "${GOPATH}/src/k8s.io/${repo}" ]; then + echo "k8s.io/${repo} exists in GOPATH. Remove before running godep-save.sh." 1>&2 + error=1 + fi + done + if [ "${error}" = "1" ]; then + exit 1 + fi +} + +# Checks that the GOPATH is simple, i.e. consists only of one directory, not multiple. +kube::util::ensure_single_dir_gopath() { + if [[ "${GOPATH}" == *:* ]]; then + echo "GOPATH must consist of a single directory." 1>&2 + exit 1 + fi +} + +# Find the base commit using: +# $PULL_BASE_SHA if set (from Prow) +# current ref from the remote upstream branch +kube::util::base_ref() { + local -r git_branch=$1 + + if [[ -n ${PULL_BASE_SHA:-} ]]; then + echo "${PULL_BASE_SHA}" + return + fi + + full_branch="$(kube::util::git_upstream_remote_name)/${git_branch}" + + # make sure the branch is valid, otherwise the check will pass erroneously. + if ! git describe "${full_branch}" >/dev/null; then + # abort! + exit 1 + fi + + echo "${full_branch}" +} + +# Checks whether there are any files matching pattern $2 changed between the +# current branch and upstream branch named by $1. +# Returns 1 (false) if there are no changes +# 0 (true) if there are changes detected. +kube::util::has_changes() { + local -r git_branch=$1 + local -r pattern=$2 + local -r not_pattern=${3:-totallyimpossiblepattern} + + local base_ref + base_ref=$(kube::util::base_ref "${git_branch}") + echo "Checking for '${pattern}' changes against '${base_ref}'" + + # notice this uses ... to find the first shared ancestor + if git diff --name-only "${base_ref}...HEAD" | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then + return 0 + fi + # also check for pending changes + if git status --porcelain | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then + echo "Detected '${pattern}' uncommitted changes." + return 0 + fi + echo "No '${pattern}' changes detected." + return 1 +} + +kube::util::download_file() { + local -r url=$1 + local -r destination_file=$2 + + rm "${destination_file}" 2&> /dev/null || true + + for i in $(seq 5) + do + if ! curl -fsSL --retry 3 --keepalive-time 2 "${url}" -o "${destination_file}"; then + echo "Downloading ${url} failed. $((5-i)) retries left." + sleep 1 + else + echo "Downloading ${url} succeed" + return 0 + fi + done + return 1 +} + +# Test whether openssl is installed. +# Sets: +# OPENSSL_BIN: The path to the openssl binary to use +function kube::util::test_openssl_installed { + if ! openssl version >& /dev/null; then + echo "Failed to run openssl. Please ensure openssl is installed" + exit 1 + fi + + OPENSSL_BIN=$(command -v openssl) +} + +# creates a client CA, args are sudo, dest-dir, ca-id, purpose +# purpose is dropped in after "key encipherment", you usually want +# '"client auth"' +# '"server auth"' +# '"client auth","server auth"' +function kube::util::create_signing_certkey { + local sudo=$1 + local dest_dir=$2 + local id=$3 + local purpose=$4 + # Create client ca + ${sudo} /usr/bin/env bash -e < "${dest_dir}/${id}-ca-config.json" +EOF +} + +# signs a client certificate: args are sudo, dest-dir, CA, filename (roughly), username, groups... +function kube::util::create_client_certkey { + local sudo=$1 + local dest_dir=$2 + local ca=$3 + local id=$4 + local cn=${5:-$4} + local groups="" + local SEP="" + shift 5 + while [ -n "${1:-}" ]; do + groups+="${SEP}{\"O\":\"$1\"}" + SEP="," + shift 1 + done + ${sudo} /usr/bin/env bash -e < /dev/null +apiVersion: v1 +kind: Config +clusters: + - cluster: + certificate-authority: ${ca_file} + server: https://${api_host}:${api_port}/ + name: local-up-cluster +users: + - user: + token: ${token} + client-certificate: ${dest_dir}/client-${client_id}.crt + client-key: ${dest_dir}/client-${client_id}.key + name: local-up-cluster +contexts: + - context: + cluster: local-up-cluster + user: local-up-cluster + name: local-up-cluster +current-context: local-up-cluster +EOF + + # flatten the kubeconfig files to make them self contained + username=$(whoami) + ${sudo} /usr/bin/env bash -e < "/tmp/${client_id}.kubeconfig" + mv -f "/tmp/${client_id}.kubeconfig" "${dest_dir}/${client_id}.kubeconfig" + chown ${username} "${dest_dir}/${client_id}.kubeconfig" +EOF +} + +# Determines if docker can be run, failures may simply require that the user be added to the docker group. +function kube::util::ensure_docker_daemon_connectivity { + IFS=" " read -ra DOCKER <<< "${DOCKER_OPTS}" + # Expand ${DOCKER[@]} only if it's not unset. This is to work around + # Bash 3 issue with unbound variable. + DOCKER=(docker ${DOCKER[@]:+"${DOCKER[@]}"}) + if ! "${DOCKER[@]}" info > /dev/null 2>&1 ; then + cat <<'EOF' >&2 +Can't connect to 'docker' daemon. please fix and retry. + +Possible causes: + - Docker Daemon not started + - Linux: confirm via your init system + - macOS w/ docker-machine: run `docker-machine ls` and `docker-machine start ` + - macOS w/ Docker for Mac: Check the menu bar and start the Docker application + - DOCKER_HOST hasn't been set or is set incorrectly + - Linux: domain socket is used, DOCKER_* should be unset. In Bash run `unset ${!DOCKER_*}` + - macOS w/ docker-machine: run `eval "$(docker-machine env )"` + - macOS w/ Docker for Mac: domain socket is used, DOCKER_* should be unset. In Bash run `unset ${!DOCKER_*}` + - Other things to check: + - Linux: User isn't in 'docker' group. Add and relogin. + - Something like 'sudo usermod -a -G docker ${USER}' + - RHEL7 bug and workaround: https://bugzilla.redhat.com/show_bug.cgi?id=1119282#c8 +EOF + return 1 + fi +} + +# Wait for background jobs to finish. Return with +# an error status if any of the jobs failed. +kube::util::wait-for-jobs() { + local fail=0 + local job + for job in $(jobs -p); do + wait "${job}" || fail=$((fail + 1)) + done + return ${fail} +} + +# kube::util::join +# Concatenates the list elements with the delimiter passed as first parameter +# +# Ex: kube::util::join , a b c +# -> a,b,c +function kube::util::join { + local IFS="$1" + shift + echo "$*" +} + +# Downloads cfssl/cfssljson into $1 directory if they do not already exist in PATH +# +# Assumed vars: +# $1 (cfssl directory) (optional) +# +# Sets: +# CFSSL_BIN: The path of the installed cfssl binary +# CFSSLJSON_BIN: The path of the installed cfssljson binary +# +function kube::util::ensure-cfssl { + if command -v cfssl &>/dev/null && command -v cfssljson &>/dev/null; then + CFSSL_BIN=$(command -v cfssl) + CFSSLJSON_BIN=$(command -v cfssljson) + return 0 + fi + + host_arch=$(kube::util::host_arch) + + if [[ "${host_arch}" != "amd64" ]]; then + echo "Cannot download cfssl on non-amd64 hosts and cfssl does not appear to be installed." + echo "Please install cfssl and cfssljson and verify they are in \$PATH." + echo "Hint: export PATH=\$PATH:\$GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..." + exit 1 + fi + + # Create a temp dir for cfssl if no directory was given + local cfssldir=${1:-} + if [[ -z "${cfssldir}" ]]; then + kube::util::ensure-temp-dir + cfssldir="${KUBE_TEMP}/cfssl" + fi + + mkdir -p "${cfssldir}" + pushd "${cfssldir}" > /dev/null || return 1 + + echo "Unable to successfully run 'cfssl' from ${PATH}; downloading instead..." + kernel=$(uname -s) + case "${kernel}" in + Linux) + curl --retry 10 -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 + curl --retry 10 -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 + ;; + Darwin) + curl --retry 10 -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_darwin-amd64 + curl --retry 10 -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_darwin-amd64 + ;; + *) + echo "Unknown, unsupported platform: ${kernel}." >&2 + echo "Supported platforms: Linux, Darwin." >&2 + exit 2 + esac + + chmod +x cfssl || true + chmod +x cfssljson || true + + CFSSL_BIN="${cfssldir}/cfssl" + CFSSLJSON_BIN="${cfssldir}/cfssljson" + if [[ ! -x ${CFSSL_BIN} || ! -x ${CFSSLJSON_BIN} ]]; then + echo "Failed to download 'cfssl'. Please install cfssl and cfssljson and verify they are in \$PATH." + echo "Hint: export PATH=\$PATH:\$GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..." + exit 1 + fi + popd > /dev/null || return 1 +} + +# kube::util::ensure_dockerized +# Confirms that the script is being run inside a kube-build image +# +function kube::util::ensure_dockerized { + if [[ -f /kube-build-image ]]; then + return 0 + else + echo "ERROR: This script is designed to be run inside a kube-build container" + exit 1 + fi +} + +# kube::util::ensure-gnu-sed +# Determines which sed binary is gnu-sed on linux/darwin +# +# Sets: +# SED: The name of the gnu-sed binary +# +function kube::util::ensure-gnu-sed { + if LANG=C sed --help 2>&1 | grep -q GNU; then + SED="sed" + elif command -v gsed &>/dev/null; then + SED="gsed" + else + kube::log::error "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." >&2 + return 1 + fi + kube::util::sourced_variable "${SED}" +} + +# kube::util::check-file-in-alphabetical-order +# Check that the file is in alphabetical order +# +function kube::util::check-file-in-alphabetical-order { + local failure_file="$1" + if ! diff -u "${failure_file}" <(LC_ALL=C sort "${failure_file}"); then + { + echo + echo "${failure_file} is not in alphabetical order. Please sort it:" + echo + echo " LC_ALL=C sort -o ${failure_file} ${failure_file}" + echo + } >&2 + false + fi +} + +# kube::util::require-jq +# Checks whether jq is installed. +function kube::util::require-jq { + if ! command -v jq &>/dev/null; then + echo "jq not found. Please install." 1>&2 + return 1 + fi +} + +# Some useful colors. +if [[ -z "${color_start-}" ]]; then + declare -r color_start="\033[" + declare -r color_red="${color_start}0;31m" + declare -r color_yellow="${color_start}0;33m" + declare -r color_green="${color_start}0;32m" + declare -r color_blue="${color_start}1;34m" + declare -r color_cyan="${color_start}1;36m" + declare -r color_norm="${color_start}0m" + + kube::util::sourced_variable "${color_start}" + kube::util::sourced_variable "${color_red}" + kube::util::sourced_variable "${color_yellow}" + kube::util::sourced_variable "${color_green}" + kube::util::sourced_variable "${color_blue}" + kube::util::sourced_variable "${color_cyan}" + kube::util::sourced_variable "${color_norm}" +fi + +# ex: ts=2 sw=2 et filetype=sh diff --git a/container-object-storage-interface-controller/verify-shellcheck.sh b/container-object-storage-interface-controller/verify-shellcheck.sh new file mode 100755 index 00000000..1b882fa8 --- /dev/null +++ b/container-object-storage-interface-controller/verify-shellcheck.sh @@ -0,0 +1,187 @@ +#!/usr/bin/env bash + +# Copyright 2018 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. +source "${KUBE_ROOT}/hack/lib/init.sh" +source "${KUBE_ROOT}/hack/lib/util.sh" + +# required version for this script, if not installed on the host we will +# use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE +SHELLCHECK_VERSION="0.6.0" +# upstream shellcheck latest stable image as of January 10th, 2019 +SHELLCHECK_IMAGE="koalaman/shellcheck-alpine:v0.6.0@sha256:7d4d712a2686da99d37580b4e2f45eb658b74e4b01caf67c1099adc294b96b52" + +# fixed name for the shellcheck docker container so we can reliably clean it up +SHELLCHECK_CONTAINER="k8s-shellcheck" + +# disabled lints +disabled=( + # this lint disallows non-constant source, which we use extensively without + # any known bugs + 1090 + # this lint prefers command -v to which, they are not the same + 2230 +) +# comma separate for passing to shellcheck +join_by() { + local IFS="$1"; + shift; + echo "$*"; +} +SHELLCHECK_DISABLED="$(join_by , "${disabled[@]}")" +readonly SHELLCHECK_DISABLED + +# creates the shellcheck container for later use +create_container () { + # TODO(bentheelder): this is a performance hack, we create the container with + # a sleep MAX_INT32 so that it is effectively paused. + # We then repeatedly exec to it to run each shellcheck, and later rm it when + # we're done. + # This is incredibly much faster than creating a container for each shellcheck + # call ... + docker run --name "${SHELLCHECK_CONTAINER}" -d --rm -v "${KUBE_ROOT}:${KUBE_ROOT}" -w "${KUBE_ROOT}" --entrypoint="sleep" "${SHELLCHECK_IMAGE}" 2147483647 +} +# removes the shellcheck container +remove_container () { + docker rm -f "${SHELLCHECK_CONTAINER}" &> /dev/null || true +} + +# ensure we're linting the k8s source tree +cd "${KUBE_ROOT}" + +# find all shell scripts excluding ./_*, ./.git/*, ./vendor*, +# and anything git-ignored +all_shell_scripts=() +while IFS=$'\n' read -r script; + do git check-ignore -q "$script" || all_shell_scripts+=("$script"); +done < <(find . -name "*.sh" \ + -not \( \ + -path ./_\* -o \ + -path ./.git\* -o \ + -path ./vendor\* \ + \)) + +# make sure known failures are sorted +failure_file="${KUBE_ROOT}/hack/.shellcheck_failures" +kube::util::check-file-in-alphabetical-order "${failure_file}" + +# load known failure files +failing_files=() +while IFS=$'\n' read -r script; + do failing_files+=("$script"); +done < <(cat "${failure_file}") + +# detect if the host machine has the required shellcheck version installed +# if so, we will use that instead. +HAVE_SHELLCHECK=false +if which shellcheck &>/dev/null; then + detected_version="$(shellcheck --version | grep 'version: .*')" + if [[ "${detected_version}" = "version: ${SHELLCHECK_VERSION}" ]]; then + HAVE_SHELLCHECK=true + fi +fi + +# tell the user which we've selected and possibly set up the container +if ${HAVE_SHELLCHECK}; then + echo "Using host shellcheck ${SHELLCHECK_VERSION} binary." +else + echo "Using shellcheck ${SHELLCHECK_VERSION} docker image." + # remove any previous container, ensure we will attempt to cleanup on exit, + # and create the container + remove_container + kube::util::trap_add 'remove_container' EXIT + if ! output="$(create_container 2>&1)"; then + { + echo "Failed to create shellcheck container with output: " + echo "" + echo "${output}" + } >&2 + exit 1 + fi +fi + +# lint each script, tracking failures +errors=() +not_failing=() +for f in "${all_shell_scripts[@]}"; do + set +o errexit + if ${HAVE_SHELLCHECK}; then + failedLint=$(shellcheck --exclude="${SHELLCHECK_DISABLED}" "${f}") + else + failedLint=$(docker exec -t ${SHELLCHECK_CONTAINER} \ + shellcheck --exclude="${SHELLCHECK_DISABLED}" "${f}") + fi + set -o errexit + kube::util::array_contains "${f}" "${failing_files[@]}" && in_failing=$? || in_failing=$? + if [[ -n "${failedLint}" ]] && [[ "${in_failing}" -ne "0" ]]; then + errors+=( "${failedLint}" ) + fi + if [[ -z "${failedLint}" ]] && [[ "${in_failing}" -eq "0" ]]; then + not_failing+=( "${f}" ) + fi +done + +# Check to be sure all the packages that should pass lint are. +if [ ${#errors[@]} -eq 0 ]; then + echo 'Congratulations! All shell files are passing lint (excluding those in hack/.shellcheck_failures).' +else + { + echo "Errors from shellcheck:" + for err in "${errors[@]}"; do + echo "$err" + done + echo + echo 'Please review the above warnings. You can test via "./hack/verify-shellcheck"' + echo 'If the above warnings do not make sense, you can exempt this package from shellcheck' + echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).' + echo + } >&2 + false +fi + +if [[ ${#not_failing[@]} -gt 0 ]]; then + { + echo "Some packages in hack/.shellcheck_failures are passing shellcheck. Please remove them." + echo + for f in "${not_failing[@]}"; do + echo " $f" + done + echo + } >&2 + false +fi + +# Check that all failing_packages actually still exist +gone=() +for f in "${failing_files[@]}"; do + kube::util::array_contains "$f" "${all_shell_scripts[@]}" || gone+=( "$f" ) +done + +if [[ ${#gone[@]} -gt 0 ]]; then + { + echo "Some files in hack/.shellcheck_failures do not exist anymore. Please remove them." + echo + for f in "${gone[@]}"; do + echo " $f" + done + echo + } >&2 + false +fi From 97fd6e39759df525c1a31a020336322f0fd1a93e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 27 Mar 2019 17:39:43 +0100 Subject: [PATCH 018/299] check vendor directory This runs "dep check" to verify that the vendor directory is up-to-date and meets expectations (= done with dep >= 0.5.0). --- .../build.make | 10 ++++++++++ .../travis.yml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 8ca0b2c2..b4084061 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -117,6 +117,16 @@ test-fmt: false; \ fi +# This test only runs when dep >= 0.5 is installed, which is the case for the CI setup. +.PHONY: test-vendor +test: test-vendor +test-vendor: + @ echo; echo "### $@:" + @ case "$$(dep version 2>/dev/null | grep 'version *:')" in \ + *v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \ + *) echo "skipping check, dep >= 0.5 required";; \ + esac + .PHONY: test-subtree test: test-subtree test-subtree: diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index b5a360af..1c05dfd9 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -5,6 +5,11 @@ services: matrix: include: - go: 1.11.1 +before_script: +- mkdir -p bin +- wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep +- chmod u+x bin/dep +- export PATH=$PWD/bin:$PATH script: - make -k all test after_success: From fa31b2968ca3719f885406855b32701b4bcfcac6 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 15 Mar 2019 11:08:53 +0100 Subject: [PATCH 019/299] build.make: avoid unit-testing E2E test suite In repos that have a test/e2e, that test suite should be run separately because it depends on a running cluster. --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 8ca0b2c2..6ea32795 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -98,7 +98,7 @@ test: test: test-go test-go: @ echo; echo "### $@:" - go test `go list ./... | grep -v 'vendor' $(TEST_GO_FILTER_CMD)` $(TESTARGS) + go test `go list ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS) .PHONY: test-vet test: test-vet From ba8e407974ee56d2c1450861e18cfc6bebcd7058 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 15 Mar 2019 16:42:10 +0100 Subject: [PATCH 020/299] verify-shellcheck.sh: make it usable in csi-release-tools These are the modifications that were necessary to call this outside of Kubernetes. The support for excluding files from checking gets removed to simplify the script. It shouldn't be needed, because linting can be enabled after fixing whatever scripts might fail the check. --- .../util.sh | 691 ------------------ .../verify-shellcheck.sh | 71 +- 2 files changed, 15 insertions(+), 747 deletions(-) diff --git a/container-object-storage-interface-controller/util.sh b/container-object-storage-interface-controller/util.sh index 31ce9fc4..abeb1b2e 100755 --- a/container-object-storage-interface-controller/util.sh +++ b/container-object-storage-interface-controller/util.sh @@ -39,31 +39,6 @@ kube::util::array_contains() { return 1 } -kube::util::wait_for_url() { - local url=$1 - local prefix=${2:-} - local wait=${3:-1} - local times=${4:-30} - local maxtime=${5:-1} - - command -v curl >/dev/null || { - kube::log::usage "curl must be installed" - exit 1 - } - - local i - for i in $(seq 1 "${times}"); do - local out - if out=$(curl --max-time "${maxtime}" -gkfs "${url}" 2>/dev/null); then - kube::log::status "On try ${i}, ${prefix}: ${out}" - return 0 - fi - sleep "${wait}" - done - kube::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each" - return 1 -} - # Example: kube::util::trap_add 'echo "in trap DEBUG"' DEBUG # See: http://stackoverflow.com/questions/3338030/multiple-bash-traps-for-the-same-signal kube::util::trap_add() { @@ -93,422 +68,6 @@ kube::util::trap_add() { done } -# Opposite of kube::util::ensure-temp-dir() -kube::util::cleanup-temp-dir() { - rm -rf "${KUBE_TEMP}" -} - -# Create a temp dir that'll be deleted at the end of this bash session. -# -# Vars set: -# KUBE_TEMP -kube::util::ensure-temp-dir() { - if [[ -z ${KUBE_TEMP-} ]]; then - KUBE_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t kubernetes.XXXXXX) - kube::util::trap_add kube::util::cleanup-temp-dir EXIT - fi -} - -kube::util::host_os() { - local host_os - case "$(uname -s)" in - Darwin) - host_os=darwin - ;; - Linux) - host_os=linux - ;; - *) - kube::log::error "Unsupported host OS. Must be Linux or Mac OS X." - exit 1 - ;; - esac - echo "${host_os}" -} - -kube::util::host_arch() { - local host_arch - case "$(uname -m)" in - x86_64*) - host_arch=amd64 - ;; - i?86_64*) - host_arch=amd64 - ;; - amd64*) - host_arch=amd64 - ;; - aarch64*) - host_arch=arm64 - ;; - arm64*) - host_arch=arm64 - ;; - arm*) - host_arch=arm - ;; - i?86*) - host_arch=x86 - ;; - s390x*) - host_arch=s390x - ;; - ppc64le*) - host_arch=ppc64le - ;; - *) - kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." - exit 1 - ;; - esac - echo "${host_arch}" -} - -# This figures out the host platform without relying on golang. We need this as -# we don't want a golang install to be a prerequisite to building yet we need -# this info to figure out where the final binaries are placed. -kube::util::host_platform() { - echo "$(kube::util::host_os)/$(kube::util::host_arch)" -} - -kube::util::find-binary-for-platform() { - local -r lookfor="$1" - local -r platform="$2" - local locations=( - "${KUBE_ROOT}/_output/bin/${lookfor}" - "${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}" - "${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}" - "${KUBE_ROOT}/platforms/${platform}/${lookfor}" - ) - # Also search for binary in bazel build tree. - # The bazel go rules place some binaries in subtrees like - # "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure - # the platform name is matched in the path. - while IFS=$'\n' read -r location; do - locations+=("$location"); - done < <(find "${KUBE_ROOT}/bazel-bin/" -type f -executable \ - \( -path "*/${platform/\//_}*/${lookfor}" -o -path "*/${lookfor}" \) 2>/dev/null || true) - - # List most recently-updated location. - local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) - echo -n "${bin}" -} - -kube::util::find-binary() { - kube::util::find-binary-for-platform "$1" "$(kube::util::host_platform)" -} - -# Run all known doc generators (today gendocs and genman for kubectl) -# $1 is the directory to put those generated documents -kube::util::gen-docs() { - local dest="$1" - - # Find binary - gendocs=$(kube::util::find-binary "gendocs") - genkubedocs=$(kube::util::find-binary "genkubedocs") - genman=$(kube::util::find-binary "genman") - genyaml=$(kube::util::find-binary "genyaml") - genfeddocs=$(kube::util::find-binary "genfeddocs") - - # TODO: If ${genfeddocs} is not used from anywhere (it isn't used at - # least from k/k tree), remove it completely. - kube::util::sourced_variable "${genfeddocs}" - - mkdir -p "${dest}/docs/user-guide/kubectl/" - "${gendocs}" "${dest}/docs/user-guide/kubectl/" - mkdir -p "${dest}/docs/admin/" - "${genkubedocs}" "${dest}/docs/admin/" "kube-apiserver" - "${genkubedocs}" "${dest}/docs/admin/" "kube-controller-manager" - "${genkubedocs}" "${dest}/docs/admin/" "cloud-controller-manager" - "${genkubedocs}" "${dest}/docs/admin/" "kube-proxy" - "${genkubedocs}" "${dest}/docs/admin/" "kube-scheduler" - "${genkubedocs}" "${dest}/docs/admin/" "kubelet" - "${genkubedocs}" "${dest}/docs/admin/" "kubeadm" - - mkdir -p "${dest}/docs/man/man1/" - "${genman}" "${dest}/docs/man/man1/" "kube-apiserver" - "${genman}" "${dest}/docs/man/man1/" "kube-controller-manager" - "${genman}" "${dest}/docs/man/man1/" "cloud-controller-manager" - "${genman}" "${dest}/docs/man/man1/" "kube-proxy" - "${genman}" "${dest}/docs/man/man1/" "kube-scheduler" - "${genman}" "${dest}/docs/man/man1/" "kubelet" - "${genman}" "${dest}/docs/man/man1/" "kubectl" - "${genman}" "${dest}/docs/man/man1/" "kubeadm" - - mkdir -p "${dest}/docs/yaml/kubectl/" - "${genyaml}" "${dest}/docs/yaml/kubectl/" - - # create the list of generated files - pushd "${dest}" > /dev/null || return 1 - touch docs/.generated_docs - find . -type f | cut -sd / -f 2- | LC_ALL=C sort > docs/.generated_docs - popd > /dev/null || return 1 -} - -# Removes previously generated docs-- we don't want to check them in. $KUBE_ROOT -# must be set. -kube::util::remove-gen-docs() { - if [ -e "${KUBE_ROOT}/docs/.generated_docs" ]; then - # remove all of the old docs; we don't want to check them in. - while read -r file; do - rm "${KUBE_ROOT}/${file}" 2>/dev/null || true - done <"${KUBE_ROOT}/docs/.generated_docs" - # The docs/.generated_docs file lists itself, so we don't need to explicitly - # delete it. - fi -} - -# Takes a group/version and returns the path to its location on disk, sans -# "pkg". E.g.: -# * default behavior: extensions/v1beta1 -> apis/extensions/v1beta1 -# * default behavior for only a group: experimental -> apis/experimental -# * Special handling for empty group: v1 -> api/v1, unversioned -> api/unversioned -# * Special handling for groups suffixed with ".k8s.io": foo.k8s.io/v1 -> apis/foo/v1 -# * Very special handling for when both group and version are "": / -> api -kube::util::group-version-to-pkg-path() { - local group_version="$1" - - while IFS=$'\n' read -r api; do - if [[ "${api}" = "${group_version/.*k8s.io/}" ]]; then - echo "vendor/k8s.io/api/${group_version/.*k8s.io/}" - return - fi - done < <(cd "${KUBE_ROOT}/staging/src/k8s.io/api" && find . -name types.go -exec dirname {} \; | sed "s|\./||g" | sort) - - # "v1" is the API GroupVersion - if [[ "${group_version}" == "v1" ]]; then - echo "vendor/k8s.io/api/core/v1" - return - fi - - # Special cases first. - # TODO(lavalamp): Simplify this by moving pkg/api/v1 and splitting pkg/api, - # moving the results to pkg/apis/api. - case "${group_version}" in - # both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API. - __internal) - echo "pkg/apis/core" - ;; - meta/v1) - echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1" - ;; - meta/v1beta1) - echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1" - ;; - *.k8s.io) - echo "pkg/apis/${group_version%.*k8s.io}" - ;; - *.k8s.io/*) - echo "pkg/apis/${group_version/.*k8s.io/}" - ;; - *) - echo "pkg/apis/${group_version%__internal}" - ;; - esac -} - -# Takes a group/version and returns the swagger-spec file name. -# default behavior: extensions/v1beta1 -> extensions_v1beta1 -# special case for v1: v1 -> v1 -kube::util::gv-to-swagger-name() { - local group_version="$1" - case "${group_version}" in - v1) - echo "v1" - ;; - *) - echo "${group_version%/*}_${group_version#*/}" - ;; - esac -} - -# Returns the name of the upstream remote repository name for the local git -# repo, e.g. "upstream" or "origin". -kube::util::git_upstream_remote_name() { - git remote -v | grep fetch |\ - grep -E 'github.com[/:]kubernetes/kubernetes|k8s.io/kubernetes' |\ - head -n 1 | awk '{print $1}' -} - -# Ensures the current directory is a git tree for doing things like restoring or -# validating godeps -kube::util::create-fake-git-tree() { - local -r target_dir=${1:-$(pwd)} - - pushd "${target_dir}" >/dev/null || return 1 - git init >/dev/null - git config --local user.email "nobody@k8s.io" - git config --local user.name "$0" - git add . >/dev/null - git commit -q -m "Snapshot" >/dev/null - if (( ${KUBE_VERBOSE:-5} >= 6 )); then - kube::log::status "${target_dir} is now a git tree." - fi - popd >/dev/null || return 1 -} - -# Checks whether godep restore was run in the current GOPATH, i.e. that all referenced repos exist -# and are checked out to the referenced rev. -kube::util::godep_restored() { - local -r godeps_json=${1:-Godeps/Godeps.json} - local -r gopath=${2:-${GOPATH%:*}} - - kube::util::require-jq - - local root - local old_rev="" - while read -r path rev; do - rev="${rev//[\'\"]}" # remove quotes which are around revs sometimes - - if [[ "${rev}" == "${old_rev}" ]] && [[ "${path}" == "${root}"* ]]; then - # avoid checking the same git/hg root again - continue - fi - - root="${path}" - while [ "${root}" != "." ] && [ ! -d "${gopath}/src/${root}/.git" ] && [ ! -d "${gopath}/src/${root}/.hg" ]; do - root=$(dirname "${root}") - done - if [ "${root}" == "." ]; then - echo "No checkout of ${path} found in GOPATH \"${gopath}\"." 1>&2 - return 1 - fi - local head - if [ -d "${gopath}/src/${root}/.git" ]; then - head="$(cd "${gopath}/src/${root}" && git rev-parse HEAD)" - else - head="$(cd "${gopath}/src/${root}" && hg parent --template '{node}')" - fi - if [ "${head}" != "${rev}" ]; then - echo "Unexpected HEAD '${head}' at ${gopath}/src/${root}, expected '${rev}'." 1>&2 - return 1 - fi - old_rev="${rev}" - done < <(jq '.Deps|.[]|.ImportPath + " " + .Rev' -r < "${godeps_json}") - return 0 -} - -# Exits script if working directory is dirty. If it's run interactively in the terminal -# the user can commit changes in a second terminal. This script will wait. -kube::util::ensure_clean_working_dir() { - while ! git diff HEAD --exit-code &>/dev/null; do - echo -e "\nUnexpected dirty working directory:\n" - if tty -s; then - git status -s - else - git diff -a # be more verbose in log files without tty - exit 1 - fi | sed 's/^/ /' - echo -e "\nCommit your changes in another terminal and then continue here by pressing enter." - read -r - done 1>&2 -} - -# Ensure that the given godep version is installed and in the path. Almost -# nobody should use any version but the default. -# -# Sets: -# KUBE_GODEP: The path to the godep binary -# -kube::util::ensure_godep_version() { - local godep_target_version=${1:-"v80-k8s-r1"} # this version is known to work - - # If KUBE_GODEP is already set, and it's the right version, then use it. - if [[ -n "${KUBE_GODEP:-}" && "$(${KUBE_GODEP:?} version 2>/dev/null)" == *"godep ${godep_target_version}"* ]]; then - kube::log::status "Using ${KUBE_GODEP}" - return - fi - - # Otherwise, install forked godep - kube::log::status "Installing godep version ${godep_target_version}" - GOBIN="${KUBE_OUTPUT_BINPATH}" go install k8s.io/kubernetes/third_party/forked/godep - export KUBE_GODEP="${KUBE_OUTPUT_BINPATH}/godep" - kube::log::status "Installed ${KUBE_GODEP}" - - # Verify that the installed godep from fork is what we expect - if [[ "$(${KUBE_GODEP:?} version 2>/dev/null)" != *"godep ${godep_target_version}"* ]]; then - kube::log::error "Expected godep ${godep_target_version} from ${KUBE_GODEP}, got $(${KUBE_GODEP:?} version)" - return 1 - fi -} - -# Ensure that none of the staging repos is checked out in the GOPATH because this -# easily confused godep. -kube::util::ensure_no_staging_repos_in_gopath() { - kube::util::ensure_single_dir_gopath - local error=0 - for repo_file in "${KUBE_ROOT}"/staging/src/k8s.io/*; do - if [[ ! -d "${repo_file}" ]]; then - # not a directory or there were no files - continue; - fi - repo="$(basename "${repo_file}")" - if [ -e "${GOPATH}/src/k8s.io/${repo}" ]; then - echo "k8s.io/${repo} exists in GOPATH. Remove before running godep-save.sh." 1>&2 - error=1 - fi - done - if [ "${error}" = "1" ]; then - exit 1 - fi -} - -# Checks that the GOPATH is simple, i.e. consists only of one directory, not multiple. -kube::util::ensure_single_dir_gopath() { - if [[ "${GOPATH}" == *:* ]]; then - echo "GOPATH must consist of a single directory." 1>&2 - exit 1 - fi -} - -# Find the base commit using: -# $PULL_BASE_SHA if set (from Prow) -# current ref from the remote upstream branch -kube::util::base_ref() { - local -r git_branch=$1 - - if [[ -n ${PULL_BASE_SHA:-} ]]; then - echo "${PULL_BASE_SHA}" - return - fi - - full_branch="$(kube::util::git_upstream_remote_name)/${git_branch}" - - # make sure the branch is valid, otherwise the check will pass erroneously. - if ! git describe "${full_branch}" >/dev/null; then - # abort! - exit 1 - fi - - echo "${full_branch}" -} - -# Checks whether there are any files matching pattern $2 changed between the -# current branch and upstream branch named by $1. -# Returns 1 (false) if there are no changes -# 0 (true) if there are changes detected. -kube::util::has_changes() { - local -r git_branch=$1 - local -r pattern=$2 - local -r not_pattern=${3:-totallyimpossiblepattern} - - local base_ref - base_ref=$(kube::util::base_ref "${git_branch}") - echo "Checking for '${pattern}' changes against '${base_ref}'" - - # notice this uses ... to find the first shared ancestor - if git diff --name-only "${base_ref}...HEAD" | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then - return 0 - fi - # also check for pending changes - if git status --porcelain | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then - echo "Detected '${pattern}' uncommitted changes." - return 0 - fi - echo "No '${pattern}' changes detected." - return 1 -} - kube::util::download_file() { local -r url=$1 local -r destination_file=$2 @@ -528,152 +87,6 @@ kube::util::download_file() { return 1 } -# Test whether openssl is installed. -# Sets: -# OPENSSL_BIN: The path to the openssl binary to use -function kube::util::test_openssl_installed { - if ! openssl version >& /dev/null; then - echo "Failed to run openssl. Please ensure openssl is installed" - exit 1 - fi - - OPENSSL_BIN=$(command -v openssl) -} - -# creates a client CA, args are sudo, dest-dir, ca-id, purpose -# purpose is dropped in after "key encipherment", you usually want -# '"client auth"' -# '"server auth"' -# '"client auth","server auth"' -function kube::util::create_signing_certkey { - local sudo=$1 - local dest_dir=$2 - local id=$3 - local purpose=$4 - # Create client ca - ${sudo} /usr/bin/env bash -e < "${dest_dir}/${id}-ca-config.json" -EOF -} - -# signs a client certificate: args are sudo, dest-dir, CA, filename (roughly), username, groups... -function kube::util::create_client_certkey { - local sudo=$1 - local dest_dir=$2 - local ca=$3 - local id=$4 - local cn=${5:-$4} - local groups="" - local SEP="" - shift 5 - while [ -n "${1:-}" ]; do - groups+="${SEP}{\"O\":\"$1\"}" - SEP="," - shift 1 - done - ${sudo} /usr/bin/env bash -e < /dev/null -apiVersion: v1 -kind: Config -clusters: - - cluster: - certificate-authority: ${ca_file} - server: https://${api_host}:${api_port}/ - name: local-up-cluster -users: - - user: - token: ${token} - client-certificate: ${dest_dir}/client-${client_id}.crt - client-key: ${dest_dir}/client-${client_id}.key - name: local-up-cluster -contexts: - - context: - cluster: local-up-cluster - user: local-up-cluster - name: local-up-cluster -current-context: local-up-cluster -EOF - - # flatten the kubeconfig files to make them self contained - username=$(whoami) - ${sudo} /usr/bin/env bash -e < "/tmp/${client_id}.kubeconfig" - mv -f "/tmp/${client_id}.kubeconfig" "${dest_dir}/${client_id}.kubeconfig" - chown ${username} "${dest_dir}/${client_id}.kubeconfig" -EOF -} - -# Determines if docker can be run, failures may simply require that the user be added to the docker group. -function kube::util::ensure_docker_daemon_connectivity { - IFS=" " read -ra DOCKER <<< "${DOCKER_OPTS}" - # Expand ${DOCKER[@]} only if it's not unset. This is to work around - # Bash 3 issue with unbound variable. - DOCKER=(docker ${DOCKER[@]:+"${DOCKER[@]}"}) - if ! "${DOCKER[@]}" info > /dev/null 2>&1 ; then - cat <<'EOF' >&2 -Can't connect to 'docker' daemon. please fix and retry. - -Possible causes: - - Docker Daemon not started - - Linux: confirm via your init system - - macOS w/ docker-machine: run `docker-machine ls` and `docker-machine start ` - - macOS w/ Docker for Mac: Check the menu bar and start the Docker application - - DOCKER_HOST hasn't been set or is set incorrectly - - Linux: domain socket is used, DOCKER_* should be unset. In Bash run `unset ${!DOCKER_*}` - - macOS w/ docker-machine: run `eval "$(docker-machine env )"` - - macOS w/ Docker for Mac: domain socket is used, DOCKER_* should be unset. In Bash run `unset ${!DOCKER_*}` - - Other things to check: - - Linux: User isn't in 'docker' group. Add and relogin. - - Something like 'sudo usermod -a -G docker ${USER}' - - RHEL7 bug and workaround: https://bugzilla.redhat.com/show_bug.cgi?id=1119282#c8 -EOF - return 1 - fi -} - # Wait for background jobs to finish. Return with # an error status if any of the jobs failed. kube::util::wait-for-jobs() { @@ -696,101 +109,6 @@ function kube::util::join { echo "$*" } -# Downloads cfssl/cfssljson into $1 directory if they do not already exist in PATH -# -# Assumed vars: -# $1 (cfssl directory) (optional) -# -# Sets: -# CFSSL_BIN: The path of the installed cfssl binary -# CFSSLJSON_BIN: The path of the installed cfssljson binary -# -function kube::util::ensure-cfssl { - if command -v cfssl &>/dev/null && command -v cfssljson &>/dev/null; then - CFSSL_BIN=$(command -v cfssl) - CFSSLJSON_BIN=$(command -v cfssljson) - return 0 - fi - - host_arch=$(kube::util::host_arch) - - if [[ "${host_arch}" != "amd64" ]]; then - echo "Cannot download cfssl on non-amd64 hosts and cfssl does not appear to be installed." - echo "Please install cfssl and cfssljson and verify they are in \$PATH." - echo "Hint: export PATH=\$PATH:\$GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..." - exit 1 - fi - - # Create a temp dir for cfssl if no directory was given - local cfssldir=${1:-} - if [[ -z "${cfssldir}" ]]; then - kube::util::ensure-temp-dir - cfssldir="${KUBE_TEMP}/cfssl" - fi - - mkdir -p "${cfssldir}" - pushd "${cfssldir}" > /dev/null || return 1 - - echo "Unable to successfully run 'cfssl' from ${PATH}; downloading instead..." - kernel=$(uname -s) - case "${kernel}" in - Linux) - curl --retry 10 -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 - curl --retry 10 -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 - ;; - Darwin) - curl --retry 10 -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_darwin-amd64 - curl --retry 10 -L -o cfssljson https://pkg.cfssl.org/R1.2/cfssljson_darwin-amd64 - ;; - *) - echo "Unknown, unsupported platform: ${kernel}." >&2 - echo "Supported platforms: Linux, Darwin." >&2 - exit 2 - esac - - chmod +x cfssl || true - chmod +x cfssljson || true - - CFSSL_BIN="${cfssldir}/cfssl" - CFSSLJSON_BIN="${cfssldir}/cfssljson" - if [[ ! -x ${CFSSL_BIN} || ! -x ${CFSSLJSON_BIN} ]]; then - echo "Failed to download 'cfssl'. Please install cfssl and cfssljson and verify they are in \$PATH." - echo "Hint: export PATH=\$PATH:\$GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..." - exit 1 - fi - popd > /dev/null || return 1 -} - -# kube::util::ensure_dockerized -# Confirms that the script is being run inside a kube-build image -# -function kube::util::ensure_dockerized { - if [[ -f /kube-build-image ]]; then - return 0 - else - echo "ERROR: This script is designed to be run inside a kube-build container" - exit 1 - fi -} - -# kube::util::ensure-gnu-sed -# Determines which sed binary is gnu-sed on linux/darwin -# -# Sets: -# SED: The name of the gnu-sed binary -# -function kube::util::ensure-gnu-sed { - if LANG=C sed --help 2>&1 | grep -q GNU; then - SED="sed" - elif command -v gsed &>/dev/null; then - SED="gsed" - else - kube::log::error "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." >&2 - return 1 - fi - kube::util::sourced_variable "${SED}" -} - # kube::util::check-file-in-alphabetical-order # Check that the file is in alphabetical order # @@ -808,15 +126,6 @@ function kube::util::check-file-in-alphabetical-order { fi } -# kube::util::require-jq -# Checks whether jq is installed. -function kube::util::require-jq { - if ! command -v jq &>/dev/null; then - echo "jq not found. Please install." 1>&2 - return 1 - fi -} - # Some useful colors. if [[ -z "${color_start-}" ]]; then declare -r color_start="\033[" diff --git a/container-object-storage-interface-controller/verify-shellcheck.sh b/container-object-storage-interface-controller/verify-shellcheck.sh index 1b882fa8..fd28021a 100755 --- a/container-object-storage-interface-controller/verify-shellcheck.sh +++ b/container-object-storage-interface-controller/verify-shellcheck.sh @@ -18,9 +18,12 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -source "${KUBE_ROOT}/hack/lib/init.sh" -source "${KUBE_ROOT}/hack/lib/util.sh" +# The csi-release-tools directory. +TOOLS="$(dirname "${BASH_SOURCE[0]}")" +. "${TOOLS}/util.sh" + +# Directory to check. Default is the parent of the tools themselves. +ROOT="${1:-${TOOLS}/..}" # required version for this script, if not installed on the host we will # use the official docker image instead. keep this in sync with SHELLCHECK_IMAGE @@ -56,15 +59,15 @@ create_container () { # we're done. # This is incredibly much faster than creating a container for each shellcheck # call ... - docker run --name "${SHELLCHECK_CONTAINER}" -d --rm -v "${KUBE_ROOT}:${KUBE_ROOT}" -w "${KUBE_ROOT}" --entrypoint="sleep" "${SHELLCHECK_IMAGE}" 2147483647 + docker run --name "${SHELLCHECK_CONTAINER}" -d --rm -v "${ROOT}:${ROOT}" -w "${ROOT}" --entrypoint="sleep" "${SHELLCHECK_IMAGE}" 2147483647 } # removes the shellcheck container remove_container () { docker rm -f "${SHELLCHECK_CONTAINER}" &> /dev/null || true } -# ensure we're linting the k8s source tree -cd "${KUBE_ROOT}" +# ensure we're linting the source tree +cd "${ROOT}" # find all shell scripts excluding ./_*, ./.git/*, ./vendor*, # and anything git-ignored @@ -78,16 +81,6 @@ done < <(find . -name "*.sh" \ -path ./vendor\* \ \)) -# make sure known failures are sorted -failure_file="${KUBE_ROOT}/hack/.shellcheck_failures" -kube::util::check-file-in-alphabetical-order "${failure_file}" - -# load known failure files -failing_files=() -while IFS=$'\n' read -r script; - do failing_files+=("$script"); -done < <(cat "${failure_file}") - # detect if the host machine has the required shellcheck version installed # if so, we will use that instead. HAVE_SHELLCHECK=false @@ -119,7 +112,6 @@ fi # lint each script, tracking failures errors=() -not_failing=() for f in "${all_shell_scripts[@]}"; do set +o errexit if ${HAVE_SHELLCHECK}; then @@ -129,18 +121,14 @@ for f in "${all_shell_scripts[@]}"; do shellcheck --exclude="${SHELLCHECK_DISABLED}" "${f}") fi set -o errexit - kube::util::array_contains "${f}" "${failing_files[@]}" && in_failing=$? || in_failing=$? - if [[ -n "${failedLint}" ]] && [[ "${in_failing}" -ne "0" ]]; then - errors+=( "${failedLint}" ) - fi - if [[ -z "${failedLint}" ]] && [[ "${in_failing}" -eq "0" ]]; then - not_failing+=( "${f}" ) + if [[ -n "${failedLint}" ]]; then + errors+=( "${failedLint}" ) fi done # Check to be sure all the packages that should pass lint are. if [ ${#errors[@]} -eq 0 ]; then - echo 'Congratulations! All shell files are passing lint (excluding those in hack/.shellcheck_failures).' + echo 'Congratulations! All shell files are passing lint.' else { echo "Errors from shellcheck:" @@ -149,38 +137,9 @@ else done echo echo 'Please review the above warnings. You can test via "./hack/verify-shellcheck"' - echo 'If the above warnings do not make sense, you can exempt this package from shellcheck' - echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).' - echo - } >&2 - false -fi - -if [[ ${#not_failing[@]} -gt 0 ]]; then - { - echo "Some packages in hack/.shellcheck_failures are passing shellcheck. Please remove them." - echo - for f in "${not_failing[@]}"; do - echo " $f" - done - echo - } >&2 - false -fi - -# Check that all failing_packages actually still exist -gone=() -for f in "${failing_files[@]}"; do - kube::util::array_contains "$f" "${all_shell_scripts[@]}" || gone+=( "$f" ) -done - -if [[ ${#gone[@]} -gt 0 ]]; then - { - echo "Some files in hack/.shellcheck_failures do not exist anymore. Please remove them." - echo - for f in "${gone[@]}"; do - echo " $f" - done + echo 'If the above warnings do not make sense, you can exempt them from shellcheck' + echo 'checking by adding the "shellcheck disable" directive' + echo '(https://github.com/koalaman/shellcheck/wiki/Directive#disable).' echo } >&2 false From 2245a17fa0c6973ffea70319b493d95df70c7b25 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 26 Mar 2019 13:09:00 +0100 Subject: [PATCH 021/299] build.make: integrate shellcheck into "make test" By default this only tests the scripts inside the "release-tools" directory, which is useful when making experimental changes to them in a component that uses csi-release-tools. But a component can also enable checking for other directories. --- .../README.md | 12 ++++++++++++ .../build.make | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 56d2248c..cb028154 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -49,3 +49,15 @@ Cheat sheet: - `git subtree add --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once) - `git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes) - edit, `git commit`, `git subtree push --prefix=release-tools git@github.com:/csi-release-tools.git ` - push to a new branch before submitting a PR + +verify-shellcheck.sh +-------------------- + +The [verify-shellcheck.sh](./verify-shellcheck.sh) script in this repo +is a stripped down copy of the [corresponding +script](https://github.com/kubernetes/kubernetes/blob/release-1.14/hack/verify-shellcheck.sh) +in the Kubernetes repository. It can be used to check for certain +errors shell scripts, like missing quotation marks. The default +`test-shellcheck` target in [build.make](./build.make) only checks the +scripts in this directory. Components can add more directories to +`TEST_SHELLCHECK_DIRS` to check also other scripts. diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 6ea32795..3cac9d30 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -122,3 +122,18 @@ test: test-subtree test-subtree: @ echo; echo "### $@:" ./release-tools/verify-subtree.sh release-tools + +# Components can extend the set of directories which must pass shellcheck. +# The default is to check only the release-tools directory itself. +TEST_SHELLCHECK_DIRS=release-tools +.PHONY: test-shellcheck +test: test-shellcheck +test-shellcheck: + @ echo; echo "### $@:" + @ ret=0; \ + for dir in $(abspath $(TEST_SHELLCHECK_DIRS)); do \ + echo; \ + echo "$$dir:"; \ + ./release-tools/verify-shellcheck.sh "$$dir" || ret=1; \ + done; \ + return $$ret From b782eb4901716347cc5d1f6870d61ed4af5fa0a3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 15 Mar 2019 16:45:16 +0100 Subject: [PATCH 022/299] initial Prow test job This enables testing of other repos and of this repo itself inside Prow. Currently supported is unit testing ("make test") and E2E testing (either via a local test suite or the Kubernetes E2E test suite applied to the hostpath driver example deployment). The script passes shellcheck and uses Prow to verify that for future PRs. --- .../.prow.sh | 7 + .../README.md | 45 + .../filter-junit.go | 133 +++ .../prow.sh | 916 ++++++++++++++++++ 4 files changed, 1101 insertions(+) create mode 100755 container-object-storage-interface-controller/.prow.sh create mode 100644 container-object-storage-interface-controller/filter-junit.go create mode 100755 container-object-storage-interface-controller/prow.sh diff --git a/container-object-storage-interface-controller/.prow.sh b/container-object-storage-interface-controller/.prow.sh new file mode 100755 index 00000000..b18c5358 --- /dev/null +++ b/container-object-storage-interface-controller/.prow.sh @@ -0,0 +1,7 @@ +#! /bin/bash -e +# +# This is for testing csi-release-tools itself in Prow. All other +# repos use prow.sh for that, but as csi-release-tools isn't a normal +# repo with some Go code in it, it has a custom Prow test script. + +./verify-shellcheck.sh "$(pwd)" diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index cb028154..bc061aee 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -61,3 +61,48 @@ errors shell scripts, like missing quotation marks. The default `test-shellcheck` target in [build.make](./build.make) only checks the scripts in this directory. Components can add more directories to `TEST_SHELLCHECK_DIRS` to check also other scripts. + +End-to-end testing +------------------ + +A repo that wants to opt into testing via Prow must set up a top-level +`.prow.sh`. Typically that will source `prow.sh` and then transfer +control to it: + +``` bash +#! /bin/bash -e + +. release-tools/prow.sh +main +``` + +All Kubernetes-CSI repos are expected to switch to Prow. For details +on what is enabled in Prow, see +https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-csi + +Test results for periodic jobs are visible in +https://testgrid.k8s.io/sig-storage-csi + +It is possible to reproduce the Prow testing locally on a suitable machine: +- Linux host +- Docker installed +- code to be tested checkout out in `$GOPATH/src/` +- `cd $GOPATH/src/ && ./.prow.sh` + +Beware that the script intentionally doesn't clean up after itself and +modifies the content of `$GOPATH`, in particular the `kubernetes` and +`kind` repositories there. Better run it in an empty, disposable +`$GOPATH`. + +When it terminates, the following command can be used to get access to +the Kubernetes cluster that was brought up for testing (assuming that +this step succeeded): + + export KUBECONFIG="$(kind get kubeconfig-path --name="csi-prow")" + +It is possible to control the execution via environment variables. See +`prow.sh` for details. Particularly useful is testing against different +Kubernetes releases: + + CSI_PROW_KUBERNETES_VERSION=1.13.3 ./.prow.sh + CSI_PROW_KUBERNETES_VERSION=latest ./.prow.sh diff --git a/container-object-storage-interface-controller/filter-junit.go b/container-object-storage-interface-controller/filter-junit.go new file mode 100644 index 00000000..2f51be00 --- /dev/null +++ b/container-object-storage-interface-controller/filter-junit.go @@ -0,0 +1,133 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* + * This command filters a JUnit file such that only tests with a name + * matching a regular expression are passed through. By concatenating + * multiple input files it is possible to merge them into a single file. + */ +package main + +import ( + "encoding/xml" + "flag" + "io/ioutil" + "os" + "regexp" +) + +var ( + output = flag.String("o", "-", "junit file to write, - for stdout") + tests = flag.String("t", "", "regular expression matching the test names that are to be included in the output") +) + +/* + * TestSuite represents a JUnit file. Due to how encoding/xml works, we have + * represent all fields that we want to be passed through. It's therefore + * not a complete solution, but good enough for Ginkgo + Spyglass. + */ +type TestSuite struct { + XMLName string `xml:"testsuite"` + TestCases []TestCase `xml:"testcase"` +} + +type TestCase struct { + Name string `xml:"name,attr"` + Time string `xml:"time,attr"` + SystemOut string `xml:"system-out,omitempty"` + Failure string `xml:"failure,omitempty"` + Skipped SkipReason `xml:"skipped,omitempty"` +} + +// SkipReason deals with the special : +// if present, we must re-encode it, even if empty. +type SkipReason string + +func (s *SkipReason) UnmarshalText(text []byte) error { + *s = SkipReason(text) + if *s == "" { + *s = " " + } + return nil +} + +func (s SkipReason) MarshalText() ([]byte, error) { + if s == " " { + return []byte{}, nil + } + return []byte(s), nil +} + +func main() { + var junit TestSuite + var data []byte + + flag.Parse() + + re := regexp.MustCompile(*tests) + + // Read all input files. + for _, input := range flag.Args() { + if input == "-" { + if _, err := os.Stdin.Read(data); err != nil { + panic(err) + } + } else { + var err error + data, err = ioutil.ReadFile(input) + if err != nil { + panic(err) + } + } + if err := xml.Unmarshal(data, &junit); err != nil { + panic(err) + } + } + + // Keep only matching testcases. Testcases skipped in all test runs are only stored once. + filtered := map[string]TestCase{} + for _, testcase := range junit.TestCases { + if !re.MatchString(testcase.Name) { + continue + } + entry, ok := filtered[testcase.Name] + if !ok || // not present yet + entry.Skipped != "" && testcase.Skipped == "" { // replaced skipped test with real test run + filtered[testcase.Name] = testcase + } + } + junit.TestCases = nil + for _, testcase := range filtered { + junit.TestCases = append(junit.TestCases, testcase) + } + + // Re-encode. + data, err := xml.MarshalIndent(junit, "", " ") + if err != nil { + panic(err) + } + + // Write to output. + if *output == "-" { + if _, err := os.Stdout.Write(data); err != nil { + panic(err) + } + } else { + if err := ioutil.WriteFile(*output, data, 0644); err != nil { + panic(err) + } + } +} diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh new file mode 100755 index 00000000..17e8ae4a --- /dev/null +++ b/container-object-storage-interface-controller/prow.sh @@ -0,0 +1,916 @@ +#! /bin/bash +# +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# This script runs inside a Prow job. It runs unit tests ("make test") +# and E2E testing. This E2E testing covers different scenarios (see +# https://github.com/kubernetes/enhancements/pull/807): +# - running the stable hostpath example against a Kubernetes release +# - running the canary hostpath example against a Kubernetes release +# - building the component in the current repo and running the +# stable hostpath example with that one component replaced against +# a Kubernetes release +# +# The intended usage of this script is that individual repos import +# csi-release-tools, then link their top-level prow.sh to this or +# include it in that file. When including it, several of the variables +# can be overridden in the top-level prow.sh to customize the script +# for the repo. +# +# The expected environment is: +# - $GOPATH/src/ for the repository that is to be tested, +# with PR branch merged (when testing a PR) +# - running on linux-amd64 +# - bazel installed (when testing against Kubernetes master), must be recent +# enough for Kubernetes master +# - kind (https://github.com/kubernetes-sigs/kind) installed +# - optional: Go already installed + +# Sets the default value for a variable if not set already and logs the value. +# Any variable set this way is usually something that a repo's .prow.sh +# or the job can set. +configvar () { + # Ignore: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"? + # shellcheck disable=SC2140 + eval : \$\{"$1":="\$2"\} + eval echo "\$3:" "$1=\${$1}" +} + +# Go versions can be specified seperately for different tasks +# If the pre-installed Go is missing or a different +# version, the required version here will get installed +# from https://golang.org/dl/. +configvar CSI_PROW_GO_VERSION_BUILD 1.11.4 "Go version for building the component" # depends on component's source code +configvar CSI_PROW_GO_VERSION_K8S 1.12.1 "Go version for building Kubernetes for the test cluster" # depends on Kubernetes version +configvar CSI_PROW_GO_VERSION_E2E 1.12.1 "Go version for building the Kubernetes E2E test suite" # depends on CSI_PROW_E2E settings below +configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below +configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below +configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below + +# kind version to use. If the pre-installed version is different, +# the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ +# (if available), otherwise it is built from source. +configvar CSI_PROW_KIND_VERSION 0.2.1 "kind" + +# ginkgo test runner version to use. If the pre-installed version is +# different, the desired version is built from source. +configvar CSI_PROW_GINKGO_VERSION v1.7.0 "Ginkgo" + +# Ginkgo runs the E2E test in parallel. The default is based on the number +# of CPUs, but typically this can be set to something higher in the job. +configvar CSI_PROW_GINKO_PARALLEL "-p" "Ginko parallelism parameter(s)" + +# Enables building the code in the repository. On by default, can be +# disabled in jobs which only use pre-built components. +configvar CSI_PROW_BUILD_JOB true "building code in repo enabled" + +# Kubernetes version to test against. This must be a version number +# (like 1.13.3) for which there is a pre-built kind image (see +# https://hub.docker.com/r/kindest/node/tags), "latest" (builds +# Kubernetes from the master branch) or "release-x.yy" (builds +# Kubernetes from a release branch). +# +# This can also be a version that was not released yet at the time +# that the settings below were chose. The script will then +# use the same settings as for "latest" Kubernetes. This works +# as long as there are no breaking changes in Kubernetes, like +# deprecating or changing the implementation of an alpha feature. +configvar CSI_PROW_KUBERNETES_VERSION 1.13.3 "Kubernetes" + +# CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and +# with underscore (1_13 instead of 1.13.3) and in uppercase (LATEST +# instead of latest). +# +# This is used to derive the right defaults for the variables below +# when a Prow job just defines the Kubernetes version. +csi_prow_kubernetes_version_suffix="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | tr . _ | tr '[:lower:]' '[:upper:]' | sed -e 's/^RELEASE-//' -e 's/\([0-9]*\)_\([0-9]*\).*/\1_\2/')" + +# Work directory. It has to allow running executables, therefore /tmp +# is avoided. Cleaning up after the script is intentionally left to +# the caller. +configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csiprow.XXXXXXXXXX")" "work directory" + +# The hostpath deployment script is searched for in several places. +# +# - The "deploy" directory in the current repository: this is useful +# for the situation that a component becomes incompatible with the +# shared deployment, because then it can (temporarily!) provide its +# own example until the shared one can be updated; it's also how +# csi-driver-host-path itself provides the example. +# +# - CSI_PROW_HOSTPATH_VERSION of the CSI_PROW_HOSTPATH_REPO is checked +# out: this allows other repos to reference a version of the example +# that is known to be compatible. +# +# - The csi-driver-host-path/deploy directory has multiple sub-directories, +# each with different deployments (stable set of images for Kubernetes 1.13, +# stable set of images for Kubernetes 1.14, canary for latest Kubernetes, etc.). +# This is necessary because there may be incompatible changes in the +# "API" of a component (for example, its command line options or RBAC rules) +# or in its support for different Kubernetes versions (CSIDriverInfo as +# CRD in Kubernetes 1.13 vs builtin API in Kubernetes 1.14). +# +# When testing an update for a component in a PR job, the +# CSI_PROW_DEPLOYMENT variable can be set in the +# .prow.sh of each component when there are breaking changes +# that require using a non-default deployment. The default +# is a deployment named "kubernetes-x.yy" (if available), +# otherwise "kubernetes-latest". +# "none" disables the deployment of the hostpath driver. +# +# When no deploy script is found (nothing in `deploy` directory, +# CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. +# +# TODO: merge https://github.com/kubernetes-csi/csi-driver-host-path/pull/29, switch to revision from master +configvar CSI_PROW_HOSTPATH_VERSION deployment "hostpath driver" +configvar CSI_PROW_HOSTPATH_REPO https://github.com/pohly/csi-driver-host-path "hostpath repo" +# Ignore 'See if you can use ${variable//search/replace} instead.' +# shellcheck disable=SC2001 +configvar CSI_PROW_DEPLOYMENT "" "deployment" + +# If CSI_PROW_HOSTPATH_CANARY is set (typically to "canary", but also +# "1.0-canary"), then all image versions are replaced with that +# version tag. +configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" + +# The E2E testing can come from an arbitrary repo. The expectation is that +# the repo supports "go test ./test/e2e -args --storage.testdriver" (https://github.com/kubernetes/kubernetes/pull/72836) +# after setting KUBECONFIG. As a special case, if the repository is Kubernetes, +# then `make WHAT=test/e2e/e2e.test` is called first to ensure that +# all generated files are present. +# +# CSI_PROW_E2E_REPO=none disables E2E testing. +configvar CSI_PROW_E2E_VERSION v1.14.0 "E2E version" +configvar CSI_PROW_E2E_REPO https://github.com/kubernetes/kubernetes "E2E repo" +configvar CSI_PROW_E2E_IMPORT_PATH k8s.io/kubernetes "E2E package" + +# csi-sanity testing from the csi-test repo can be run against the installed +# CSI driver. For this to work, deploying the driver must expose the Unix domain +# csi.sock as a TCP service for use by the csi-sanity command, which runs outside +# of the cluster. The alternative would have been to (cross-)compile csi-sanity +# and install it inside the cluster, which is not necessarily easier. +configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo" +configvar CSI_PROW_SANITY_VERSION 5421d9f3c37be3b95b241b44a094a3db11bee789 "csi-test version" # latest master +configvar CSI_PROW_SANITY_IMPORT_PATH github.com/kubernetes-csi/csi-test "csi-test package" +configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock" +configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver" +configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI driver" + +# Each job can run one or more of the following tests, identified by +# a single word: +# - unit testing +# - parallel excluding alpha features +# - serial excluding alpha features +# - parallel, only alpha feature +# - serial, only alpha features +# - sanity +# +# Sanity testing with csi-sanity only covers the CSI driver itself and thus +# is off by default. A CSI driver can change that default in its .prow.sh +# by setting CSI_PROW_TESTS_SANITY. +configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run" +test_enabled () { + echo "${CSI_PROW_TESTS}" | grep -q -w -e "$1" +} + +# Serial vs. parallel is always determined by these regular expressions. +# Individual regular expressions are seperated by spaces for readability +# and expected to not contain spaces. Use dots instead. The complete +# regex for Ginkgo will be created by joining the individual terms. +configvar CSI_PROW_E2E_SERIAL '\[Serial\] \[Disruptive\]' "tags for serial E2E tests" +regex_join () { + echo "$@" | sed -e 's/ */|/g' -e 's/^|*//' -e 's/|*$//' -e 's/^$/this-matches-nothing/g' +} + +# Prints the value of a variable + version suffix, falling back to variable + "LATEST". +get_versioned_variable () { + local var="$1" + local version="$2" + local value + + eval value="\${${var}_${version}}" + if ! [ "$value" ]; then + eval value="\${${var}_LATEST}" + fi + echo "$value" +} + +# Which tests are alpha depends on the Kubernetes version. The same +# E2E test suite is used for all Kubernetes versions, including older +# Kubernetes. +# +# Feature tags in the test are set based on what is an alpha +# feature in the Kubernetes version that contains the E2E test suite's +# source code. +# +# So when testing against an older Kubernetes release, some tests +# might be enabled by default which don't pass for that older +# Kubernetes version. In that case, the +# CSI_PROW_E2E_ALPHA_ variable cannot just +# be based on the `Feature` tag, it also must contain the names +# of tests that used to be alpha but no longer have that tag. +# +# is just major+minor version separated by +# underscore. "latest" matches master. It is also used for +# unknown versions, so when master gets released there is +# no need to add a new versioned variable. That only needs to be +# done when updating something in the configuration that leads +# to "latest" no longer being suitable. +configvar CSI_PROW_E2E_ALPHA_1_13 '\[Feature: \[Testpattern:.Dynamic.PV..block.volmode.\] should.create.and.delete.block.persistent.volumes' "alpha tests for Kubernetes 1.13" # Raw block was an alpha feature in 1.13. +configvar CSI_PROW_E2E_ALPHA_LATEST '\[Feature:' "alpha tests for Kubernetes master" +configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi_prow_kubernetes_version_suffix}")" "alpha tests" + +# After the parallel E2E test without alpha features, a test cluster +# with alpha features is brought up and tests that were previously +# disabled are run. The alpha gates in each release have to be listed +# explicitly. If none are set (= variable empty), alpha testing +# is skipped. +# +# Testing against "latest" Kubernetes is problematic because some alpha +# feature which used to work might stop working or change their behavior +# such that the current tests no longer pass. If that happens, +# kubernetes-csi components must be updated, either by disabling +# the failing test for "latest" or by updating the test and not running +# it anymore for older releases. +configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" + +# Some tests are known to be unusable in a KinD cluster. For example, +# stopping kubelet with "ssh systemctl stop kubelet" simply +# doesn't work. Such tests should be written in a way that they verify +# whether they can run with the current cluster provider, but until +# they are, we filter them out by name. Like the other test selection +# variables, this is again a space separated list of regular expressions. +configvar CSI_PROW_E2E_SKIP 'while.kubelet.is.down.*Disruptive' "tests that need to be skipped" + +# This is the directory for additional result files. Usually set by Prow, but +# if not (for example, when invoking manually) it defaults to the work directory. +configvar ARTIFACTS "${CSI_PROW_WORK}/artifacts" "artifacts" +mkdir -p "${ARTIFACTS}" + +RELEASE_TOOLS_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +REPO_DIR="$(pwd)" + +run () { + echo "$(date) $(go version | sed -e 's/.*version \(go[^ ]*\).*/\1/') $(if [ "$(pwd)" != "${REPO_DIR}" ]; then pwd; fi)\$" "$@" >&2 + "$@" +} + +info () { + echo >&2 INFO: "$@" +} + +warn () { + echo >&2 WARNING: "$@" +} + +die () { + echo >&2 ERROR: "$@" + exit 1 +} + +# For additional tools. +CSI_PROW_BIN="${CSI_PROW_WORK}/bin" +mkdir -p "${CSI_PROW_BIN}" +PATH="${CSI_PROW_BIN}:$PATH" + +# Ensure that PATH has the desired version of the Go tools, then run command given as argument. +run_with_go () { + local version + version="$1" + shift + + if go version 2>/dev/null | grep -q "go$version"; then + run "$@" + else + if ! [ -d "${CSI_PROW_WORK}/go-$version" ]; then + run curl --fail --location "https://dl.google.com/go/go$version.linux-amd64.tar.gz" | tar -C "${CSI_PROW_WORK}" -zxf - || die "installation of Go $version failed" + mv "${CSI_PROW_WORK}/go" "${CSI_PROW_WORK}/go-$version" + fi + PATH="${CSI_PROW_WORK}/go-$version/bin:$PATH" run "$@" + fi +} + +# Ensure that we have the desired version of kind. +install_kind () { + if kind --version 2>/dev/null | grep -q " ${CSI_PROW_KIND_VERSION}$"; then + return + fi + if run curl --fail --location -o "${CSI_PROW_WORK}/bin/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${CSI_PROW_KIND_VERSION}/kind-linux-amd64"; then + chmod u+x "${CSI_PROW_WORK}/bin/kind" + else + git_checkout https://github.com/kubernetes-sigs/kind "$GOPATH/src/sigs.k8s.io/kind" "${CSI_PROW_KIND_VERSION}" --depth=1 && + run_with_go "${CSI_PROW_GO_VERSION_KIND}" go build -o "${CSI_PROW_WORK}/bin/kind" sigs.k8s.io/kind + fi +} + +# Ensure that we have the desired version of the ginkgo test runner. +install_ginkgo () { + # CSI_PROW_GINKGO_VERSION contains the tag with v prefix, the command line output does not. + if [ "v$(ginkgo version 2>/dev/null | sed -e 's/.* //')" = "${CSI_PROW_GINKGO_VERSION}" ]; then + return + fi + git_checkout https://github.com/onsi/ginkgo "$GOPATH/src/github.com/onsi/ginkgo" "${CSI_PROW_GINKGO_VERSION}" --depth=1 && + # We have to get dependencies and hence can't call just "go build". + run_with_go "${CSI_PROW_GO_VERSION_GINKGO}" go get github.com/onsi/ginkgo/ginkgo || die "building ginkgo failed" && + mv "$GOPATH/bin/ginkgo" "${CSI_PROW_BIN}" +} + +# This checks out a repo ("https://github.com/kubernetes/kubernetes") +# in a certain location ("$GOPATH/src/k8s.io/kubernetes") at +# a certain revision (a hex commit hash, v1.13.1, master). It's okay +# for that directory to exist already. +git_checkout () { + local repo path revision + repo="$1" + shift + path="$1" + shift + revision="$1" + shift + + mkdir -p "$path" + if ! [ -d "$path/.git" ]; then + run git init "$path" + fi + if (cd "$path" && run git fetch "$@" "$repo" "$revision"); then + (cd "$path" && run git checkout FETCH_HEAD) || die "checking out $repo $revision failed" + else + # Might have been because fetching by revision is not + # supported by GitHub (https://github.com/isaacs/github/issues/436). + # Fall back to fetching everything. + (cd "$path" && run git fetch "$repo" '+refs/heads/*:refs/remotes/csiprow/heads/*' '+refs/tags/*:refs/tags/*') || die "fetching $repo failed" + (cd "$path" && run git checkout "$revision") || die "checking out $repo $revision failed" + fi +} + +list_gates () ( + set -f; IFS=',' + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + set -- $1 + while [ "$1" ]; do + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + echo "$1" | sed -e 's/ *\([^ =]*\) *= *\([^ ]*\) */ \1: \2/' + shift + done +) + +csi_prow_kind_have_kubernetes=false +# Brings up a Kubernetes cluster and sets KUBECONFIG. +# Accepts additional feature gates in the form gate1=true|false,gate2=... +start_cluster () { + local image gates + gates="$1" + + if kind get clusters | grep -q csi-prow; then + run kind delete cluster --name=csi-prow || die "kind delete failed" + fi + + # Build from source? + if [[ "${CSI_PROW_KUBERNETES_VERSION}" =~ ^release-|^latest$ ]]; then + if ! ${csi_prow_kind_have_kubernetes}; then + local version="${CSI_PROW_KUBERNETES_VERSION}" + if [ "$version" = "latest" ]; then + version=master + fi + git_checkout https://github.com/kubernetes/kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version" --depth=1 || die "checking out Kubernetes $version failed" + + # "kind build" and/or the Kubernetes build rules need at least one tag, which we don't have + # when doing a shallow fetch. Therefore we fake one. For some reason, v1.0.0 didn't work + # while v1.14.0-fake.1 did. + (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f v1.14.0-fake.1) || die "git tag failed" + + run_with_go "${CSI_PROW_GO_VERSION_K8S}" kind build node-image --type bazel --image csiprow/node:latest --kube-root "$GOPATH/src/k8s.io/kubernetes" || die "'kind build node-image' failed" + csi_prow_kind_have_kubernetes=true + fi + image="csiprow/node:latest" + else + image="kindest/node:v${CSI_PROW_KUBERNETES_VERSION}" + fi + cat >"${CSI_PROW_WORK}/kind-config.yaml" </dev/null; wait) + info "For container output see job artifacts." + die "deploying the hostpath driver with ${deploy_hostpath} failed" + fi +} + +# collect logs and cluster status (like the version of all components, Kubernetes version, test version) +collect_cluster_info () { + cat <>"${ARTIFACTS}/$pod/$container.log" & + echo "$!" + done + done +} + +# Makes the E2E test suite binary available as "${CSI_PROW_WORK}/e2e.test". +install_e2e () { + if [ -e "${CSI_PROW_WORK}/e2e.test" ]; then + return + fi + + git_checkout "${CSI_PROW_E2E_REPO}" "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}" --depth=1 && + if [ "${CSI_PROW_E2E_IMPORT_PATH}" = "k8s.io/kubernetes" ]; then + run_with_go "${CSI_PROW_GO_VERSION_E2E}" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && + ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/e2e.test" "${CSI_PROW_WORK}" + else + run_with_go "${CSI_PROW_GO_VERSION_E2E}" go test -c -o "${CSI_PROW_WORK}/e2e.test" "${CSI_PROW_E2E_IMPORT_PATH}/test/e2e" + fi +} + +# Makes the csi-sanity test suite binary available as +# "${CSI_PROW_WORK}/csi-sanity". +install_sanity () ( + if [ -e "${CSI_PROW_WORK}/csi-sanity" ]; then + return + fi + + git_checkout "${CSI_PROW_SANITY_REPO}" "${GOPATH}/src/${CSI_PROW_SANITY_IMPORT_PATH}" "${CSI_PROW_SANITY_VERSION}" --depth=1 || die "checking out csi-sanity failed" + run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test -c -o "${CSI_PROW_WORK}/csi-sanity" "${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity" || die "building csi-sanity failed" +) + +# Whether the hostpath driver supports raw block devices depends on which version +# we are testing. It would be much nicer if we could determine that by querying the +# installed driver. +hostpath_supports_block () { + if [ -e "cmd/hostpathplugin" ] && ${CSI_PROW_BUILD_JOB}; then + # The assumption is that if we build the hostpath driver, then it is + # a current version with support. + echo true + return + fi + + case "${CSI_PROW_DEPLOYMENT}" in kubernetes-1.13) echo false;; # wasn't supported and probably won't be backported + *) echo true;; # probably all other deployments have a recent driver + esac +} + +# Captures pod output while running some other command. +run_with_loggers () ( + loggers=$(start_loggers -f) + trap 'kill $loggers' EXIT + + run "$@" +) + +# Invokes the filter-junit.go tool. +run_filter_junit () { + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" go run "${RELEASE_TOOLS_ROOT}/filter-junit.go" "$@" +} + +# Runs the E2E test suite in a sub-shell. +run_e2e () ( + name="$1" + shift + + install_e2e || die "building e2e.test failed" + install_ginkgo || die "installing ginkgo failed" + + # TODO (?): multi-node cluster (depends on https://github.com/kubernetes-csi/csi-driver-host-path/pull/14). + # When running on a multi-node cluster, we need to figure out where the + # hostpath driver was deployed and set ClientNodeName accordingly. + + # The content of this file depends on both what the E2E suite expects and + # what the installed hostpath driver supports. Generating it here seems + # prone to breakage, but it is uncertain where a better place might be. + cat >"${CSI_PROW_WORK}/hostpath-test-driver.yaml" </dev/null >/dev/null; then + run_filter_junit -t="External Storage" -o "${ARTIFACTS}/junit_${name}.xml" "${ARTIFACTS}"/junit_[0-9]*.xml && rm -f "${ARTIFACTS}"/junit_[0-9]*.xml + fi + } + trap move_junit EXIT + + cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && + run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/hostpath-test-driver.yaml" +) + +# Run csi-sanity against installed CSI driver. +run_sanity () ( + install_sanity || die "installing csi-sanity failed" + + cat >"${CSI_PROW_WORK}/mkdir_in_pod.sh" <"${CSI_PROW_WORK}/rmdir_in_pod.sh" </\>/g' -e 's/\x1B...//g' +} + +# The "make test" output starts each test with "### :" +# and then ends when the next test starts or with "make: *** +# [] Error 1" when there was a failure. Here we read each +# line of that output, split it up into individual tests and generate +# a make-test.xml file in JUnit format. +make_test_to_junit () { + local ret out testname testoutput + ret=0 + # Plain make-test.xml was not delivered as text/xml by the web + # server and ignored by spyglass. It seems that the name has to + # match junit*.xml. + out="${ARTIFACTS}/junit_make_test.xml" + testname= + echo "" >>"$out" + + while IFS= read -r line; do + echo "$line" # pass through + if echo "$line" | grep -q "^### [^ ]*:$"; then + if [ "$testname" ]; then + # previous test succesful + echo " " >>"$out" + echo " " >>"$out" + fi + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + # + # start new test + testname="$(echo "$line" | sed -e 's/^### \([^ ]*\):$/\1/')" + testoutput= + echo " " >>"$out" + echo " " >>"$out" + elif echo "$line" | grep -q '^make: .*Error [0-9]*$'; then + if [ "$testname" ]; then + # Ignore: Consider using { cmd1; cmd2; } >> file instead of individual redirects. + # shellcheck disable=SC2129 + # + # end test with failure + echo " " >>"$out" + # Include the same text as in also in , + # because then it is easier to view in spyglass (shown directly + # instead of having to click through to stdout). + echo " " >>"$out" + echo -n "$testoutput" | ascii_to_xml >>"$out" + echo " " >>"$out" + echo " " >>"$out" + fi + # remember failure for exit code + ret=1 + # not currently inside a test + testname= + else + if [ "$testname" ]; then + # Test output. + echo "$line" | ascii_to_xml >>"$out" + testoutput="$testoutput$line +" + fi + fi + done + # if still in a test, close it now + if [ "$testname" ]; then + echo " " >>"$out" + echo " " >>"$out" + fi + echo "" >>"$out" + + # this makes the error more visible in spyglass + if [ "$ret" -ne 0 ]; then + echo "ERROR: 'make test' failed" + return 1 + fi +} + +main () { + local images ret + ret=0 + + images= + if ${CSI_PROW_BUILD_JOB}; then + # A successful build is required for testing. + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all || die "'make all' failed" + # We don't want test failures to prevent E2E testing below, because the failure + # might have been minor or unavoidable, for example when experimenting with + # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" + # test). + if test_enabled "unit"; then + if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test 2>&1 | make_test_to_junit; then + warn "'make test' failed, proceeding anyway" + ret=1 + fi + fi + # Required for E2E testing. + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container || die "'make container' failed" + fi + + install_kind || die "installing kind failed" + start_cluster || die "starting the cluster failed" + + if ${CSI_PROW_BUILD_JOB}; then + cmds="$(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//')" + # Get the image that was just built (if any) from the + # top-level Makefile CMDS variable and set the + # deploy-hostpath.sh env variables for it. We also need to + # side-load those images into the cluster. + for i in $cmds; do + e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) + images="$images ${e}_REGISTRY=none ${e}_TAG=csiprow" + + # We must avoid the tag "latest" because that implies + # always pulling the image + # (https://github.com/kubernetes-sigs/kind/issues/328). + docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed" + kind load docker-image --name csi-prow "$i:csiprow" || die "could not load the $i:latest image into the kind cluster" + done + + if [ -e deploy/kubernetes/rbac.yaml ]; then + # This is one of those components which has its own RBAC rules (like external-provisioner). + # We are testing a locally built image and also want to test with the the current, + # potentially modified RBAC rules. + if [ "$(echo "$cmds" | wc -w)" != 1 ]; then + die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds" + fi + e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _) + images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml" + fi + fi + + # Installing the driver might be disabled, in which case we bail out early. + if ! install_hostpath "$images"; then + info "hostpath driver installation disabled, skipping E2E testing" + return "$ret" + fi + + collect_cluster_info + + if test_enabled "sanity"; then + if ! run_sanity; then + ret=1 + fi + fi + + if test_enabled "parallel"; then + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ + -focus="External.Storage" \ + -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E parallel failed" + ret=1 + fi + fi + + if test_enabled "serial"; then + if ! run_e2e serial \ + -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_SERIAL}"))" \ + -skip="$(regex_join "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E serial failed" + ret=1 + fi + fi + + if (test_enabled "parallel-alpha" || test_enabled "serial-alpha") && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then + # Need to (re)create the cluster. + start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed" + if ${CSI_PROW_BUILD_JOB}; then + # Ignore: Double quote to prevent globbing and word splitting. + # Ignore: To read lines rather than words, pipe/redirect to a 'while read' loop. + # shellcheck disable=SC2086 disable=SC2013 + for i in $(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//'); do + kind load docker-image --name csi-prow $i:csiprow || die "could not load the $i:latest image into the kind cluster" + done + fi + install_hostpath "$images" || die "hostpath driver installation failed unexpectedly on alpha cluster" + + if test_enabled "parallel-alpha"; then + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + if ! run_e2e parallel-alpha ${CSI_PROW_GINKO_PARALLEL} \ + -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_ALPHA}"))" \ + -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E parallel alpha failed" + ret=1 + fi + fi + + if test_enabled "serial-alpha"; then + if ! run_e2e serial-alpha \ + -focus="External.Storage.*(($(regex_join "${CSI_PROW_E2E_SERIAL}")).*($(regex_join "${CSI_PROW_E2E_ALPHA}"))|($(regex_join "${CSI_PROW_E2E_ALPHA}")).*($(regex_join "${CSI_PROW_E2E_SERIAL}")))" \ + -skip="$(regex_join "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E serial alpha failed" + ret=1 + fi + fi + fi + + # Merge all junit files into one. This gets rid of duplicated "skipped" tests. + if ls "${ARTIFACTS}"/junit_*.xml 2>/dev/null >&2; then + run_filter_junit -o "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}"/junit_*.xml && rm "${ARTIFACTS}"/junit_*.xml && mv "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}" + fi + + return "$ret" +} From b36b3468719d11aeb05dded5a0d07cf55769b50f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 2 Apr 2019 20:53:08 +0200 Subject: [PATCH 023/299] prow.sh: comment clarification --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 17e8ae4a..faa5c361 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -15,7 +15,7 @@ # limitations under the License. -# This script runs inside a Prow job. It runs unit tests ("make test") +# This script runs inside a Prow job. It can run unit tests ("make test") # and E2E testing. This E2E testing covers different scenarios (see # https://github.com/kubernetes/enhancements/pull/807): # - running the stable hostpath example against a Kubernetes release From c1d74827b2138aa9638f758841b4df539b83e6be Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 2 Apr 2019 20:53:12 +0200 Subject: [PATCH 024/299] prow.sh: pull Go version from travis.yml The travis.yml is now the only place where the Go version for the component itself needs to be configured. --- container-object-storage-interface-controller/prow.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index faa5c361..bab7eb04 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -39,6 +39,9 @@ # - kind (https://github.com/kubernetes-sigs/kind) installed # - optional: Go already installed +RELEASE_TOOLS_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +REPO_DIR="$(pwd)" + # Sets the default value for a variable if not set already and logs the value. # Any variable set this way is usually something that a repo's .prow.sh # or the job can set. @@ -53,7 +56,10 @@ configvar () { # If the pre-installed Go is missing or a different # version, the required version here will get installed # from https://golang.org/dl/. -configvar CSI_PROW_GO_VERSION_BUILD 1.11.4 "Go version for building the component" # depends on component's source code +go_from_travis_yml () { + grep "^ *- go:" "${RELEASE_TOOLS_ROOT}/travis.yml" | sed -e 's/.*go: *//' +} +configvar CSI_PROW_GO_VERSION_BUILD "$(go_from_travis_yml)" "Go version for building the component" # depends on component's source code configvar CSI_PROW_GO_VERSION_K8S 1.12.1 "Go version for building Kubernetes for the test cluster" # depends on Kubernetes version configvar CSI_PROW_GO_VERSION_E2E 1.12.1 "Go version for building the Kubernetes E2E test suite" # depends on CSI_PROW_E2E settings below configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below @@ -262,9 +268,6 @@ configvar CSI_PROW_E2E_SKIP 'while.kubelet.is.down.*Disruptive' "tests that need configvar ARTIFACTS "${CSI_PROW_WORK}/artifacts" "artifacts" mkdir -p "${ARTIFACTS}" -RELEASE_TOOLS_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" -REPO_DIR="$(pwd)" - run () { echo "$(date) $(go version | sed -e 's/.*version \(go[^ ]*\).*/\1/') $(if [ "$(pwd)" != "${REPO_DIR}" ]; then pwd; fi)\$" "$@" >&2 "$@" From 063240a2876e05075f739f3c4751d6d011072c1f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Apr 2019 12:38:33 +0200 Subject: [PATCH 025/299] prow.sh: take Go version from Kubernetes source Using the same (recent) Go version for all Kubernetes versions can break for older versions when there are incompatible changes in Go. To avoid that, we use exactly the minimum version of Go required for each Kubernetes version. This is based on the assumption that this combination was tested successfully. When building the E2E suite from Kubernetes (the default) we do the same, but still allow building it from elsewhere. We allow the Go version to be empty when it doesn't matter. --- .../prow.sh | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index bab7eb04..6fd55cc2 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -60,8 +60,7 @@ go_from_travis_yml () { grep "^ *- go:" "${RELEASE_TOOLS_ROOT}/travis.yml" | sed -e 's/.*go: *//' } configvar CSI_PROW_GO_VERSION_BUILD "$(go_from_travis_yml)" "Go version for building the component" # depends on component's source code -configvar CSI_PROW_GO_VERSION_K8S 1.12.1 "Go version for building Kubernetes for the test cluster" # depends on Kubernetes version -configvar CSI_PROW_GO_VERSION_E2E 1.12.1 "Go version for building the Kubernetes E2E test suite" # depends on CSI_PROW_E2E settings below +configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below @@ -292,12 +291,14 @@ mkdir -p "${CSI_PROW_BIN}" PATH="${CSI_PROW_BIN}:$PATH" # Ensure that PATH has the desired version of the Go tools, then run command given as argument. +# Empty parameter uses the already installed Go. In Prow, that version is kept up-to-date by +# bumping the container image regularly. run_with_go () { local version version="$1" shift - if go version 2>/dev/null | grep -q "go$version"; then + if ! [ "$version" ] || go version 2>/dev/null | grep -q "go$version"; then run "$@" else if ! [ -d "${CSI_PROW_WORK}/go-$version" ]; then @@ -374,6 +375,20 @@ list_gates () ( done ) +go_version_for_kubernetes () ( + local path="$1" + local version="$2" + local go_version + + # We use the minimal Go version specified for each K8S release (= minimum_go_version in hack/lib/golang.sh). + # More recent versions might also work, but we don't want to count on that. + go_version="$(grep minimum_go_version= "$path/hack/lib/golang.sh" | sed -e 's/.*=go//')" + if ! [ "$go_version" ]; then + die "Unable to determine Go version for Kubernetes $version from hack/lib/golang.sh." + fi + echo "$go_version" +) + csi_prow_kind_have_kubernetes=false # Brings up a Kubernetes cluster and sets KUBECONFIG. # Accepts additional feature gates in the form gate1=true|false,gate2=... @@ -399,7 +414,8 @@ start_cluster () { # while v1.14.0-fake.1 did. (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f v1.14.0-fake.1) || die "git tag failed" - run_with_go "${CSI_PROW_GO_VERSION_K8S}" kind build node-image --type bazel --image csiprow/node:latest --kube-root "$GOPATH/src/k8s.io/kubernetes" || die "'kind build node-image' failed" + go_version="$(go_version_for_kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version")" || die "cannot proceed without knowing Go version for Kubernetes" + run_with_go "$go_version" kind build node-image --type bazel --image csiprow/node:latest --kube-root "$GOPATH/src/k8s.io/kubernetes" || die "'kind build node-image' failed" csi_prow_kind_have_kubernetes=true fi image="csiprow/node:latest" @@ -563,7 +579,8 @@ install_e2e () { git_checkout "${CSI_PROW_E2E_REPO}" "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}" --depth=1 && if [ "${CSI_PROW_E2E_IMPORT_PATH}" = "k8s.io/kubernetes" ]; then - run_with_go "${CSI_PROW_GO_VERSION_E2E}" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && + go_version="${CSI_PROW_GO_VERSION_E2E:-$(go_version_for_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}")}" && + run_with_go "$go_version" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/e2e.test" "${CSI_PROW_WORK}" else run_with_go "${CSI_PROW_GO_VERSION_E2E}" go test -c -o "${CSI_PROW_WORK}/e2e.test" "${CSI_PROW_E2E_IMPORT_PATH}/test/e2e" From cd7e441c61d234c6e9e360af8fd8204bb4bd3b3c Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Apr 2019 12:42:33 +0200 Subject: [PATCH 026/299] prow.sh: improve building Kubernetes from source While switching back and forth between release-1.13 and release-1.14 locally, there was the problem that the local kind image kept using the wrong kubelet binary despite rebuilding from source. The problem went away after cleaning the Bazel cache. Exact root cause unknown, but perhaps using unique tags and properly cleaning the repo helps. If not, then the unique tags at least will show what the problem is. --- .../prow.sh | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 6fd55cc2..a7ea66f2 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -360,6 +360,9 @@ git_checkout () { (cd "$path" && run git fetch "$repo" '+refs/heads/*:refs/remotes/csiprow/heads/*' '+refs/tags/*:refs/tags/*') || die "fetching $repo failed" (cd "$path" && run git checkout "$revision") || die "checking out $repo $revision failed" fi + # This is useful for local testing or when switching between different revisions in the same + # repo. + (cd "$path" && run git clean -fdx) || die "failed to clean $path" } list_gates () ( @@ -410,10 +413,20 @@ start_cluster () { git_checkout https://github.com/kubernetes/kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version" --depth=1 || die "checking out Kubernetes $version failed" # "kind build" and/or the Kubernetes build rules need at least one tag, which we don't have - # when doing a shallow fetch. Therefore we fake one. For some reason, v1.0.0 didn't work - # while v1.14.0-fake.1 did. - (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f v1.14.0-fake.1) || die "git tag failed" - + # when doing a shallow fetch. Therefore we fake one: + # release-1.12 -> v1.12.0-release..csiprow + # latest or -> v1.14.0-.csiprow + case "${CSI_PROW_KUBERNETES_VERSION}" in + release-*) + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + tag="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/release-\(.*\)/v\1.0-release./')";; + *) + # We have to make something up. v1.0.0 did not work for some reasons. + tag="v1.14.0-";; + esac + tag="$tag$(cd "$GOPATH/src/k8s.io/kubernetes" && git rev-list --abbrev-commit HEAD).csiprow" + (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f "$tag") || die "git tag failed" go_version="$(go_version_for_kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version")" || die "cannot proceed without knowing Go version for Kubernetes" run_with_go "$go_version" kind build node-image --type bazel --image csiprow/node:latest --kube-root "$GOPATH/src/k8s.io/kubernetes" || die "'kind build node-image' failed" csi_prow_kind_have_kubernetes=true From 836f33b0fbd1803699854b161693e621636e4c16 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Apr 2019 13:54:01 +0200 Subject: [PATCH 027/299] prow.sh: different E2E suite depending on Kubernetes version Instead of always using the latest E2E tests for all Kubernetes versions, the plan now is to use the tests that match the Kubernetes version. However, for 1.13 we have to make an exception because the suite for that version did not support the necessary --storage.testdriver parameter. --- .../prow.sh | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index a7ea66f2..c54a81b4 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -52,6 +52,19 @@ configvar () { eval echo "\$3:" "$1=\${$1}" } +# Prints the value of a variable + version suffix, falling back to variable + "LATEST". +get_versioned_variable () { + local var="$1" + local version="$2" + local value + + eval value="\${${var}_${version}}" + if ! [ "$value" ]; then + eval value="\${${var}_LATEST}" + fi + echo "$value" +} + # Go versions can be specified seperately for different tasks # If the pre-installed Go is missing or a different # version, the required version here will get installed @@ -158,9 +171,15 @@ configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" # all generated files are present. # # CSI_PROW_E2E_REPO=none disables E2E testing. -configvar CSI_PROW_E2E_VERSION v1.14.0 "E2E version" -configvar CSI_PROW_E2E_REPO https://github.com/kubernetes/kubernetes "E2E repo" -configvar CSI_PROW_E2E_IMPORT_PATH k8s.io/kubernetes "E2E package" +configvar CSI_PROW_E2E_VERSION_1_13 v1.14.0 "E2E version for Kubernetes 1.13.x" # we can't use the one from 1.13.x because it didn't have --storage.testdriver +configvar CSI_PROW_E2E_VERSION_1_14 v1.14.0 "E2E version for Kubernetes 1.14.x" +# TODO: add new CSI_PROW_E2E_VERSION entry for future Kubernetes releases +configvar CSI_PROW_E2E_VERSION_LATEST master "E2E version for Kubernetes master" # testing against Kubernetes master is already tracking a moving target, so we might as well use a moving E2E version +configvar CSI_PROW_E2E_REPO_LATEST https://github.com/kubernetes/kubernetes "E2E repo for Kubernetes >= 1.13.x" # currently the same for all versions +configvar CSI_PROW_E2E_IMPORT_PATH_LATEST k8s.io/kubernetes "E2E package for Kubernetes >= 1.13.x" # currently the same for all versions +configvar CSI_PROW_E2E_VERSION "$(get_versioned_variable CSI_PROW_E2E_VERSION "${csi_prow_kubernetes_version_suffix}")" "E2E version" +configvar CSI_PROW_E2E_REPO "$(get_versioned_variable CSI_PROW_E2E_REPO "${csi_prow_kubernetes_version_suffix}")" "E2E repo" +configvar CSI_PROW_E2E_IMPORT_PATH "$(get_versioned_variable CSI_PROW_E2E_IMPORT_PATH "${csi_prow_kubernetes_version_suffix}")" "E2E package" # csi-sanity testing from the csi-test repo can be run against the installed # CSI driver. For this to work, deploying the driver must expose the Unix domain @@ -200,42 +219,22 @@ regex_join () { echo "$@" | sed -e 's/ */|/g' -e 's/^|*//' -e 's/|*$//' -e 's/^$/this-matches-nothing/g' } -# Prints the value of a variable + version suffix, falling back to variable + "LATEST". -get_versioned_variable () { - local var="$1" - local version="$2" - local value - - eval value="\${${var}_${version}}" - if ! [ "$value" ]; then - eval value="\${${var}_LATEST}" - fi - echo "$value" -} - -# Which tests are alpha depends on the Kubernetes version. The same -# E2E test suite is used for all Kubernetes versions, including older -# Kubernetes. -# -# Feature tags in the test are set based on what is an alpha -# feature in the Kubernetes version that contains the E2E test suite's -# source code. +# Which tests are alpha depends on the Kubernetes version. We could +# use the same E2E test for all Kubernetes version. This would have +# the advantage that new tests can be applied to older versions +# without having to backport tests. # -# So when testing against an older Kubernetes release, some tests -# might be enabled by default which don't pass for that older -# Kubernetes version. In that case, the -# CSI_PROW_E2E_ALPHA_ variable cannot just -# be based on the `Feature` tag, it also must contain the names -# of tests that used to be alpha but no longer have that tag. +# But the feature tag gets removed from E2E tests when the corresponding +# feature becomes beta, so we would have to track which tests were +# alpha in previous Kubernetes releases. This was considered too +# error prone. Therefore we use E2E tests that match the Kubernetes +# version that is getting tested. # -# is just major+minor version separated by -# underscore. "latest" matches master. It is also used for -# unknown versions, so when master gets released there is -# no need to add a new versioned variable. That only needs to be -# done when updating something in the configuration that leads -# to "latest" no longer being suitable. +# However, for 1.13.x testing we have to use the E2E tests from 1.14 +# because 1.13 didn't have --storage.testdriver yet, so for that (and only +# that version) we have to define alpha tests differently. configvar CSI_PROW_E2E_ALPHA_1_13 '\[Feature: \[Testpattern:.Dynamic.PV..block.volmode.\] should.create.and.delete.block.persistent.volumes' "alpha tests for Kubernetes 1.13" # Raw block was an alpha feature in 1.13. -configvar CSI_PROW_E2E_ALPHA_LATEST '\[Feature:' "alpha tests for Kubernetes master" +configvar CSI_PROW_E2E_ALPHA_LATEST '\[Feature:' "alpha tests for Kubernetes >= 1.14" # there's no need to update this, adding a new case for CSI_PROW_E2E for a new Kubernetes is enough configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi_prow_kubernetes_version_suffix}")" "alpha tests" # After the parallel E2E test without alpha features, a test cluster @@ -251,6 +250,7 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # the failing test for "latest" or by updating the test and not running # it anymore for older releases. configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" +# TODO: add new CSI_PROW_ALPHA_GATES entry for future Kubernetes releases configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" From 160dfa62cdecd28472989068735c63ed0edfd5df Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Apr 2019 14:59:33 +0200 Subject: [PATCH 028/299] prow.sh: switch back to upstream csi-driver-host-path The temporary fork was merged, we can use the upstream repo again. --- container-object-storage-interface-controller/prow.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index c54a81b4..490fe99f 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -151,12 +151,8 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -# -# TODO: merge https://github.com/kubernetes-csi/csi-driver-host-path/pull/29, switch to revision from master -configvar CSI_PROW_HOSTPATH_VERSION deployment "hostpath driver" -configvar CSI_PROW_HOSTPATH_REPO https://github.com/pohly/csi-driver-host-path "hostpath repo" -# Ignore 'See if you can use ${variable//search/replace} instead.' -# shellcheck disable=SC2001 +configvar CSI_PROW_HOSTPATH_VERSION 486074dc3beef59955faf7bb5210418d9844e0a7 "hostpath driver" # pre-1.1.0 +configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" # If CSI_PROW_HOSTPATH_CANARY is set (typically to "canary", but also From 82b6a5d2575ab8ff728368526b54895c33bcc2a3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 5 Apr 2019 08:44:53 +0200 Subject: [PATCH 029/299] prow.sh: AllAlpha=true for unknown Kubernetes versions This ensures that also new, currently unknown alpha gates are enabled when testing against a future Kubernetes versions. For all currently known Kubernetes versions we just use the minimal set of alpha gates, which ensures that we don't miss any of them in our documentation. --- container-object-storage-interface-controller/prow.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 490fe99f..5a636bc3 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -246,8 +246,9 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # the failing test for "latest" or by updating the test and not running # it anymore for older releases. configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" +configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true' "alpha feature gates for Kubernetes 1.14" # TODO: add new CSI_PROW_ALPHA_GATES entry for future Kubernetes releases -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'AllAlpha=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Some tests are known to be unusable in a KinD cluster. For example, From ef9c9fb6efb35baab5ae2b971a10d16941b6aa10 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 08:44:10 +0200 Subject: [PATCH 030/299] prow.sh: fix running of just "alpha" tests "grep -w" treated "serial-alpha" as two words and therefore CSI_PROW_TESTS sometimes ran too many tests. --- container-object-storage-interface-controller/prow.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 5a636bc3..f39b3394 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -203,7 +203,16 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr # by setting CSI_PROW_TESTS_SANITY. configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run" test_enabled () { - echo "${CSI_PROW_TESTS}" | grep -q -w -e "$1" + local test="$1" + # We want word-splitting here, so ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + set ${CSI_PROW_TESTS} + for t in "$@"; do + if [ "$t" = "$test" ]; then + return + fi + done + return 1 } # Serial vs. parallel is always determined by these regular expressions. From 2e2513018164d2d24c2b21cbe30fa13112eb42e3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 08:47:15 +0200 Subject: [PATCH 031/299] prow.sh: fix hostpath driver version check The previous logic failed for canary jobs, those also deploy a recent driver. Instead of guessing what driver gets installed based on job parameters, check what really runs in the cluster and base the decision on that. We only need to maintain this blacklist for 1.0.x until we replace it with 1.1.0, then this entire hostpath_supports_block can be removed. --- .../prow.sh | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index f39b3394..cd041319 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -619,18 +619,18 @@ install_sanity () ( # Whether the hostpath driver supports raw block devices depends on which version # we are testing. It would be much nicer if we could determine that by querying the -# installed driver. +# installed driver's capabilities instead of having to do a version check. hostpath_supports_block () { - if [ -e "cmd/hostpathplugin" ] && ${CSI_PROW_BUILD_JOB}; then - # The assumption is that if we build the hostpath driver, then it is - # a current version with support. - echo true - return - fi - - case "${CSI_PROW_DEPLOYMENT}" in kubernetes-1.13) echo false;; # wasn't supported and probably won't be backported - *) echo true;; # probably all other deployments have a recent driver - esac + local result + result="$(docker exec csi-prow-control-plane docker image ls --format='{{.Repository}} {{.Tag}} {{.ID}}' | grep hostpath | while read -r repo tag id; do + if [ "$tag" == "v1.0.1" ]; then + # Old version because the revision label is missing: didn't have support yet. + echo "false" + return + fi + done)" + # If not set, then it must be a newer driver with support. + echo "${result:-true}" } # Captures pod output while running some other command. From 6393183f3c55bf53e059963aa0c113ce49fe57c1 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 08:51:11 +0200 Subject: [PATCH 032/299] prow.sh: more efficient execution of individual tests When running only some tests, sometimes extra, unnecessarily work was done, like bringing up the cluster without alpha gates. --- .../prow.sh | 214 ++++++++++-------- 1 file changed, 116 insertions(+), 98 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index cd041319..72be16f5 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -202,18 +202,30 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr # is off by default. A CSI driver can change that default in its .prow.sh # by setting CSI_PROW_TESTS_SANITY. configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run" -test_enabled () { - local test="$1" - # We want word-splitting here, so ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - set ${CSI_PROW_TESTS} - for t in "$@"; do - if [ "$t" = "$test" ]; then - return - fi +tests_enabled () { + local t1 t2 + # We want word-splitting here, so ignore: Quote to prevent word splitting, or split robustly with mapfile or read -a. + # shellcheck disable=SC2206 + local tests=(${CSI_PROW_TESTS}) + for t1 in "$@"; do + for t2 in "${tests[@]}"; do + if [ "$t1" = "$t2" ]; then + return + fi + done done return 1 } +tests_need_kind () { + tests_enabled "sanity" "parallel" "serial" "serial-alpha" "parallel-alpha" +} +tests_need_non_alpha_cluster () { + tests_enabled "sanity" "parallel" "serial" +} +tests_need_alpha_cluster () { + tests_enabled "parallel-alpha" "serial-alpha" +} + # Serial vs. parallel is always determined by these regular expressions. # Individual regular expressions are seperated by spaces for readability @@ -521,6 +533,15 @@ install_hostpath () { return 1 fi + if ${CSI_PROW_BUILD_JOB}; then + # Ignore: Double quote to prevent globbing and word splitting. + # Ignore: To read lines rather than words, pipe/redirect to a 'while read' loop. + # shellcheck disable=SC2086 disable=SC2013 + for i in $(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//'); do + kind load docker-image --name csi-prow $i:csiprow || die "could not load the $i:latest image into the kind cluster" + done + fi + if deploy_hostpath="$(find_deployment "$(pwd)/deploy")"; then : elif [ "${CSI_PROW_HOSTPATH_REPO}" = "none" ]; then @@ -836,7 +857,7 @@ main () { # might have been minor or unavoidable, for example when experimenting with # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" # test). - if test_enabled "unit"; then + if tests_enabled "unit"; then if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test 2>&1 | make_test_to_junit; then warn "'make test' failed, proceeding anyway" ret=1 @@ -846,102 +867,99 @@ main () { run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container || die "'make container' failed" fi - install_kind || die "installing kind failed" - start_cluster || die "starting the cluster failed" + if tests_need_kind; then + install_kind || die "installing kind failed" - if ${CSI_PROW_BUILD_JOB}; then - cmds="$(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//')" - # Get the image that was just built (if any) from the - # top-level Makefile CMDS variable and set the - # deploy-hostpath.sh env variables for it. We also need to - # side-load those images into the cluster. - for i in $cmds; do - e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) - images="$images ${e}_REGISTRY=none ${e}_TAG=csiprow" - - # We must avoid the tag "latest" because that implies - # always pulling the image - # (https://github.com/kubernetes-sigs/kind/issues/328). - docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed" - kind load docker-image --name csi-prow "$i:csiprow" || die "could not load the $i:latest image into the kind cluster" - done + if ${CSI_PROW_BUILD_JOB}; then + cmds="$(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//')" + # Get the image that was just built (if any) from the + # top-level Makefile CMDS variable and set the + # deploy-hostpath.sh env variables for it. We also need to + # side-load those images into the cluster. + for i in $cmds; do + e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) + images="$images ${e}_REGISTRY=none ${e}_TAG=csiprow" + + # We must avoid the tag "latest" because that implies + # always pulling the image + # (https://github.com/kubernetes-sigs/kind/issues/328). + docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed" + done - if [ -e deploy/kubernetes/rbac.yaml ]; then - # This is one of those components which has its own RBAC rules (like external-provisioner). - # We are testing a locally built image and also want to test with the the current, - # potentially modified RBAC rules. - if [ "$(echo "$cmds" | wc -w)" != 1 ]; then - die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds" + if [ -e deploy/kubernetes/rbac.yaml ]; then + # This is one of those components which has its own RBAC rules (like external-provisioner). + # We are testing a locally built image and also want to test with the the current, + # potentially modified RBAC rules. + if [ "$(echo "$cmds" | wc -w)" != 1 ]; then + die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds" + fi + e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _) + images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml" fi - e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _) - images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml" - fi - fi - - # Installing the driver might be disabled, in which case we bail out early. - if ! install_hostpath "$images"; then - info "hostpath driver installation disabled, skipping E2E testing" - return "$ret" - fi - - collect_cluster_info - - if test_enabled "sanity"; then - if ! run_sanity; then - ret=1 - fi - fi - - if test_enabled "parallel"; then - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ - -focus="External.Storage" \ - -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E parallel failed" - ret=1 fi - fi - - if test_enabled "serial"; then - if ! run_e2e serial \ - -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_SERIAL}"))" \ - -skip="$(regex_join "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E serial failed" - ret=1 - fi - fi - if (test_enabled "parallel-alpha" || test_enabled "serial-alpha") && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then - # Need to (re)create the cluster. - start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed" - if ${CSI_PROW_BUILD_JOB}; then - # Ignore: Double quote to prevent globbing and word splitting. - # Ignore: To read lines rather than words, pipe/redirect to a 'while read' loop. - # shellcheck disable=SC2086 disable=SC2013 - for i in $(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//'); do - kind load docker-image --name csi-prow $i:csiprow || die "could not load the $i:latest image into the kind cluster" - done - fi - install_hostpath "$images" || die "hostpath driver installation failed unexpectedly on alpha cluster" - - if test_enabled "parallel-alpha"; then - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - if ! run_e2e parallel-alpha ${CSI_PROW_GINKO_PARALLEL} \ - -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_ALPHA}"))" \ - -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E parallel alpha failed" - ret=1 + if tests_need_non_alpha_cluster; then + start_cluster || die "starting the non-alpha cluster failed" + + # Installing the driver might be disabled. + if install_hostpath "$images"; then + collect_cluster_info + + if tests_enabled "sanity"; then + if ! run_sanity; then + ret=1 + fi + fi + + if tests_enabled "parallel"; then + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ + -focus="External.Storage" \ + -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E parallel failed" + ret=1 + fi + fi + + if tests_enabled "serial"; then + if ! run_e2e serial \ + -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_SERIAL}"))" \ + -skip="$(regex_join "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E serial failed" + ret=1 + fi + fi fi fi - if test_enabled "serial-alpha"; then - if ! run_e2e serial-alpha \ - -focus="External.Storage.*(($(regex_join "${CSI_PROW_E2E_SERIAL}")).*($(regex_join "${CSI_PROW_E2E_ALPHA}"))|($(regex_join "${CSI_PROW_E2E_ALPHA}")).*($(regex_join "${CSI_PROW_E2E_SERIAL}")))" \ - -skip="$(regex_join "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E serial alpha failed" - ret=1 + if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then + # Need to (re)create the cluster. + start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed" + + # Installing the driver might be disabled. + if install_hostpath "$images"; then + collect_cluster_info + + if tests_enabled "parallel-alpha"; then + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + if ! run_e2e parallel-alpha ${CSI_PROW_GINKO_PARALLEL} \ + -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_ALPHA}"))" \ + -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E parallel alpha failed" + ret=1 + fi + fi + + if tests_enabled "serial-alpha"; then + if ! run_e2e serial-alpha \ + -focus="External.Storage.*(($(regex_join "${CSI_PROW_E2E_SERIAL}")).*($(regex_join "${CSI_PROW_E2E_ALPHA}"))|($(regex_join "${CSI_PROW_E2E_ALPHA}")).*($(regex_join "${CSI_PROW_E2E_SERIAL}")))" \ + -skip="$(regex_join "${CSI_PROW_E2E_SKIP}")"; then + warn "E2E serial alpha failed" + ret=1 + fi + fi fi fi fi From 1eb274b61b85fab856bc29856dfb1fb173cf13e3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 11:37:01 +0200 Subject: [PATCH 033/299] build.make: skip shellcheck if Docker is not available Not all environments have Docker. The simplifying assumption here is that if the Docker command is available, it's also usable. --- container-object-storage-interface-controller/build.make | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 078100c9..e5769c58 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -141,6 +141,10 @@ test: test-shellcheck test-shellcheck: @ echo; echo "### $@:" @ ret=0; \ + if ! command -v docker; then \ + echo "skipped, no Docker"; \ + return 0; \ + fi; \ for dir in $(abspath $(TEST_SHELLCHECK_DIRS)); do \ echo; \ echo "$$dir:"; \ From 9319c64871ce4c9b4af9f431d6af0745ec0ed678 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 19:42:38 +0200 Subject: [PATCH 034/299] prow.sh: debug failing KinD cluster creation When KinD fails in a Prow job, we need additional information to understand why it failed. --- .../prow.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 72be16f5..c2075685 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -488,7 +488,17 @@ $(list_gates "$gates") featureGates: $(list_gates "$gates") EOF - run kind create cluster --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image" || die "'kind create cluster' failed" + info "kind-config.yaml:" + cat "${CSI_PROW_WORK}/kind-config.yaml" + if ! run kind create cluster --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image"; then + warn "Cluster creation failed. Will try again with higher verbosity." + info "Available Docker images:" + docker image ls + if ! run kind --loglevel debug create cluster --retain --name csi-prow --config "${CSI_PROW_WORK}/kind-config.yaml" --wait 5m --image "$image"; then + run kind export logs --name csi-prow "$ARTIFACTS/kind-cluster" + die "Cluster creation failed again, giving up. See the 'kind-cluster' artifact directory for additional logs." + fi + fi KUBECONFIG="$(kind get kubeconfig-path --name=csi-prow)" export KUBECONFIG } From e49bb1b197770b94c68b5966a062ee089138b134 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Apr 2019 19:45:44 +0200 Subject: [PATCH 035/299] prow.sh: avoid AllAlpha=true It turned out to not work. Instead of reverting the commit which introduced this, let's better document this explicitly. --- container-object-storage-interface-controller/prow.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index c2075685..0a2b37d7 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -267,9 +267,9 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # the failing test for "latest" or by updating the test and not running # it anymore for older releases. configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" -configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true' "alpha feature gates for Kubernetes 1.14" +configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.14" # TODO: add new CSI_PROW_ALPHA_GATES entry for future Kubernetes releases -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'AllAlpha=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'AllAlpha=true,ExpandCSIVolumes=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Some tests are known to be unusable in a KinD cluster. For example, From 0688450781546a863f988f04a3c4535ddb11c22f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 10 Apr 2019 08:44:54 +0200 Subject: [PATCH 036/299] prow.sh: remove AllAlpha=all, part II This was already meant to be done earlier in e49bb1b197770b94c6. While at it, extend the permanent TODO with guidance on future feature gates. --- container-object-storage-interface-controller/prow.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 0a2b37d7..57415d43 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -268,8 +268,9 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # it anymore for older releases. configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.14" -# TODO: add new CSI_PROW_ALPHA_GATES entry for future Kubernetes releases -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'AllAlpha=true,ExpandCSIVolumes=true' "alpha feature gates for latest Kubernetes" +# TODO: add new CSI_PROW_ALPHA_GATES_xxx entry for future Kubernetes releases and +# add new gates to CSI_PROW_E2E_ALPHA_GATES_LATEST. +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Some tests are known to be unusable in a KinD cluster. For example, From c41146053e4cc34b264565b68d3d8815aee7d491 Mon Sep 17 00:00:00 2001 From: Pengzhi Sun Date: Thu, 11 Apr 2019 17:42:44 +0800 Subject: [PATCH 037/299] Replace 'return' to 'exit' to fix shellcheck error --- container-object-storage-interface-controller/build.make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index e5769c58..e3d4795d 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -143,11 +143,11 @@ test-shellcheck: @ ret=0; \ if ! command -v docker; then \ echo "skipped, no Docker"; \ - return 0; \ + exit 0; \ fi; \ for dir in $(abspath $(TEST_SHELLCHECK_DIRS)); do \ echo; \ echo "$$dir:"; \ ./release-tools/verify-shellcheck.sh "$$dir" || ret=1; \ done; \ - return $$ret + exit $$ret From 3eb6d0fd2cd5e3726c903ae870a51722bc057f39 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Apr 2019 13:37:43 +0200 Subject: [PATCH 038/299] prow.sh: update csi-driver-host-path This pulls in https://github.com/kubernetes-csi/csi-driver-host-path/pull/37, which turned out to be necessary for pre-submit testing of the livenessprobe. --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 57415d43..ab3a1a57 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -151,7 +151,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION 486074dc3beef59955faf7bb5210418d9844e0a7 "hostpath driver" # pre-1.1.0 +configvar CSI_PROW_HOSTPATH_VERSION fc52d13ba07922c80555a24616a5b16480350c3f "hostpath driver" # pre-1.1.0 configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" From 575d7a64834a5f51f91a3835b785397cfc987c14 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Apr 2019 22:32:01 +0200 Subject: [PATCH 039/299] prow.sh: skip sanity testing if component doesn't support it Whether a component supports sanity testing depends on the component. For example, csi-driver-host-path enables it because it makes sense there (and only there). Letting the prow.sh script decide whether it actually runs simplifies the job definitions in test-infra. --- .../prow.sh | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index ab3a1a57..204cc294 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -198,10 +198,13 @@ configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI dr # - serial, only alpha features # - sanity # -# Sanity testing with csi-sanity only covers the CSI driver itself and thus -# is off by default. A CSI driver can change that default in its .prow.sh -# by setting CSI_PROW_TESTS_SANITY. -configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha ${CSI_PROW_TESTS_SANITY}" "tests to run" +# Unknown or unsupported entries are ignored. +# +# Sanity testing with csi-sanity only covers the CSI driver itself and +# thus only makes sense in repos which provide their own CSI +# driver. Repos can enable sanity testing by setting +# CSI_PROW_TESTS_SANITY=sanity. +configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha sanity" "tests to run" tests_enabled () { local t1 t2 # We want word-splitting here, so ignore: Quote to prevent word splitting, or split robustly with mapfile or read -a. @@ -216,11 +219,16 @@ tests_enabled () { done return 1 } +sanity_enabled () { + [ "${CSI_PROW_TESTS_SANITY}" = "sanity" ] && tests_enabled "sanity" +} tests_need_kind () { - tests_enabled "sanity" "parallel" "serial" "serial-alpha" "parallel-alpha" + tests_enabled "parallel" "serial" "serial-alpha" "parallel-alpha" || + sanity_enabled } tests_need_non_alpha_cluster () { - tests_enabled "sanity" "parallel" "serial" + tests_enabled "parallel" "serial" || + sanity_enabled } tests_need_alpha_cluster () { tests_enabled "parallel-alpha" "serial-alpha" @@ -916,7 +924,7 @@ main () { if install_hostpath "$images"; then collect_cluster_info - if tests_enabled "sanity"; then + if sanity_enabled; then if ! run_sanity; then ret=1 fi From 0a82a2c22a46fa6c7c31994828b0747ec471cfdd Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 15 Apr 2019 09:45:23 +0200 Subject: [PATCH 040/299] update to Go 1.12.4 Kubernetes also requires 1.12. We pick the latest stable release for CI builds. --- container-object-storage-interface-controller/travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index 1c05dfd9..5b042522 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -4,7 +4,7 @@ services: - docker matrix: include: - - go: 1.11.1 + - go: 1.12.4 before_script: - mkdir -p bin - wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep From 1fd7a62b5e73cb0915673e8d2d0218c1ddf0253b Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 10 May 2019 17:37:49 +0200 Subject: [PATCH 041/299] build.make: allow repos to use 'go mod' for vendoring How a repo does vendoring is detected based on the presence of Gopkg.toml. The vendor check with `dep` was all done locally, but the corresponding check for `go mod` requires network access. The check therefore gets skipped when running in the Prow CI in situations where we are sure that it isn't needed (for example, in a periodic job). --- .../build.make | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index e3d4795d..142c8578 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -118,14 +118,39 @@ test-fmt: fi # This test only runs when dep >= 0.5 is installed, which is the case for the CI setup. +# When using 'go mod', we allow the test to be skipped in the Prow CI under some special +# circumstances, because it depends on accessing all remote repos and thus +# running it all the time would defeat the purpose of vendoring: +# - not handling a PR or +# - the fabricated merge commit leaves go.mod, go.sum and vendor dir unchanged +# - release-tools also didn't change (changing rules or Go version might lead to +# a different result and thus must be tested) .PHONY: test-vendor test: test-vendor test-vendor: @ echo; echo "### $@:" - @ case "$$(dep version 2>/dev/null | grep 'version *:')" in \ - *v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \ - *) echo "skipping check, dep >= 0.5 required";; \ - esac + @ if [ -f Gopkg.toml ]; then \ + echo "Repo uses 'dep' for vendoring."; \ + case "$$(dep version 2>/dev/null | grep 'version *:')" in \ + *v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \ + *) echo "skipping check, dep >= 0.5 required";; \ + esac; \ + else \ + echo "Repo uses 'go mod' for vendoring."; \ + if [ "$${JOB_NAME}" ] && \ + ( [ "$${JOB_TYPE}" != "presubmit" ] || \ + [ $$(git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools | wc -l) -eq 0 ] ); then \ + echo "Skipping vendor check because the Prow pre-submit job does not change vendoring."; \ + elif ! GO111MODULE=on go mod vendor; then \ + echo "ERROR: vendor check failed."; \ + false; \ + elif [ $$(git status --porcelain -- vendor | wc -l) -gt 0 ]; then \ + echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':"; \ + git status -- vendor; \ + git diff -- vendor; \ + false; \ + fi; \ + fi; .PHONY: test-subtree test: test-subtree From 28afea75b5087867d9844272d3486f3d93efbc7e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 8 Jul 2019 20:36:55 +0200 Subject: [PATCH 042/299] prow.sh: flexible test driver config By moving the code into a separate function, other CSI drivers have a chance to overwrite it. For the hostpath driver itself we need the ability to set the driver name depending on which revision is getting installed. --- .../prow.sh | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 204cc294..dd335540 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -154,6 +154,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip configvar CSI_PROW_HOSTPATH_VERSION fc52d13ba07922c80555a24616a5b16480350c3f "hostpath driver" # pre-1.1.0 configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" +configvar CSI_PROW_HOSTPATH_DRIVER_NAME "csi-hostpath" "the driver (aka provisioner) name of the chosen hostpath driver" # If CSI_PROW_HOSTPATH_CANARY is set (typically to "canary", but also # "1.0-canary"), then all image versions are replaced with that @@ -673,6 +674,29 @@ hostpath_supports_block () { echo "${result:-true}" } +# The default implementation of this function generates a external +# driver test configuration for the hostpath driver. +# +# The content depends on both what the E2E suite expects and what the +# installed hostpath driver supports. Generating it here seems prone +# to breakage, but it is uncertain where a better place might be. +generate_test_driver () { + cat <"${CSI_PROW_WORK}/hostpath-test-driver.yaml" <"${CSI_PROW_WORK}/test-driver.yaml" || die "generating test-driver.yaml failed" # Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again # and to avoid the large number of "skipped" tests that we get from using @@ -727,7 +735,7 @@ EOF trap move_junit EXIT cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && - run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/hostpath-test-driver.yaml" + run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml" ) # Run csi-sanity against installed CSI driver. From bb10a35c82c144ea93e096b2f74751c1426e4bb2 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 11 Jul 2019 14:33:47 -0700 Subject: [PATCH 043/299] Add variables for 1.15 --- container-object-storage-interface-controller/prow.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index dd335540..fc562b05 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -170,6 +170,7 @@ configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" # CSI_PROW_E2E_REPO=none disables E2E testing. configvar CSI_PROW_E2E_VERSION_1_13 v1.14.0 "E2E version for Kubernetes 1.13.x" # we can't use the one from 1.13.x because it didn't have --storage.testdriver configvar CSI_PROW_E2E_VERSION_1_14 v1.14.0 "E2E version for Kubernetes 1.14.x" +configvar CSI_PROW_E2E_VERSION_1_15 v1.15.0 "E2E version for Kubernetes 1.15.x" # TODO: add new CSI_PROW_E2E_VERSION entry for future Kubernetes releases configvar CSI_PROW_E2E_VERSION_LATEST master "E2E version for Kubernetes master" # testing against Kubernetes master is already tracking a moving target, so we might as well use a moving E2E version configvar CSI_PROW_E2E_REPO_LATEST https://github.com/kubernetes/kubernetes "E2E repo for Kubernetes >= 1.13.x" # currently the same for all versions @@ -277,6 +278,7 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # it anymore for older releases. configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.14" +configvar CSI_PROW_E2E_ALPHA_GATES_1_15 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.15" # TODO: add new CSI_PROW_ALPHA_GATES_xxx entry for future Kubernetes releases and # add new gates to CSI_PROW_E2E_ALPHA_GATES_LATEST. configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for latest Kubernetes" From af83b17d44e7eaa7c6614d6594bf6dba87c13291 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 11 Jul 2019 14:42:59 -0700 Subject: [PATCH 044/299] Update kind to v0.4.0. This requires overriding Kubernetes versions with specific patch versions that kind 0.4.0 supports. Also, feature gate setting is only supported on 1.15+ due to kind.sigs.k8s.io/v1alpha3 and kubeadm.k8s.io/v1beta2 dependencies. --- .../prow.sh | 105 ++++++++++++------ 1 file changed, 74 insertions(+), 31 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index fc562b05..be49ff57 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -52,6 +52,26 @@ configvar () { eval echo "\$3:" "$1=\${$1}" } +# Takes the minor version of $CSI_PROW_KUBERNETES_VERSION and overrides it to +# $1 if they are equal minor versions. Ignores versions that begin with +# "release-". +override_k8s_version () { + local current_minor_version + local override_minor_version + + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + current_minor_version="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1\.\2/')" + + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + override_minor_version="$(echo "${1}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1\.\2/')" + if [ "${current_minor_version}" == "${override_minor_version}" ]; then + CSI_PROW_KUBERNETES_VERSION="$1" + echo "Overriding CSI_PROW_KUBERNETES_VERSION with $1: $CSI_PROW_KUBERNETES_VERSION" + fi +} + # Prints the value of a variable + version suffix, falling back to variable + "LATEST". get_versioned_variable () { local var="$1" @@ -81,7 +101,7 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION 0.2.1 "kind" +configvar CSI_PROW_KIND_VERSION v0.4.0 "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -108,6 +128,18 @@ configvar CSI_PROW_BUILD_JOB true "building code in repo enabled" # deprecating or changing the implementation of an alpha feature. configvar CSI_PROW_KUBERNETES_VERSION 1.13.3 "Kubernetes" +# This is a hack to workaround the issue that each version +# of kind currently only supports specific patch versions of +# Kubernetes. We need to override CSI_PROW_KUBERNETES_VERSION +# passed in by our CI/pull jobs to the versions that +# kind v0.4.0 supports. +# +# If the version is prefixed with "release-", then nothing +# is overridden. +override_k8s_version "1.13.7" +override_k8s_version "1.14.3" +override_k8s_version "1.15.0" + # CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and # with underscore (1_13 instead of 1.13.3) and in uppercase (LATEST # instead of latest). @@ -466,40 +498,51 @@ start_cluster () { image="kindest/node:v${CSI_PROW_KUBERNETES_VERSION}" fi cat >"${CSI_PROW_WORK}/kind-config.yaml" <>"${CSI_PROW_WORK}/kind-config.yaml" < Date: Thu, 11 Jul 2019 14:57:27 -0700 Subject: [PATCH 045/299] Update hostpath version for sidecar testing to v1.2.0-rc2 --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index be49ff57..d998ebba 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -183,7 +183,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION fc52d13ba07922c80555a24616a5b16480350c3f "hostpath driver" # pre-1.1.0 +configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0-rc2" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" configvar CSI_PROW_HOSTPATH_DRIVER_NAME "csi-hostpath" "the driver (aka provisioner) name of the chosen hostpath driver" From 7b4e50aa747449323c804441b9b500db9d6da3a0 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 11 Jul 2019 17:13:06 -0700 Subject: [PATCH 046/299] Change default hostpath driver name to hostpath.csi.k8s.io --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index d998ebba..f1f0a1b2 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -186,7 +186,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0-rc2" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" -configvar CSI_PROW_HOSTPATH_DRIVER_NAME "csi-hostpath" "the driver (aka provisioner) name of the chosen hostpath driver" +configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" # If CSI_PROW_HOSTPATH_CANARY is set (typically to "canary", but also # "1.0-canary"), then all image versions are replaced with that From 10dd652f8a148bba1b32661a108acebbe4b7e581 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 15 Jul 2019 12:42:20 -0700 Subject: [PATCH 047/299] prow.sh: tag master images with a large version number --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index f1f0a1b2..dcfcec61 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -485,7 +485,7 @@ start_cluster () { tag="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/release-\(.*\)/v\1.0-release./')";; *) # We have to make something up. v1.0.0 did not work for some reasons. - tag="v1.14.0-";; + tag="v999.999.999-";; esac tag="$tag$(cd "$GOPATH/src/k8s.io/kubernetes" && git rev-list --abbrev-commit HEAD).csiprow" (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f "$tag") || die "git tag failed" From 63886e71b52a4de624f56f20f78a8383b62cbf8f Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 5 Aug 2019 09:45:55 -0700 Subject: [PATCH 048/299] Kubernetes master changed the way that releases are tagged, which needed changes to kind. There are 3 changes made to prow.sh: 1. Use a master commit of kind that includes the fix for Kubernetes master. 2. Use git clone instead of git checkout (shallow) to source Kubernetes. This lets kind correctly figure out the Kubernetes release tag. 3. Build kind with make install. The kind fix was not working correctly when built with go build. --- .../prow.sh | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index dcfcec61..fd32f79e 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -101,7 +101,7 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION v0.4.0 "kind" +configvar CSI_PROW_KIND_VERSION 2555d8e09d5a77ee718414cec9f6083dfa028dc5 "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -322,7 +322,7 @@ configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_ # whether they can run with the current cluster provider, but until # they are, we filter them out by name. Like the other test selection # variables, this is again a space separated list of regular expressions. -configvar CSI_PROW_E2E_SKIP 'while.kubelet.is.down.*Disruptive' "tests that need to be skipped" +configvar CSI_PROW_E2E_SKIP 'Disruptive' "tests that need to be skipped" # This is the directory for additional result files. Usually set by Prow, but # if not (for example, when invoking manually) it defaults to the work directory. @@ -379,8 +379,8 @@ install_kind () { if run curl --fail --location -o "${CSI_PROW_WORK}/bin/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${CSI_PROW_KIND_VERSION}/kind-linux-amd64"; then chmod u+x "${CSI_PROW_WORK}/bin/kind" else - git_checkout https://github.com/kubernetes-sigs/kind "$GOPATH/src/sigs.k8s.io/kind" "${CSI_PROW_KIND_VERSION}" --depth=1 && - run_with_go "${CSI_PROW_GO_VERSION_KIND}" go build -o "${CSI_PROW_WORK}/bin/kind" sigs.k8s.io/kind + git_checkout https://github.com/kubernetes-sigs/kind "${GOPATH}/src/sigs.k8s.io/kind" "${CSI_PROW_KIND_VERSION}" --depth=1 && + (cd "${GOPATH}/src/sigs.k8s.io/kind" && make install INSTALL_DIR="${CSI_PROW_WORK}/bin") fi } @@ -427,6 +427,27 @@ git_checkout () { (cd "$path" && run git clean -fdx) || die "failed to clean $path" } +# This clones a repo ("https://github.com/kubernetes/kubernetes") +# in a certain location ("$GOPATH/src/k8s.io/kubernetes") at +# a the head of a specific branch (i.e., release-1.13, master). +# The directory cannot exist. +git_clone_branch () { + local repo path branch parent + repo="$1" + shift + path="$1" + shift + branch="$1" + shift + + parent="$(dirname "$path")" + mkdir -p "$parent" + (cd "$parent" && run git clone --single-branch --branch "$branch" "$repo" "$path") || die "cloning $repo" failed + # This is useful for local testing or when switching between different revisions in the same + # repo. + (cd "$path" && run git clean -fdx) || die "failed to clean $path" +} + list_gates () ( set -f; IFS=',' # Ignore: Double quote to prevent globbing and word splitting. @@ -472,25 +493,10 @@ start_cluster () { if [ "$version" = "latest" ]; then version=master fi - git_checkout https://github.com/kubernetes/kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version" --depth=1 || die "checking out Kubernetes $version failed" - - # "kind build" and/or the Kubernetes build rules need at least one tag, which we don't have - # when doing a shallow fetch. Therefore we fake one: - # release-1.12 -> v1.12.0-release..csiprow - # latest or -> v1.14.0-.csiprow - case "${CSI_PROW_KUBERNETES_VERSION}" in - release-*) - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - tag="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/release-\(.*\)/v\1.0-release./')";; - *) - # We have to make something up. v1.0.0 did not work for some reasons. - tag="v999.999.999-";; - esac - tag="$tag$(cd "$GOPATH/src/k8s.io/kubernetes" && git rev-list --abbrev-commit HEAD).csiprow" - (cd "$GOPATH/src/k8s.io/kubernetes" && run git tag -f "$tag") || die "git tag failed" - go_version="$(go_version_for_kubernetes "$GOPATH/src/k8s.io/kubernetes" "$version")" || die "cannot proceed without knowing Go version for Kubernetes" - run_with_go "$go_version" kind build node-image --type bazel --image csiprow/node:latest --kube-root "$GOPATH/src/k8s.io/kubernetes" || die "'kind build node-image' failed" + git_clone_branch https://github.com/kubernetes/kubernetes "${CSI_PROW_WORK}/src/kubernetes" "$version" || die "checking out Kubernetes $version failed" + + go_version="$(go_version_for_kubernetes "${CSI_PROW_WORK}/src/kubernetes" "$version")" || die "cannot proceed without knowing Go version for Kubernetes" + run_with_go "$go_version" kind build node-image --type bazel --image csiprow/node:latest --kube-root "${CSI_PROW_WORK}/src/kubernetes" || die "'kind build node-image' failed" csi_prow_kind_have_kubernetes=true fi image="csiprow/node:latest" From 8cc17dee23ad40a0f750c97468a98cc29c98e9ee Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Wed, 21 Aug 2019 15:19:39 -0700 Subject: [PATCH 049/299] Update kind to v0.5.0 --- .../prow.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index fd32f79e..c334a5dd 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -101,7 +101,7 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION 2555d8e09d5a77ee718414cec9f6083dfa028dc5 "kind" +configvar CSI_PROW_KIND_VERSION "v0.5.0" "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -126,19 +126,19 @@ configvar CSI_PROW_BUILD_JOB true "building code in repo enabled" # use the same settings as for "latest" Kubernetes. This works # as long as there are no breaking changes in Kubernetes, like # deprecating or changing the implementation of an alpha feature. -configvar CSI_PROW_KUBERNETES_VERSION 1.13.3 "Kubernetes" +configvar CSI_PROW_KUBERNETES_VERSION 1.15.3 "Kubernetes" # This is a hack to workaround the issue that each version # of kind currently only supports specific patch versions of # Kubernetes. We need to override CSI_PROW_KUBERNETES_VERSION # passed in by our CI/pull jobs to the versions that -# kind v0.4.0 supports. +# kind v0.5.0 supports. # # If the version is prefixed with "release-", then nothing # is overridden. -override_k8s_version "1.13.7" -override_k8s_version "1.14.3" -override_k8s_version "1.15.0" +override_k8s_version "1.13.10" +override_k8s_version "1.14.6" +override_k8s_version "1.15.3" # CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and # with underscore (1_13 instead of 1.13.3) and in uppercase (LATEST From 2859fcfbbaea0af9d09649d9b50067ced68ffdb7 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Wed, 28 Aug 2019 06:24:26 -0700 Subject: [PATCH 050/299] Add rule for building Windows binaries Signed-off-by: Deep Debroy --- container-object-storage-interface-controller/build.make | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 142c8578..f8b737f9 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -63,6 +63,7 @@ endif build-%: mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* + CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* container-%: build-% docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . From 731332c695e4f22cabb59c1303afe1f7bdf29ab6 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 29 Aug 2019 15:00:21 +0200 Subject: [PATCH 051/299] prow.sh: install dep if needed "make test-vendor" depends on dep if the current project uses dep. Without it, the vendor directory checking was skipped under Prow. --- .../prow.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index c334a5dd..33d93e49 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -223,6 +223,10 @@ configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service nam configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver" configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI driver" +# The version of dep to use for 'make test-vendor'. Ignored if the project doesn't +# use dep. Only binary releases of dep are supported (https://github.com/golang/dep/releases). +configvar CSI_PROW_DEP_VERSION v0.5.1 "golang dep version to be used for vendor checking" + # Each job can run one or more of the following tests, identified by # a single word: # - unit testing @@ -396,6 +400,15 @@ install_ginkgo () { mv "$GOPATH/bin/ginkgo" "${CSI_PROW_BIN}" } +# Ensure that we have the desired version of dep. +install_dep () { + if dep version 2>/dev/null | grep -q "version:.*${CSI_PROW_DEP_VERSION}$"; then + return + fi + run curl --fail --location -o "${CSI_PROW_WORK}/bin/dep" "https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64" && + chmod u+x "${CSI_PROW_WORK}/bin/dep" +} + # This checks out a repo ("https://github.com/kubernetes/kubernetes") # in a certain location ("$GOPATH/src/k8s.io/kubernetes") at # a certain revision (a hex commit hash, v1.13.1, master). It's okay @@ -936,6 +949,10 @@ main () { # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" # test). if tests_enabled "unit"; then + if [ -f Gopkg.toml ] && ! install_dep; then + warn "installing 'dep' failed, cannot test vendoring" + ret=1 + fi if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test 2>&1 | make_test_to_junit; then warn "'make test' failed, proceeding anyway" ret=1 From e4743093768e898ce8d00ec1dfe28b0f3e85bb8e Mon Sep 17 00:00:00 2001 From: Mucahit Kurt Date: Sat, 7 Sep 2019 02:31:15 +0300 Subject: [PATCH 052/299] create 2-node kind cluster since topology support is added to hostpath driver Signed-off-by: Mucahit Kurt --- container-object-storage-interface-controller/prow.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 33d93e49..5e7277a3 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -521,6 +521,7 @@ kind: Cluster apiVersion: kind.sigs.k8s.io/v1alpha3 nodes: - role: control-plane +- role: worker EOF # kubeadm has API dependencies between apiVersion and Kubernetes version From 1aa2918fe6d791c0dbea94b0b2665d3aaed33022 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 6 Sep 2019 19:15:35 -0700 Subject: [PATCH 053/299] build windows binaries with .exe suffix --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index f8b737f9..36e19be4 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -63,7 +63,7 @@ endif build-%: mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* - CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* + CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* container-%: build-% docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . From 8980bba9e809cba5f2f6b6eaced32761873bdb70 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 16 Sep 2019 17:59:04 -0400 Subject: [PATCH 054/299] Enable hostpath expansion --- container-object-storage-interface-controller/prow.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 5e7277a3..d93b6fa7 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -183,7 +183,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0-rc2" "hostpath driver" +configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0-rc8" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" @@ -759,6 +759,8 @@ DriverInfo: persistence: true dataSource: true multipods: true + nodeExpansion: true + controllerExpansion: true EOF } From adaaa909c56af557f2e01060963018a85fe7b4c2 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 4 Oct 2019 14:08:31 +0200 Subject: [PATCH 055/299] update Go mod support It turned out that changes like https://github.com/kubernetes-csi/csi-lib-utils/pull/33 should better have been committed after `go mod tidy` because that adds some indirect dependencies in that example. The revised `test-vendor` checks for that and (just in case that this ever becomes desired) allows projects to not have a vendor directory when using `go mod`. How to use `go mod` properly gets documented in the README.md, because there are such pitfalls. --- .../README.md | 34 ++++++++++++ .../build.make | 55 +++++++++++++++---- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index bc061aee..d5fdb3a0 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -106,3 +106,37 @@ Kubernetes releases: CSI_PROW_KUBERNETES_VERSION=1.13.3 ./.prow.sh CSI_PROW_KUBERNETES_VERSION=latest ./.prow.sh + +Dependencies and vendoring +-------------------------- + +Most projects will (eventually) use `go mod` to manage +dependencies. `dep` is also still supported by `csi-release-tools`, +but not documented here because it's not recommended anymore. + +The usual instructions for using [go +modules](https://github.com/golang/go/wiki/Modules) apply. Here's a cheat sheet +for some of the relevant commands: +- list available updates: `GO111MODULE=on go list -u -m all` +- update or add a single dependency: `GO111MODULE=on go get ` +- update all dependencies to their next minor or patch release: + `GO111MODULE=on go get ./...` (add `-u=patch` to limit to patch + releases) +- lock onto a specific version: `GO111MODULE=on go get @` +- clean up `go.mod`: `GO111MODULE=on go mod tidy` +- update vendor directory: `GO111MODULE=on go mod vendor` + +`GO111MODULE=on` can be left out when using Go >= 1.13 or when the +source is checked out outside of `$GOPATH`. + +`go mod tidy` must be used to ensure that the listed dependencies are +really still needed. Changing import statements or a tentative `go +get` can result in stale dependencies. + +The `test-vendor` verifies that it was used when run locally or in a +pre-merge CI job. If a `vendor` directory is present, it will also +verify that it's content is up-to-date. + +The `vendor` directory is optional. It is still present in projects +because it avoids downloading sources during CI builds. If this is no +longer deemed necessary, then a project can also remove the directory. diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 142c8578..c8384c16 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -125,6 +125,26 @@ test-fmt: # - the fabricated merge commit leaves go.mod, go.sum and vendor dir unchanged # - release-tools also didn't change (changing rules or Go version might lead to # a different result and thus must be tested) +# - import statements not changed (because if they change, go.mod might have to be updated) +# +# "git diff" is intelligent enough to annotate changes inside the "import" block in +# the start of the diff hunk: +# +# diff --git a/rpc/common.go b/rpc/common.go +# index bb4a5c4..5fa4271 100644 +# --- a/rpc/common.go +# +++ b/rpc/common.go +# @@ -21,7 +21,6 @@ import ( +# "fmt" +# "time" +# +# - "google.golang.org/grpc" +# "google.golang.org/grpc/codes" +# "google.golang.org/grpc/status" +# +# We rely on that to find such changes. +# +# Vendoring is optional when using go.mod. .PHONY: test-vendor test: test-vendor test-vendor: @@ -135,22 +155,37 @@ test-vendor: *v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \ *) echo "skipping check, dep >= 0.5 required";; \ esac; \ - else \ - echo "Repo uses 'go mod' for vendoring."; \ + elif [ -f go.mod ]; then \ + echo "Repo uses 'go mod'."; \ if [ "$${JOB_NAME}" ] && \ ( [ "$${JOB_TYPE}" != "presubmit" ] || \ - [ $$(git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools | wc -l) -eq 0 ] ); then \ - echo "Skipping vendor check because the Prow pre-submit job does not change vendoring."; \ - elif ! GO111MODULE=on go mod vendor; then \ + [ $$( (git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools; \ + git diff "${PULL_BASE_SHA}..HEAD" | grep -e '^@@.*@@ import (' -e '^[+-]import') | \ + wc -l) -eq 0 ] ); then \ + echo "Skipping vendor check because the Prow pre-submit job does not affect dependencies."; \ + elif ! GO111MODULE=on go mod tidy; then \ echo "ERROR: vendor check failed."; \ false; \ - elif [ $$(git status --porcelain -- vendor | wc -l) -gt 0 ]; then \ - echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':"; \ - git status -- vendor; \ - git diff -- vendor; \ + elif [ $$(git status --porcelain -- go.mod go.sum | wc -l) -gt 0 ]; then \ + echo "ERROR: go module files *not* up-to-date, they did get modified by 'GO111MODULE=on go mod tidy':"; \ + git diff -- go.mod go.sum; \ false; \ + elif [ -d vendor ]; then \ + if ! GO111MODULE=on go mod vendor; then \ + echo "ERROR: vendor check failed."; \ + false; \ + elif [ $$(git status --porcelain -- vendor | wc -l) -gt 0 ]; then \ + echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':"; \ + git status -- vendor; \ + git diff -- vendor; \ + false; \ + else \ + echo "Go dependencies and vendor directory up-to-date."; \ + fi; \ + else \ + echo "Go dependencies up-to-date."; \ fi; \ - fi; + fi .PHONY: test-subtree test: test-subtree From fb64bb6f99e3c932dbe94d3cdfe473846247c774 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 7 Oct 2019 12:21:09 +0200 Subject: [PATCH 056/299] go-get-kubernetes.sh: automate Kubernetes dependency handling This script handles the necessary "replace" statements and determines which packages need to be updated in lockstep. --- .../README.md | 20 ++++ .../go-get-kubernetes.sh | 104 ++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100755 container-object-storage-interface-controller/go-get-kubernetes.sh diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index d5fdb3a0..cc40f161 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -140,3 +140,23 @@ verify that it's content is up-to-date. The `vendor` directory is optional. It is still present in projects because it avoids downloading sources during CI builds. If this is no longer deemed necessary, then a project can also remove the directory. + +When using packages that are part of the Kubernetes source code, the +commands above are not enough because the [lack of semantic +versioning](https://github.com/kubernetes/kubernetes/issues/72638) +prevents `go mod` from finding newer releases. Importing directly from +`kubernetes/kubernetes` also needs `replace` statements to override +the fake `v0.0.0` versions +(https://github.com/kubernetes/kubernetes/issues/79384). The +`go-get-kubernetes.sh` script can be used to update all packages in +lockstep to a different Kubernetes version. It takes a single version +number like "1.16.0". + +Conversion of a repository that uses `dep` to `go mod` can be done with: + + GO111MODULE=on go mod init + release-tools/go-get-kubernetes.sh + GO111MODULE=on go mod tidy + GO111MODULE=on go mod vendor + git rm -f Gopkg.toml Gopkg.lock + git add go.mod go.sum vendor diff --git a/container-object-storage-interface-controller/go-get-kubernetes.sh b/container-object-storage-interface-controller/go-get-kubernetes.sh new file mode 100755 index 00000000..8c4e3024 --- /dev/null +++ b/container-object-storage-interface-controller/go-get-kubernetes.sh @@ -0,0 +1,104 @@ +#!/usr/bin/env bash + +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This script can be used while converting a repo from "dep" to "go mod" +# by calling it after "go mod init" or to update the Kubernetes packages +# in a repo that has already been converted. Only packages that are +# part of kubernetes/kubernetes and thus part of a Kubernetes release +# are modified. Other k8.io packages (like k8s.io/klog, k8s.io/utils) +# need to be updated separately. + +set -o pipefail + +cmd=$0 + +function help () { + echo "$cmd - update all components from kubernetes/kubernetes to that version" +} + +if [ $# -ne 1 ]; then + help + exit 1 +fi +case "$1" in -h|--help|help) help; exit 0;; esac + +die () { + echo >&2 "$@" + exit 1 +} + +k8s="$1" + +# If the repo imports k8s.io/kubernetes (directly or indirectly), then +# "go mod" will try to find "v0.0.0" versions because +# k8s.io/kubernetes has those in it's go.mod file +# (https://github.com/kubernetes/kubernetes/blob/2bd9643cee5b3b3a5ecbd3af49d09018f0773c77/go.mod#L146-L157). +# (https://github.com/kubernetes/kubernetes/issues/79384). +# +# We need to replicate the replace statements to override those fake +# versions also in our go.mod file (idea and some code from +# https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597). +mods=$( (set -x; curl --silent --show-error --fail "https://raw.githubusercontent.com/kubernetes/kubernetes/v${k8s}/go.mod") | + sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p' + ) || die "failed to determine Kubernetes staging modules" +for mod in $mods; do + # The presence of a potentially incomplete go.mod file affects this command, + # so move elsewhere. + modinfo=$(set -x; cd /; env GO111MODULE=on go mod download -json "$mod@kubernetes-${k8s}") || + die "failed to determine version of $mod: $modinfo" + v=$(echo "$modinfo" | sed -n 's|.*"Version": "\(.*\)".*|\1|p') + (set -x; env GO111MODULE=on go mod edit "-replace=$mod=$mod@$v") || die "'go mod edit' failed" +done + +packages= + +# Beware that we have to work with packages, not modules (i.e. no -m +# flag), because some modules trigger a "no Go code except tests" +# error. Getting their packages works. +if ! packages=$( (set -x; env GO111MODULE=on go list all) | grep ^k8s.io/ | sed -e 's; *;;'); then + cat >&2 <&2 <" go.mod; then + deps="$deps $(echo "$package" | sed -e "s;\$;@kubernetes-$k8s;" -e 's;^k8s.io/kubernetes\(/.*\)@kubernetes-;k8s.io/kubernetes\1@v;')" + fi +done + +# shellcheck disable=SC2086 +(set -x; env GO111MODULE=on go get $deps 2>&1) || die "go get failed" +echo "SUCCESS" From b7ea0496c6e00a343a6f1fc284428639112615e0 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Mon, 7 Oct 2019 16:38:04 -0700 Subject: [PATCH 057/299] Build Windows only for amd64 Signed-off-by: Deep Debroy --- container-object-storage-interface-controller/build.make | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 36e19be4..8d715e49 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -57,13 +57,17 @@ else TESTARGS = endif +ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) + # Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables # to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. build-%: mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* - CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* + if [ "$$ARCH" = "amd64" ]; then \ + CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ + fi container-%: build-% docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . From b46268930f1e961676f73dddb351506ae69f2e1e Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Tue, 8 Oct 2019 14:44:56 -0700 Subject: [PATCH 058/299] Do full git clones in travis. Shallow clones are causing test-subtree errors when the depth is exactly 50. --- container-object-storage-interface-controller/travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index 5b042522..a713bed3 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -2,6 +2,8 @@ language: go sudo: required services: - docker +git: + depth: false matrix: include: - go: 1.12.4 From 56ddd60f2bdc0dd22e45743903369f5dfe130898 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Wed, 30 Oct 2019 18:08:41 -0700 Subject: [PATCH 059/299] Add new variables for 1.16 and remove 1.13 --- .../prow.sh | 38 +++++-------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index d93b6fa7..e3308e77 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -101,7 +101,8 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION "v0.5.0" "kind" +# TODO: https://github.com/kubernetes-csi/csi-release-tools/issues/39 +configvar CSI_PROW_KIND_VERSION "86bc23d84ac12dcb56a0528890736e2c347c2dc3" "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -136,7 +137,6 @@ configvar CSI_PROW_KUBERNETES_VERSION 1.15.3 "Kubernetes" # # If the version is prefixed with "release-", then nothing # is overridden. -override_k8s_version "1.13.10" override_k8s_version "1.14.6" override_k8s_version "1.15.3" @@ -183,7 +183,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0-rc8" "hostpath driver" +configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" @@ -200,9 +200,10 @@ configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" # all generated files are present. # # CSI_PROW_E2E_REPO=none disables E2E testing. -configvar CSI_PROW_E2E_VERSION_1_13 v1.14.0 "E2E version for Kubernetes 1.13.x" # we can't use the one from 1.13.x because it didn't have --storage.testdriver +# TOOO: remove versioned variables and make e2e version match k8s version configvar CSI_PROW_E2E_VERSION_1_14 v1.14.0 "E2E version for Kubernetes 1.14.x" configvar CSI_PROW_E2E_VERSION_1_15 v1.15.0 "E2E version for Kubernetes 1.15.x" +configvar CSI_PROW_E2E_VERSION_1_16 v1.16.0 "E2E version for Kubernetes 1.16.x" # TODO: add new CSI_PROW_E2E_VERSION entry for future Kubernetes releases configvar CSI_PROW_E2E_VERSION_LATEST master "E2E version for Kubernetes master" # testing against Kubernetes master is already tracking a moving target, so we might as well use a moving E2E version configvar CSI_PROW_E2E_REPO_LATEST https://github.com/kubernetes/kubernetes "E2E repo for Kubernetes >= 1.13.x" # currently the same for all versions @@ -292,11 +293,6 @@ regex_join () { # alpha in previous Kubernetes releases. This was considered too # error prone. Therefore we use E2E tests that match the Kubernetes # version that is getting tested. -# -# However, for 1.13.x testing we have to use the E2E tests from 1.14 -# because 1.13 didn't have --storage.testdriver yet, so for that (and only -# that version) we have to define alpha tests differently. -configvar CSI_PROW_E2E_ALPHA_1_13 '\[Feature: \[Testpattern:.Dynamic.PV..block.volmode.\] should.create.and.delete.block.persistent.volumes' "alpha tests for Kubernetes 1.13" # Raw block was an alpha feature in 1.13. configvar CSI_PROW_E2E_ALPHA_LATEST '\[Feature:' "alpha tests for Kubernetes >= 1.14" # there's no need to update this, adding a new case for CSI_PROW_E2E for a new Kubernetes is enough configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi_prow_kubernetes_version_suffix}")" "alpha tests" @@ -312,12 +308,12 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # kubernetes-csi components must be updated, either by disabling # the failing test for "latest" or by updating the test and not running # it anymore for older releases. -configvar CSI_PROW_E2E_ALPHA_GATES_1_13 'VolumeSnapshotDataSource=true,BlockVolume=true,CSIBlockVolume=true' "alpha feature gates for Kubernetes 1.13" configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.14" configvar CSI_PROW_E2E_ALPHA_GATES_1_15 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.15" +configvar CSI_PROW_E2E_ALPHA_GATES_1_16 'VolumeSnapshotDataSource=true' "alpha feature gates for Kubernetes 1.16" # TODO: add new CSI_PROW_ALPHA_GATES_xxx entry for future Kubernetes releases and # add new gates to CSI_PROW_E2E_ALPHA_GATES_LATEST. -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Some tests are known to be unusable in a KinD cluster. For example, @@ -723,22 +719,6 @@ install_sanity () ( run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test -c -o "${CSI_PROW_WORK}/csi-sanity" "${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity" || die "building csi-sanity failed" ) -# Whether the hostpath driver supports raw block devices depends on which version -# we are testing. It would be much nicer if we could determine that by querying the -# installed driver's capabilities instead of having to do a version check. -hostpath_supports_block () { - local result - result="$(docker exec csi-prow-control-plane docker image ls --format='{{.Repository}} {{.Tag}} {{.ID}}' | grep hostpath | while read -r repo tag id; do - if [ "$tag" == "v1.0.1" ]; then - # Old version because the revision label is missing: didn't have support yet. - echo "false" - return - fi - done)" - # If not set, then it must be a newer driver with support. - echo "${result:-true}" -} - # The default implementation of this function generates a external # driver test configuration for the hostpath driver. # @@ -755,12 +735,14 @@ SnapshotClass: DriverInfo: Name: ${CSI_PROW_HOSTPATH_DRIVER_NAME} Capabilities: - block: $(hostpath_supports_block) + block: true persistence: true dataSource: true multipods: true nodeExpansion: true controllerExpansion: true + snapshotDataSource: true + singleNodeVolume: true EOF } From 2e8731999ffb5faee06bce46247b24dc6a1c1535 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 31 Oct 2019 08:43:31 +0100 Subject: [PATCH 060/299] update CI to use Go 1.13.3 This is the latest release. Updating is useful to ensure that we have all of the latest fixes and enhancements. --- container-object-storage-interface-controller/travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index a713bed3..494c1144 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -6,7 +6,7 @@ git: depth: false matrix: include: - - go: 1.12.4 + - go: 1.13.3 before_script: - mkdir -p bin - wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep From 5500bc08708c4dc985c804aa01df521edc012c81 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 31 Oct 2019 11:49:23 +0100 Subject: [PATCH 061/299] better handling of Go version Some operations are sensitive to the version of Go that is used. In the past, formatting of source differed depending on the version. Right now it is the content of the vendor directory which changes when switch back and forth between 1.12 and 1.13. We don't want to impose a certain workflow on developers, like forcing all invocations of Go to run inside a container. If developers want that, they can set up their development environment accordingly. But we should warn about this aspect to raise awareness. "make" invocations which involve Go now compare against the projects Go version (specified in travis.yml) once at the beginning. This is only a warning because we don't know which future version will be compatible with the project. Vendor directory handling gets updated, too: verification is now a separate script (became too complex for make) and there is a corresponding "update-vendor.sh". In contrast to verification, updating vendor is not integrated into make and thus itself invokes the go version check. --- .../build.make | 50 ++++------------ .../update-vendor.sh | 23 +++++++ .../verify-go-version.sh | 51 ++++++++++++++++ .../verify-vendor.sh | 60 +++++++++++++++++++ 4 files changed, 145 insertions(+), 39 deletions(-) create mode 100755 container-object-storage-interface-controller/update-vendor.sh create mode 100755 container-object-storage-interface-controller/verify-go-version.sh create mode 100755 container-object-storage-interface-controller/verify-vendor.sh diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index cbf6d455..6b89f5b2 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -62,7 +62,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) # Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables # to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. -build-%: +build-%: check-go-version-go mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* if [ "$$ARCH" = "amd64" ]; then \ @@ -97,7 +97,7 @@ push: $(CMDS:%=push-%) clean: -rm -rf bin -test: +test: check-go-version-go .PHONY: test-go test: test-go @@ -154,43 +154,7 @@ test-fmt: test: test-vendor test-vendor: @ echo; echo "### $@:" - @ if [ -f Gopkg.toml ]; then \ - echo "Repo uses 'dep' for vendoring."; \ - case "$$(dep version 2>/dev/null | grep 'version *:')" in \ - *v0.[56789]*) dep check && echo "vendor up-to-date" || false;; \ - *) echo "skipping check, dep >= 0.5 required";; \ - esac; \ - elif [ -f go.mod ]; then \ - echo "Repo uses 'go mod'."; \ - if [ "$${JOB_NAME}" ] && \ - ( [ "$${JOB_TYPE}" != "presubmit" ] || \ - [ $$( (git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools; \ - git diff "${PULL_BASE_SHA}..HEAD" | grep -e '^@@.*@@ import (' -e '^[+-]import') | \ - wc -l) -eq 0 ] ); then \ - echo "Skipping vendor check because the Prow pre-submit job does not affect dependencies."; \ - elif ! GO111MODULE=on go mod tidy; then \ - echo "ERROR: vendor check failed."; \ - false; \ - elif [ $$(git status --porcelain -- go.mod go.sum | wc -l) -gt 0 ]; then \ - echo "ERROR: go module files *not* up-to-date, they did get modified by 'GO111MODULE=on go mod tidy':"; \ - git diff -- go.mod go.sum; \ - false; \ - elif [ -d vendor ]; then \ - if ! GO111MODULE=on go mod vendor; then \ - echo "ERROR: vendor check failed."; \ - false; \ - elif [ $$(git status --porcelain -- vendor | wc -l) -gt 0 ]; then \ - echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':"; \ - git status -- vendor; \ - git diff -- vendor; \ - false; \ - else \ - echo "Go dependencies and vendor directory up-to-date."; \ - fi; \ - else \ - echo "Go dependencies up-to-date."; \ - fi; \ - fi + @ ./release-tools/verify-vendor.sh .PHONY: test-subtree test: test-subtree @@ -216,3 +180,11 @@ test-shellcheck: ./release-tools/verify-shellcheck.sh "$$dir" || ret=1; \ done; \ exit $$ret + +# Targets in the makefile can depend on check-go-version- +# to trigger a warning if the x.y version of that binary does not match +# what the project uses. Make ensures that this is only checked once per +# invocation. +.PHONY: check-go-version-% +check-go-version-%: + ./release-tools/verify-go-version.sh "$*" diff --git a/container-object-storage-interface-controller/update-vendor.sh b/container-object-storage-interface-controller/update-vendor.sh new file mode 100755 index 00000000..6f4c27ae --- /dev/null +++ b/container-object-storage-interface-controller/update-vendor.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ -f Gopkg.toml ]; then + echo "Repo uses 'dep' for vendoring." + (set -x; dep ensure) +elif [ -f go.mod ]; then + release-tools/verify-go-version.sh "go" + (set -x; env GO111MODULE=on go mod tidy && env GO111MODULE=on go mod vendor) +fi diff --git a/container-object-storage-interface-controller/verify-go-version.sh b/container-object-storage-interface-controller/verify-go-version.sh new file mode 100755 index 00000000..f242e769 --- /dev/null +++ b/container-object-storage-interface-controller/verify-go-version.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +GO="$1" + +if [ ! "$GO" ]; then + echo >&2 "usage: $0 " + exit 1 +fi + +die () { + echo "ERROR: $*" + exit 1 +} + +version=$("$GO" version) || die "determining version of $GO failed" +# shellcheck disable=SC2001 +majorminor=$(echo "$version" | sed -e 's/.*go\([0-9]*\)\.\([0-9]*\).*/\1.\2/') +# shellcheck disable=SC2001 +expected=$(grep "^ *- go:" "release-tools/travis.yml" | sed -e 's/.*go: *\([0-9]*\)\.\([0-9]*\).*/\1.\2/') + +if [ "$majorminor" != "$expected" ]; then + cat >&2 </dev/null | grep 'version *:')" in + *v0.[56789]*) + if dep check; then + echo "vendor up-to-date" + else + exit 1 + fi + ;; + *) echo "skipping check, dep >= 0.5 required";; + esac +elif [ -f go.mod ]; then + echo "Repo uses 'go mod'." + # shellcheck disable=SC2235 + if [ "${JOB_NAME}" ] && + ( [ "${JOB_TYPE}" != "presubmit" ] || + [ "$( (git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools; + git diff "${PULL_BASE_SHA}..HEAD" | grep -e '^@@.*@@ import (' -e '^[+-]import') | + wc -l)" -eq 0 ] ); then + echo "Skipping vendor check because the Prow pre-submit job does not affect dependencies." + elif ! (set -x; env GO111MODULE=on go mod tidy); then + echo "ERROR: vendor check failed." + exit 1 + elif [ "$(git status --porcelain -- go.mod go.sum | wc -l)" -gt 0 ]; then + echo "ERROR: go module files *not* up-to-date, they did get modified by 'GO111MODULE=on go mod tidy':"; + git diff -- go.mod go.sum + exit 1 + elif [ -d vendor ]; then + if ! (set -x; env GO111MODULE=on go mod vendor); then + echo "ERROR: vendor check failed." + exit 1 + elif [ "$(git status --porcelain -- vendor | wc -l)" -gt 0 ]; then + echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':" + git status -- vendor + git diff -- vendor + exit 1 + else + echo "Go dependencies and vendor directory up-to-date." + fi + else + echo "Go dependencies up-to-date." + fi +fi From c8a1f55d13cedd33248e9ad19655d1e810adbe73 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 4 Nov 2019 11:16:38 +0100 Subject: [PATCH 062/299] prow.sh: use vendor directory if available This avoids dependencies on the Go module cache or the upstream code hosting. --- .../build.make | 11 +++++++---- .../prow.sh | 12 +++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 6b89f5b2..1b6f35fe 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -22,6 +22,9 @@ # including build.make. REGISTRY_NAME=quay.io/k8scsi +# Can be set to -mod=vendor to ensure that the "vendor" directory is used. +GOFLAGS_VENDOR= + # Revision that gets built into each binary via the main.version # string. Uses the `git describe` output based on the most recent # version tag with a short revision suffix or, if nothing has been @@ -64,9 +67,9 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) build-%: check-go-version-go mkdir -p bin - CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* + CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* if [ "$$ARCH" = "amd64" ]; then \ - CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ + CGO_ENABLED=0 GOOS=windows go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ fi container-%: build-% @@ -103,13 +106,13 @@ test: check-go-version-go test: test-go test-go: @ echo; echo "### $@:" - go test `go list ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS) + go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS) .PHONY: test-vet test: test-vet test-vet: @ echo; echo "### $@:" - go vet `go list ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` + go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` .PHONY: test-fmt test: test-fmt diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index e3308e77..fe68bb7d 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -85,6 +85,12 @@ get_versioned_variable () { echo "$value" } +# If we have a vendor directory, then use it. We must be careful to only +# use this for "make" invocations inside the project's repo itself because +# setting it globally can break other go usages (like "go get " +# which is disabled with GOFLAGS=-mod=vendor). +configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory" + # Go versions can be specified seperately for different tasks # If the pre-installed Go is missing or a different # version, the required version here will get installed @@ -928,7 +934,7 @@ main () { images= if ${CSI_PROW_BUILD_JOB}; then # A successful build is required for testing. - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all || die "'make all' failed" + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make all' failed" # We don't want test failures to prevent E2E testing below, because the failure # might have been minor or unavoidable, for example when experimenting with # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" @@ -938,13 +944,13 @@ main () { warn "installing 'dep' failed, cannot test vendoring" ret=1 fi - if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test 2>&1 | make_test_to_junit; then + if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" 2>&1 | make_test_to_junit; then warn "'make test' failed, proceeding anyway" ret=1 fi fi # Required for E2E testing. - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container || die "'make container' failed" + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make container' failed" fi if tests_need_kind; then From a4fc754e33ad432fb3629a8f8bdd6e83b8c60281 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 4 Nov 2019 15:40:31 +0100 Subject: [PATCH 063/299] travis.yml: also use vendor directory --- container-object-storage-interface-controller/travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index 494c1144..bfd7647b 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -13,9 +13,9 @@ before_script: - chmod u+x bin/dep - export PATH=$PWD/bin:$PATH script: -- make -k all test +- make -k all test GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' ) after_success: - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io; - make push; + make push GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' ); fi From f733b4594e6b0261d6b084ecbf3307b8a9a69b7e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 5 Nov 2019 16:40:29 +0100 Subject: [PATCH 064/299] prow.sh: also log output of system containers Depending on the error, those logs are needed to debug failures. --- container-object-storage-interface-controller/prow.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index e3308e77..0777ae37 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -677,16 +677,16 @@ EOF } -# Gets logs of all containers in the default namespace. When passed -f, kubectl will +# Gets logs of all containers in all namespaces. When passed -f, kubectl will # keep running and capture new output. Prints the pid of all background processes. # The caller must kill (when using -f) and/or wait for them. # # May be called multiple times and thus appends. start_loggers () { - kubectl get pods -o go-template --template='{{range .items}}{{.metadata.name}} {{range .spec.containers}}{{.name}} {{end}}{{"\n"}}{{end}}' | while read -r pod containers; do + kubectl get pods --all-namespaces -o go-template --template='{{range .items}}{{.metadata.namespace}} {{.metadata.name}} {{range .spec.containers}}{{.name}} {{end}}{{"\n"}}{{end}}' | while read -r namespace pod containers; do for container in $containers; do - mkdir -p "${ARTIFACTS}/$pod" - kubectl logs "$@" "$pod" "$container" >>"${ARTIFACTS}/$pod/$container.log" & + mkdir -p "${ARTIFACTS}/$namespace/$pod" + kubectl logs -n "$namespace" "$@" "$pod" "$container" >>"${ARTIFACTS}/$namespace/$pod/$container.log" & echo "$!" done done From aad791f82800fe70909cbbc98889395664c0d7b0 Mon Sep 17 00:00:00 2001 From: Peeyush Gupta Date: Tue, 19 Nov 2019 08:58:58 -0500 Subject: [PATCH 065/299] Adding build for ppc64le --- container-object-storage-interface-controller/build.make | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 1b6f35fe..7075a37e 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -70,6 +70,7 @@ build-%: check-go-version-go CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* if [ "$$ARCH" = "amd64" ]; then \ CGO_ENABLED=0 GOOS=windows go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ + CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*-ppc64le ./cmd/$* fi container-%: build-% From 7ed2ec1ba67ad1b9fc5a8f6c1cf6cf2eaaa8534d Mon Sep 17 00:00:00 2001 From: Mucahit Kurt Date: Sat, 16 Nov 2019 06:23:08 +0300 Subject: [PATCH 066/299] Delete kind cluster after tests run. Inside a real Prow job it is better to clean up at runtime instead of leaving that to the Prow job cleanup code because the later sometimes times out. Signed-off-by: Mucahit Kurt --- .../prow.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 3b9621a2..8b431c56 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -580,6 +580,19 @@ EOF export KUBECONFIG } +# Deletes kind cluster inside a prow job +delete_cluster_inside_prow_job() { + # Inside a real Prow job it is better to clean up at runtime + # instead of leaving that to the Prow job cleanup code + # because the later sometimes times out (https://github.com/kubernetes-csi/csi-release-tools/issues/24#issuecomment-554765872). + if [ "$JOB_NAME" ]; then + if kind get clusters | grep -q csi-prow; then + run kind delete cluster --name=csi-prow || die "kind delete failed" + fi + unset KUBECONFIG + fi +} + # Looks for the deployment as specified by CSI_PROW_DEPLOYMENT and CSI_PROW_KUBERNETES_VERSION # in the given directory. find_deployment () { @@ -1017,6 +1030,7 @@ main () { fi fi fi + delete_cluster_inside_prow_job fi if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then @@ -1047,6 +1061,7 @@ main () { fi fi fi + delete_cluster_inside_prow_job fi fi From 6d7602687053e4f282c16b4aea2da7956181df6e Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Mon, 11 Nov 2019 23:49:42 -0800 Subject: [PATCH 067/299] Add snapshotter CRDs after cluster setup Signed-off-by: Grant Griffiths --- .../prow.sh | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 3b9621a2..bc9c9f03 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -322,6 +322,9 @@ configvar CSI_PROW_E2E_ALPHA_GATES_1_16 'VolumeSnapshotDataSource=true' "alpha f configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" +# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment +configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0-rc4' "external-snapshotter version tag" + # Some tests are known to be unusable in a KinD cluster. For example, # stopping kubelet with "ssh systemctl stop kubelet" simply # doesn't work. Such tests should be written in a way that they verify @@ -657,6 +660,59 @@ install_hostpath () { fi } +# Installs all nessesary snapshotter CRDs +install_snapshot_crds() { + # Wait until volumesnapshot CRDs are in place. + CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/config/crd" + kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshotclasses.yaml" --validate=false + kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshots.yaml" --validate=false + kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshotcontents.yaml" --validate=false + cnt=0 + until kubectl get volumesnapshotclasses.snapshot.storage.k8s.io \ + && kubectl get volumesnapshots.snapshot.storage.k8s.io \ + && kubectl get volumesnapshotcontents.snapshot.storage.k8s.io; do + if [ $cnt -gt 30 ]; then + echo >&2 "ERROR: snapshot CRDs not ready after over 1 min" + exit 1 + fi + echo "$(date +%H:%M:%S)" "waiting for snapshot CRDs, attempt #$cnt" + cnt=$((cnt + 1)) + sleep 2 + done +} + +# Install snapshot controller and associated RBAC, retrying until the pod is running. +install_snapshot_controller() { + kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml" + cnt=0 + until kubectl get clusterrolebinding snapshot-controller-role; do + if [ $cnt -gt 30 ]; then + echo "Cluster role bindings:" + kubectl describe clusterrolebinding + echo >&2 "ERROR: snapshot controller RBAC not ready after over 5 min" + exit 1 + fi + echo "$(date +%H:%M:%S)" "waiting for snapshot RBAC setup complete, attempt #$cnt" + cnt=$((cnt + 1)) + sleep 10 + done + + + kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml" + cnt=0 + until kubectl get statefulset snapshot-controller | grep snapshot-controller | grep "1/1"; do + if [ $cnt -gt 30 ]; then + echo "Running statefulsets:" + kubectl describe statefulsets + echo >&2 "ERROR: snapshot controller not ready after over 5 min" + exit 1 + fi + echo "$(date +%H:%M:%S)" "waiting for snapshot controller deployment to complete, attempt #$cnt" + cnt=$((cnt + 1)) + sleep 10 + done +} + # collect logs and cluster status (like the version of all components, Kubernetes version, test version) collect_cluster_info () { cat < Date: Sat, 30 Nov 2019 00:29:00 +0530 Subject: [PATCH 068/299] Use kind v0.6.0 kind v0.6.0 appends the kubeconfig with the default config at ~/.kube/config. --- container-object-storage-interface-controller/prow.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index d719e980..b8823062 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -107,8 +107,7 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -# TODO: https://github.com/kubernetes-csi/csi-release-tools/issues/39 -configvar CSI_PROW_KIND_VERSION "86bc23d84ac12dcb56a0528890736e2c347c2dc3" "kind" +configvar CSI_PROW_KIND_VERSION "v0.6.0" "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -579,8 +578,7 @@ EOF die "Cluster creation failed again, giving up. See the 'kind-cluster' artifact directory for additional logs." fi fi - KUBECONFIG="$(kind get kubeconfig-path --name=csi-prow)" - export KUBECONFIG + export KUBECONFIG="${HOME}/.kube/config" } # Deletes kind cluster inside a prow job From 2958d48d9ba888f7fe2fd93ec995bab8f80ba2e3 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 2 Dec 2019 17:45:57 -0800 Subject: [PATCH 069/299] Create a kind cluster with two worker nodes so that the topology feature can be tested. Test cases that test accessing volumes from multiple nodes need to be skipped --- container-object-storage-interface-controller/prow.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index b8823062..815bc9d8 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -330,7 +330,11 @@ configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0-rc4' "external-snapshotter version tag # whether they can run with the current cluster provider, but until # they are, we filter them out by name. Like the other test selection # variables, this is again a space separated list of regular expressions. -configvar CSI_PROW_E2E_SKIP 'Disruptive' "tests that need to be skipped" +# +# "different node" test skips can be removed once +# https://github.com/kubernetes/kubernetes/pull/82678 has been backported +# to all the K8s versions we test against +configvar CSI_PROW_E2E_SKIP 'Disruptive|different\s+node' "tests that need to be skipped" # This is the directory for additional result files. Usually set by Prow, but # if not (for example, when invoking manually) it defaults to the work directory. @@ -526,6 +530,7 @@ apiVersion: kind.sigs.k8s.io/v1alpha3 nodes: - role: control-plane - role: worker +- role: worker EOF # kubeadm has API dependencies between apiVersion and Kubernetes version @@ -840,10 +845,6 @@ run_e2e () ( install_e2e || die "building e2e.test failed" install_ginkgo || die "installing ginkgo failed" - # TODO (?): multi-node cluster (depends on https://github.com/kubernetes-csi/csi-driver-host-path/pull/14). - # When running on a multi-node cluster, we need to figure out where the - # hostpath driver was deployed and set ClientNodeName accordingly. - generate_test_driver >"${CSI_PROW_WORK}/test-driver.yaml" || die "generating test-driver.yaml failed" # Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again From 93f1cff64786a93e487b6f112f3b6ee84180b7d5 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Tue, 3 Dec 2019 18:18:38 -0800 Subject: [PATCH 070/299] Improve README by adding an explicit Kubernetes dependency section --- .../README.md | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index cc40f161..08c82884 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -141,17 +141,6 @@ The `vendor` directory is optional. It is still present in projects because it avoids downloading sources during CI builds. If this is no longer deemed necessary, then a project can also remove the directory. -When using packages that are part of the Kubernetes source code, the -commands above are not enough because the [lack of semantic -versioning](https://github.com/kubernetes/kubernetes/issues/72638) -prevents `go mod` from finding newer releases. Importing directly from -`kubernetes/kubernetes` also needs `replace` statements to override -the fake `v0.0.0` versions -(https://github.com/kubernetes/kubernetes/issues/79384). The -`go-get-kubernetes.sh` script can be used to update all packages in -lockstep to a different Kubernetes version. It takes a single version -number like "1.16.0". - Conversion of a repository that uses `dep` to `go mod` can be done with: GO111MODULE=on go mod init @@ -160,3 +149,18 @@ Conversion of a repository that uses `dep` to `go mod` can be done with: GO111MODULE=on go mod vendor git rm -f Gopkg.toml Gopkg.lock git add go.mod go.sum vendor + +### Updating Kubernetes dependencies + +When using packages that are part of the Kubernetes source code, the +commands above are not enough because the [lack of semantic +versioning](https://github.com/kubernetes/kubernetes/issues/72638) +prevents `go mod` from finding newer releases. Importing directly from +`kubernetes/kubernetes` also needs `replace` statements to override +the fake `v0.0.0` versions +(https://github.com/kubernetes/kubernetes/issues/79384). The +`go-get-kubernetes.sh` script can be used to update all packages in +lockstep to a different Kubernetes version. Example usage: +``` +$ ./release-tools/go-get-kubernetes.sh 1.16.4 +``` From dc5f8d00228bcd0db99457d4f6c71b1b52b63387 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Tue, 3 Dec 2019 23:48:29 -0800 Subject: [PATCH 071/299] Improve snapshot pod running checks and improve version_gt Signed-off-by: Grant Griffiths --- .../prow.sh | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index d719e980..27c70512 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -713,10 +713,11 @@ install_snapshot_controller() { kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml" cnt=0 - until kubectl get statefulset snapshot-controller | grep snapshot-controller | grep "1/1"; do + expected_running_pods=$(curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${CSI_SNAPSHOTTER_VERSION}"/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml | grep replicas | cut -d ':' -f 2-) + while [ "$(kubectl get pods -l app=snapshot-controller | grep 'Running' -c)" -lt "$expected_running_pods" ]; do if [ $cnt -gt 30 ]; then - echo "Running statefulsets:" - kubectl describe statefulsets + echo "snapshot-controller pod status:" + kubectl describe pods -l app=snapshot-controller echo >&2 "ERROR: snapshot controller not ready after over 5 min" exit 1 fi @@ -996,8 +997,30 @@ make_test_to_junit () { fi } +# version_gt returns true if arg1 is greater than arg2. +# +# This function expects versions to be one of the following formats: +# X.Y.Z, release-X.Y.Z, vX.Y.Z +# +# where X,Y, and Z are any number. +# +# Partial versions (1.2, release-1.2) work as well. +# The follow substrings are stripped before version comparison: +# - "v" +# - "release-" +# +# Usage: +# version_gt release-1.3 v1.2.0 (returns true) +# version_gt v1.1.1 v1.2.0 (returns false) +# version_gt 1.1.1 v1.2.0 (returns false) +# version_gt 1.3.1 v1.2.0 (returns true) +# version_gt 1.1.1 release-1.2.0 (returns false) +# version_gt 1.2.0 1.2.2 (returns false) function version_gt() { - test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; + versions=$(for ver in "$@"; do ver=${ver#release-}; echo "${ver#v}"; done) + greaterVersion=${1#"release-"}; + greaterVersion=${greaterVersion#"v"}; + test "$(printf '%s' "$versions" | sort -V | head -n 1)" != "$greaterVersion" } main () { From e623d448421405b23337c17b5d9f81451d010035 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Wed, 4 Dec 2019 14:12:50 -0800 Subject: [PATCH 072/299] fix syntax for ppc64le build --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 7075a37e..a9b9d25d 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -70,7 +70,7 @@ build-%: check-go-version-go CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* if [ "$$ARCH" = "amd64" ]; then \ CGO_ENABLED=0 GOOS=windows go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*-ppc64le ./cmd/$* + CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*-ppc64le ./cmd/$* ; \ fi container-%: build-% From 84e75091f354b78cf2d4e6e3520edc295bc0c6cd Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 16 Dec 2019 19:13:38 -0800 Subject: [PATCH 073/299] Enable snapshot tests in 1.17 to be run in non-alpha jobs. This requires adding one more parallel e2e test run with a special focus flag because snapshot tests are still guarded with a "[Feature:VolumeSnapshotDataSource]" tag. The setting that skips all tests with "[Feature:.*]" has to be removed because it overrides the focus. We don't have serial snapshot tests yet. This needs to be modified again if we add any in the future. --- .../prow.sh | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 9bfdc2e2..c160f886 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -132,7 +132,7 @@ configvar CSI_PROW_BUILD_JOB true "building code in repo enabled" # use the same settings as for "latest" Kubernetes. This works # as long as there are no breaking changes in Kubernetes, like # deprecating or changing the implementation of an alpha feature. -configvar CSI_PROW_KUBERNETES_VERSION 1.15.3 "Kubernetes" +configvar CSI_PROW_KUBERNETES_VERSION 1.17.0 "Kubernetes" # This is a hack to workaround the issue that each version # of kind currently only supports specific patch versions of @@ -142,7 +142,6 @@ configvar CSI_PROW_KUBERNETES_VERSION 1.15.3 "Kubernetes" # # If the version is prefixed with "release-", then nothing # is overridden. -override_k8s_version "1.14.6" override_k8s_version "1.15.3" # CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and @@ -206,9 +205,9 @@ configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" # # CSI_PROW_E2E_REPO=none disables E2E testing. # TOOO: remove versioned variables and make e2e version match k8s version -configvar CSI_PROW_E2E_VERSION_1_14 v1.14.0 "E2E version for Kubernetes 1.14.x" configvar CSI_PROW_E2E_VERSION_1_15 v1.15.0 "E2E version for Kubernetes 1.15.x" configvar CSI_PROW_E2E_VERSION_1_16 v1.16.0 "E2E version for Kubernetes 1.16.x" +configvar CSI_PROW_E2E_VERSION_1_17 v1.17.0 "E2E version for Kubernetes 1.17.x" # TODO: add new CSI_PROW_E2E_VERSION entry for future Kubernetes releases configvar CSI_PROW_E2E_VERSION_LATEST master "E2E version for Kubernetes master" # testing against Kubernetes master is already tracking a moving target, so we might as well use a moving E2E version configvar CSI_PROW_E2E_REPO_LATEST https://github.com/kubernetes/kubernetes "E2E repo for Kubernetes >= 1.13.x" # currently the same for all versions @@ -278,6 +277,14 @@ tests_need_alpha_cluster () { tests_enabled "parallel-alpha" "serial-alpha" } +# Regex for non-alpha, feature-tagged tests that should be run. +# +# Starting with 1.17, snapshots is beta, but the E2E tests still have the +# [Feature:] tag. They need to be explicitly enabled. +configvar CSI_PROW_E2E_FOCUS_1_15 '^' "non-alpha, feature-tagged tests for Kubernetes = 1.15" # no tests to run, match nothing +configvar CSI_PROW_E2E_FOCUS_1_16 '^' "non-alpha, feature-tagged tests for Kubernetes = 1.16" # no tests to run, match nothing +configvar CSI_PROW_E2E_FOCUS_LATEST '\[Feature:VolumeSnapshotDataSource\]' "non-alpha, feature-tagged tests for Kubernetes >= 1.17" +configvar CSI_PROW_E2E_FOCUS "$(get_versioned_variable CSI_PROW_E2E_FOCUS "${csi_prow_kubernetes_version_suffix}")" "non-alpha, feature-tagged tests" # Serial vs. parallel is always determined by these regular expressions. # Individual regular expressions are seperated by spaces for readability @@ -313,12 +320,11 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi # kubernetes-csi components must be updated, either by disabling # the failing test for "latest" or by updating the test and not running # it anymore for older releases. -configvar CSI_PROW_E2E_ALPHA_GATES_1_14 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.14" configvar CSI_PROW_E2E_ALPHA_GATES_1_15 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.15" configvar CSI_PROW_E2E_ALPHA_GATES_1_16 'VolumeSnapshotDataSource=true' "alpha feature gates for Kubernetes 1.16" # TODO: add new CSI_PROW_ALPHA_GATES_xxx entry for future Kubernetes releases and # add new gates to CSI_PROW_E2E_ALPHA_GATES_LATEST. -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'VolumeSnapshotDataSource=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment @@ -1111,6 +1117,16 @@ main () { warn "E2E parallel failed" ret=1 fi + + # Run tests that are feature tagged, but non-alpha + # Ignore: Double quote to prevent globbing and word splitting. + # shellcheck disable=SC2086 + if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ + -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_FOCUS}"))" \ + -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}")"; then + warn "E2E parallel features failed" + ret=1 + fi fi if tests_enabled "serial"; then From fb6dd866b3022bf42456aa747d5ed7b1abff61b9 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Fri, 20 Dec 2019 16:30:25 -0800 Subject: [PATCH 074/299] Fix version_gt to work with kubernetes prefix Signed-off-by: Grant Griffiths --- container-object-storage-interface-controller/prow.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index c160f886..832da1ee 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -1013,6 +1013,7 @@ make_test_to_junit () { # The follow substrings are stripped before version comparison: # - "v" # - "release-" +# - "kubernetes-" # # Usage: # version_gt release-1.3 v1.2.0 (returns true) @@ -1022,8 +1023,9 @@ make_test_to_junit () { # version_gt 1.1.1 release-1.2.0 (returns false) # version_gt 1.2.0 1.2.2 (returns false) function version_gt() { - versions=$(for ver in "$@"; do ver=${ver#release-}; echo "${ver#v}"; done) + versions=$(for ver in "$@"; do ver=${ver#release-}; ver=${ver#kubernetes-}; echo "${ver#v}"; done) greaterVersion=${1#"release-"}; + greaterVersion=${greaterVersion#"kubernetes-"}; greaterVersion=${greaterVersion#"v"}; test "$(printf '%s' "$versions" | sort -V | head -n 1)" != "$greaterVersion" } From d1856fae745d4a570a700ee7236ce9d6ef009c5c Mon Sep 17 00:00:00 2001 From: saad-ali Date: Thu, 2 Jan 2020 14:29:40 -0800 Subject: [PATCH 075/299] Update prow hostpath driver version to 1.3.0-rc2 --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 832da1ee..ae51947d 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -187,7 +187,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION "v1.2.0" "hostpath driver" +configvar CSI_PROW_HOSTPATH_VERSION "v1.3.0-rc2" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" From efd971d0f7bdb98eeebaa867bf66a15cfef94c51 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 2 Jan 2020 14:33:46 -0800 Subject: [PATCH 076/299] Fix overriding of junit results by using unique names for each e2e run --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index ae51947d..e21a7ba9 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -1123,7 +1123,7 @@ main () { # Run tests that are feature tagged, but non-alpha # Ignore: Double quote to prevent globbing and word splitting. # shellcheck disable=SC2086 - if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ + if ! run_e2e parallel-features ${CSI_PROW_GINKO_PARALLEL} \ -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_FOCUS}"))" \ -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}")"; then warn "E2E parallel features failed" From 4d6e6598ad03e1d71bc7288953e0141e6bf545f7 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Tue, 7 Jan 2020 18:09:31 -0800 Subject: [PATCH 077/299] Update snapshotter to version v2.0.0 Signed-off-by: Grant Griffiths --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index e21a7ba9..eb451ef1 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -328,7 +328,7 @@ configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kub configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment -configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0-rc4' "external-snapshotter version tag" +configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0' "external-snapshotter version tag" # Some tests are known to be unusable in a KinD cluster. For example, # stopping kubelet with "ssh systemctl stop kubelet" simply From 87461aff58bdc7c36fcfb4f3c9e1141aafcce8e9 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 9 Jan 2020 17:25:38 -0800 Subject: [PATCH 078/299] Update hostpath driver version to get fix for connection-timeout --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index e21a7ba9..27309a79 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -187,7 +187,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # # When no deploy script is found (nothing in `deploy` directory, # CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION "v1.3.0-rc2" "hostpath driver" +configvar CSI_PROW_HOSTPATH_VERSION "v1.3.0-rc3" "hostpath driver" configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" From 512b12a3662b02e1b37678be1d6c90ca6bb5daa5 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Wed, 11 Dec 2019 17:56:08 -0800 Subject: [PATCH 079/299] Document the process for releasing a new sidecar --- .../SIDECAR_RELEASE_PROCESS.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md new file mode 100644 index 00000000..91a1e1b8 --- /dev/null +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -0,0 +1,90 @@ +# Sidecar Release Process + +This page describes the process for releasing a kubernetes-csi sidecar. + +## Prerequisites + +The release manager must: + +* Be a member of the kubernetes-csi organization. Open an + [issue](https://github.com/kubernetes/org/issues/new?assignees=&labels=area%2Fgithub-membership&template=membership.md&title=REQUEST%3A+New+membership+for+%3Cyour-GH-handle%3E) in + kubernetes/org to request membership +* Be a top level approver for the repository. To become a top level approver, + the candidate must demonstrate ownership and deep knowledge of the repository + through active maintainence, responding to and fixing issues, reviewing PRs, + test triage. +* Be part of the maintainers or admin group for the repository. admin is a + superset of maintainers, only maintainers level is required for cutting a + release. Membership can be requested by submitting a PR to kubernetes/org. + [Example](https://github.com/kubernetes/org/pull/1467) + +## Updating CI Jobs +Whenever a new Kubernetes minor version is released, our kubernetes-csi CI jobs +must be updated. + +[Our CI jobs](https://k8s-testgrid.appspot.com/sig-storage-csi-ci) have the +naming convention `-on-`. + +1. Jobs should be actively monitored to find and fix failures in sidecars and + infrastructure changes early in the development cycle. Test failures are sent + to kubernetes-sig-storage-test-failures@googlegroups.com. +1. "-on-master" jobs are the closest reflection to the new Kubernetes version. +1. Fixes to our prow.sh CI script can be tested in the [CSI hostpath + repo](https://github.com/kubernetes-csi/csi-driver-host-path) by modifying + [prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/release-tools/prow.sh) + along with any overrides in + [.prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/.prow.sh) + to mirror the failing environment. Once e2e tests are passing (verify-unit tests + will fail), then the prow.sh changes can be submitted to [csi-release-tools](https://github.com/kubernetes-csi/csi-release-tools). +1. Changes can then be updated in all the sidecar repos and hostpath driver repo + by following the [update + instructions](https://github.com/kubernetes-csi/csi-release-tools/blob/master/README.md#sharing-and-updating). +1. New pull and CI jobs are configured by + [gen-jobs.sh](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-csi/gen-jobs.sh). + New pull jobs that have been unverified should be initially made optional. + [Example](https://github.com/kubernetes/test-infra/pull/15055) +1. Once new pull and CI jobs have been verified, and the new Kubernetes version + is released, we can make the optional jobs required, and also remove the + Kubernetes versions that are no longer supported. + +## Release Process +1. Identify all issues and ongoing PRs that should go into the release, and + drive them to resolution. +1. Download [K8s release notes + generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes) +1. Generate release notes for the release. Replace arguments with the relevant + information. + ``` + GITHUB_TOKEN= ./release-notes --start-sha=0ed6978fd199e3ca10326b82b4b8b8e916211c9b --end-sha=3cb3d2f18ed8cb40371c6d8886edcabd1f27e7b9 \ + --github-org=kubernetes-csi --github-repo=external-attacher -branch=master -output out.md + ``` + * `--start-sha` should point to the last release from the same branch. For + example: + * `1.X-1.0` tag when releasing `1.X.0` + * `1.X.Y-1` tag when releasing `1.X.Y` +1. Compare the generated output to the new commits for the release to check if + any notable change missed a release note. +1. Reword release notes as needed. Make sure to check notes for breaking + changes and deprecations. +1. If release is a new major/minor version, create a new `CHANGELOG-..md` + file. Otherwise, add the release notes to the top of the existing CHANGELOG + file for that minor version. +1. Submit a PR for the CHANGELOG changes. +1. Submit a PR for README changes, in particular, Compatibility, Feature status, + and any other sections that may need updating. +1. Check that all [canary CI + jobs](https://k8s-testgrid.appspot.com/sig-storage-csi-ci) are passing, + and that test coverage is adequate for the changes that are going into the release. +1. Make sure that no new PRs have merged in the meantime, and no PRs are in + flight and soon to be merged. +1. Create a new release following a previous release as a template. Be sure to select the correct + branch. This requires Github release permissions as required by the prerequisites. + [external-provisioner example](https://github.com/kubernetes-csi/external-provisioner/releases/new) +1. If release was a new major/minor version, create a new `release-` + branch at that commit. +1. Update [kubernetes-csi/docs](https://github.com/kubernetes-csi/docs) sidecar + and feature pages with the new released version. +1. After all the sidecars have been released, update + CSI hostpath driver with the new sidecars in the [CSI repo](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy) + and [k/k + in-tree](https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/storage-csi/hostpath/hostpath) From 90e816e81ce556033d445b9c53662577a352124c Mon Sep 17 00:00:00 2001 From: wangzheng03 Date: Sun, 19 Jan 2020 09:42:26 +0800 Subject: [PATCH 080/299] fix incorrect link --- container-object-storage-interface-controller/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 08c82884..60eab2a9 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -81,7 +81,7 @@ on what is enabled in Prow, see https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-csi Test results for periodic jobs are visible in -https://testgrid.k8s.io/sig-storage-csi +https://testgrid.k8s.io/sig-storage-csi-ci It is possible to reproduce the Prow testing locally on a suitable machine: - Linux host From 7248bcce3967d509cbad40c14d231aec431114e4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 10 Feb 2020 13:08:33 +0100 Subject: [PATCH 081/299] prow.sh: generic driver installation This relies on a slightly different deployment script: a "deploy.sh" must exist which knows that it has to dump a test driver configurion into the file pointed to with CSI_PROW_TEST_DRIVER, if that env variable is set. That way, we no longer need to know what capabilities the installed driver has. --- .../prow.sh | 104 ++++++++---------- 1 file changed, 43 insertions(+), 61 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 118c5bd1..bb80741e 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -157,7 +157,9 @@ csi_prow_kubernetes_version_suffix="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | tr # the caller. configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csiprow.XXXXXXXXXX")" "work directory" -# The hostpath deployment script is searched for in several places. +# By default, this script tests sidecars with the CSI hostpath driver, +# using the install_csi_driver function. That function depends on +# a deployment script that it searches for in several places: # # - The "deploy" directory in the current repository: this is useful # for the situation that a component becomes incompatible with the @@ -165,11 +167,11 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # own example until the shared one can be updated; it's also how # csi-driver-host-path itself provides the example. # -# - CSI_PROW_HOSTPATH_VERSION of the CSI_PROW_HOSTPATH_REPO is checked +# - CSI_PROW_DRIVER_VERSION of the CSI_PROW_DRIVER_REPO is checked # out: this allows other repos to reference a version of the example # that is known to be compatible. # -# - The csi-driver-host-path/deploy directory has multiple sub-directories, +# - The /deploy directory can have multiple sub-directories, # each with different deployments (stable set of images for Kubernetes 1.13, # stable set of images for Kubernetes 1.14, canary for latest Kubernetes, etc.). # This is necessary because there may be incompatible changes in the @@ -186,16 +188,26 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # "none" disables the deployment of the hostpath driver. # # When no deploy script is found (nothing in `deploy` directory, -# CSI_PROW_HOSTPATH_REPO=none), nothing gets deployed. -configvar CSI_PROW_HOSTPATH_VERSION "v1.3.0-rc3" "hostpath driver" -configvar CSI_PROW_HOSTPATH_REPO https://github.com/kubernetes-csi/csi-driver-host-path "hostpath repo" +# CSI_PROW_DRIVER_REPO=none), nothing gets deployed. +# +# If the deployment script is called with CSI_PROW_TEST_DRIVER= as +# environment variable, then it must write a suitable test driver configuration +# into that file in addition to installing the driver. +configvar CSI_PROW_DRIVER_VERSION "v1.3.0-rc4" "CSI driver version" +configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" -configvar CSI_PROW_HOSTPATH_DRIVER_NAME "hostpath.csi.k8s.io" "the hostpath driver name" -# If CSI_PROW_HOSTPATH_CANARY is set (typically to "canary", but also -# "1.0-canary"), then all image versions are replaced with that -# version tag. -configvar CSI_PROW_HOSTPATH_CANARY "" "hostpath image" +# The install_csi_driver function may work also for other CSI drivers, +# as long as they follow the conventions of the CSI hostpath driver. +# If they don't, then a different install function can be provided in +# a .prow.sh file and this config variable can be overridden. +configvar CSI_PROW_DRIVER_INSTALL "install_csi_driver" "name of the shell function which installs the CSI driver" + +# If CSI_PROW_DRIVER_CANARY is set (typically to "canary", but also +# version tag. Usually empty. CSI_PROW_HOSTPATH_CANARY is +# accepted as alternative name because some test-infra jobs +# still use that name. +configvar CSI_PROW_DRIVER_CANARY "${CSI_PROW_HOSTPATH_CANARY}" "driver image override for canary images" # The E2E testing can come from an arbitrary repo. The expectation is that # the repo supports "go test ./test/e2e -args --storage.testdriver" (https://github.com/kubernetes/kubernetes/pull/72836) @@ -613,7 +625,7 @@ find_deployment () { # Fixed deployment name? Use it if it exists, otherwise fail. if [ "${CSI_PROW_DEPLOYMENT}" ]; then - file="$dir/${CSI_PROW_DEPLOYMENT}/deploy-hostpath.sh" + file="$dir/${CSI_PROW_DEPLOYMENT}/deploy.sh" if ! [ -e "$file" ]; then return 1 fi @@ -623,9 +635,9 @@ find_deployment () { # Ignore: See if you can use ${variable//search/replace} instead. # shellcheck disable=SC2001 - file="$dir/kubernetes-$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1.\2/')/deploy-hostpath.sh" + file="$dir/kubernetes-$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1.\2/')/deploy.sh" if ! [ -e "$file" ]; then - file="$dir/kubernetes-latest/deploy-hostpath.sh" + file="$dir/kubernetes-latest/deploy.sh" if ! [ -e "$file" ]; then return 1 fi @@ -633,12 +645,11 @@ find_deployment () { echo "$file" } -# This installs the hostpath driver example. CSI_PROW_HOSTPATH_CANARY overrides all -# image versions with that canary version. The parameters of install_hostpath can be -# used to override registry and/or tag of individual images (CSI_PROVISIONER_REGISTRY=localhost:9000 -# CSI_PROVISIONER_TAG=latest). -install_hostpath () { - local images deploy_hostpath +# This installs the CSI driver. It's called with a list of env variables +# that override the default images. CSI_PROW_DRIVER_CANARY overrides all +# image versions with that canary version. +install_csi_driver () { + local images deploy_driver images="$*" if [ "${CSI_PROW_DEPLOYMENT}" = "none" ]; then @@ -654,31 +665,31 @@ install_hostpath () { done fi - if deploy_hostpath="$(find_deployment "$(pwd)/deploy")"; then + if deploy_driver="$(find_deployment "$(pwd)/deploy")"; then : - elif [ "${CSI_PROW_HOSTPATH_REPO}" = "none" ]; then + elif [ "${CSI_PROW_DRIVER_REPO}" = "none" ]; then return 1 else - git_checkout "${CSI_PROW_HOSTPATH_REPO}" "${CSI_PROW_WORK}/hostpath" "${CSI_PROW_HOSTPATH_VERSION}" --depth=1 || die "checking out hostpath repo failed" - if deploy_hostpath="$(find_deployment "${CSI_PROW_WORK}/hostpath/deploy")"; then + git_checkout "${CSI_PROW_DRIVER_REPO}" "${CSI_PROW_WORK}/csi-driver" "${CSI_PROW_DRIVER_VERSION}" --depth=1 || die "checking out CSI driver repo failed" + if deploy_driver="$(find_deployment "${CSI_PROW_WORK}/csi-driver/deploy")"; then : else - die "deploy-hostpath.sh not found in ${CSI_PROW_HOSTPATH_REPO} ${CSI_PROW_HOSTPATH_VERSION}. To disable E2E testing, set CSI_PROW_HOSTPATH_REPO=none" + die "deploy.sh not found in ${CSI_PROW_DRIVER_REPO} ${CSI_PROW_DRIVER_VERSION}. To disable E2E testing, set CSI_PROW_DRIVER_REPO=none" fi fi - if [ "${CSI_PROW_HOSTPATH_CANARY}" != "stable" ]; then - images="$images IMAGE_TAG=${CSI_PROW_HOSTPATH_CANARY}" + if [ "${CSI_PROW_DRIVER_CANARY}" != "stable" ]; then + images="$images IMAGE_TAG=${CSI_PROW_DRIVER_CANARY}" fi # Ignore: Double quote to prevent globbing and word splitting. # It's intentional here for $images. # shellcheck disable=SC2086 - if ! run env $images "${deploy_hostpath}"; then + if ! run env "CSI_PROW_TEST_DRIVER=${CSI_PROW_WORK}/test-driver.yaml" $images "${deploy_driver}"; then # Collect information about failed deployment before failing. collect_cluster_info (start_loggers >/dev/null; wait) info "For container output see job artifacts." - die "deploying the hostpath driver with ${deploy_hostpath} failed" + die "deploying the CSI driver with ${deploy_driver} failed" fi } @@ -804,33 +815,6 @@ install_sanity () ( run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test -c -o "${CSI_PROW_WORK}/csi-sanity" "${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity" || die "building csi-sanity failed" ) -# The default implementation of this function generates a external -# driver test configuration for the hostpath driver. -# -# The content depends on both what the E2E suite expects and what the -# installed hostpath driver supports. Generating it here seems prone -# to breakage, but it is uncertain where a better place might be. -generate_test_driver () { - cat <"${CSI_PROW_WORK}/test-driver.yaml" || die "generating test-driver.yaml failed" - # Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again # and to avoid the large number of "skipped" tests that we get from using # the full Kubernetes E2E testsuite while only running a few tests. @@ -1063,7 +1045,7 @@ main () { cmds="$(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//')" # Get the image that was just built (if any) from the # top-level Makefile CMDS variable and set the - # deploy-hostpath.sh env variables for it. We also need to + # deploy.sh env variables for it. We also need to # side-load those images into the cluster. for i in $cmds; do e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) @@ -1101,7 +1083,7 @@ main () { fi # Installing the driver might be disabled. - if install_hostpath "$images"; then + if ${CSI_PROW_DRIVER_INSTALL} "$images"; then collect_cluster_info if sanity_enabled; then @@ -1158,7 +1140,7 @@ main () { fi # Installing the driver might be disabled. - if install_hostpath "$images"; then + if ${CSI_PROW_DRIVER_INSTALL} "$images"; then collect_cluster_info if tests_enabled "parallel-alpha"; then From fd495119ffdb4076b4b328e6f87b360333f6fe44 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 10 Feb 2020 11:06:31 +0100 Subject: [PATCH 082/299] prow.sh: also configure feature gates for kubelet That this hasn't been done before is an oversight. Apparently it hasn't been a problem because there never have been feature gates that mattered? --- container-object-storage-interface-controller/prow.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 118c5bd1..6778e8b8 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -568,6 +568,13 @@ kubeadmConfigPatches: nodeRegistration: kubeletExtraArgs: "feature-gates": "$gates" +- | + apiVersion: kubelet.config.k8s.io/v1beta1 + kind: KubeletConfiguration + metadata: + name: config + featureGates: +$(list_gates "$gates") - | apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration From 33af482957cdbef54e6f972d9c27f9dac2ac4a1f Mon Sep 17 00:00:00 2001 From: Jan Wozniak Date: Thu, 13 Feb 2020 11:21:45 +0100 Subject: [PATCH 083/299] Change 'make test-vet' to call 'go vet' --- container-object-storage-interface-controller/build.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index a9b9d25d..3bf3391c 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -113,7 +113,7 @@ test-go: test: test-vet test-vet: @ echo; echo "### $@:" - go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` + go vet $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` .PHONY: test-fmt test: test-fmt From 62da19e7455fb2e394ff4834127ee80eb7e107a2 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 14 Feb 2020 09:38:16 +0100 Subject: [PATCH 084/299] prow.sh: use 1.3.0 hostpath driver for testing The final 1.3.0 release of the hostpath driver really uses the 1.3.0 driver image in its deployment, in contrast to the previous -rc candidates which still used 1.2.0. --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 0331ac3f..d54dea51 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -193,7 +193,7 @@ configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csip # If the deployment script is called with CSI_PROW_TEST_DRIVER= as # environment variable, then it must write a suitable test driver configuration # into that file in addition to installing the driver. -configvar CSI_PROW_DRIVER_VERSION "v1.3.0-rc4" "CSI driver version" +configvar CSI_PROW_DRIVER_VERSION "v1.3.0" "CSI driver version" configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" From 690567e03834b2f989637a4a445bcc682ca2ce16 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 4 Mar 2020 11:19:09 +0100 Subject: [PATCH 085/299] build for multiple platforms only in CI, add s390x Developers should not be forced to build for all platforms by default. We also don't want to copy-and-paste the go invocation for each new platform. To address both, the target platform(s) are now configurable via BUILD_PLATFORMS and additional platforms are only enabled in the Prow CI. For now this serves as a test that the source actually compiles for multiple platforms. Building images for different target platforms is a different problem. --- .../build.make | 21 ++++++++++++------- .../prow.sh | 4 +++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 3bf3391c..5c9793c2 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -60,18 +60,25 @@ else TESTARGS = endif -ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) - # Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables # to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. +# BUILD_PLATFORMS contains a set of triplets, +# separated by semicolon. An empty variable or empty entry (= just a +# semicolon) builds for the default platform of the current Go +# toolchain. +BUILD_PLATFORMS = + +# This builds each command (= the sub-directories of ./cmd) for the target platform(s) +# defined by BUILD_PLATFORMS. build-%: check-go-version-go mkdir -p bin - CGO_ENABLED=0 GOOS=linux go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$* ./cmd/$* - if [ "$$ARCH" = "amd64" ]; then \ - CGO_ENABLED=0 GOOS=windows go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*.exe ./cmd/$* ; \ - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o ./bin/$*-ppc64le ./cmd/$* ; \ - fi + echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \ + if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o "./bin/$*$$suffix" ./cmd/$*); then \ + echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \ + exit 1; \ + fi; \ + done container-%: build-% docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index d54dea51..30cb3842 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -85,6 +85,8 @@ get_versioned_variable () { echo "$value" } +configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" + # If we have a vendor directory, then use it. We must be careful to only # use this for "make" invocations inside the project's repo itself because # setting it globally can break other go usages (like "go get " @@ -1026,7 +1028,7 @@ main () { images= if ${CSI_PROW_BUILD_JOB}; then # A successful build is required for testing. - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make all' failed" + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" "BUILD_PLATFORMS=${CSI_PROW_BUILD_PLATFORMS}" || die "'make all' failed" # We don't want test failures to prevent E2E testing below, because the failure # might have been minor or unavoidable, for example when experimenting with # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" From 5bdcde1be909e4b48c272211fd8de956776ea6c9 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Wed, 11 Mar 2020 10:48:03 -0700 Subject: [PATCH 086/299] Update snapshotter to version 2.0.1 Signed-off-by: Grant Griffiths --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 30cb3842..86b2bf05 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -342,7 +342,7 @@ configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kub configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" # Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment -configvar CSI_SNAPSHOTTER_VERSION 'v2.0.0' "external-snapshotter version tag" +configvar CSI_SNAPSHOTTER_VERSION 'v2.0.1' "external-snapshotter version tag" # Some tests are known to be unusable in a KinD cluster. For example, # stopping kubelet with "ssh systemctl stop kubelet" simply From 7e46e614059a429c585c5ef12376bb3c72b5527e Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 17 Apr 2020 09:02:07 -0700 Subject: [PATCH 087/299] update release tools instructions --- .../SIDECAR_RELEASE_PROCESS.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md index 91a1e1b8..c8aaa4e8 100644 --- a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -54,14 +54,21 @@ naming convention `-on-`. generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes) 1. Generate release notes for the release. Replace arguments with the relevant information. - ``` - GITHUB_TOKEN= ./release-notes --start-sha=0ed6978fd199e3ca10326b82b4b8b8e916211c9b --end-sha=3cb3d2f18ed8cb40371c6d8886edcabd1f27e7b9 \ - --github-org=kubernetes-csi --github-repo=external-attacher -branch=master -output out.md - ``` - * `--start-sha` should point to the last release from the same branch. For - example: - * `1.X-1.0` tag when releasing `1.X.0` - * `1.X.Y-1` tag when releasing `1.X.Y` + * For new minor releases on master: + ``` + GITHUB_TOKEN= release-notes --discover=mergebase-to-latest + --github-org=kubernetes-csi --github-repo=external-provisioner + --required-author="" --output out.md + ``` + * For new patch releases on a release branch: + ``` + GITHUB_TOKEN= release-notes --branch=release-1.1 + --start-rev=v1.1.1 --end-sha=f0a9219b29cc9053047c39d149ce9b22bc7b918b + --github-org=kubernetes-csi --github-repo=external-provisioner + --required-author="" --output out.md + ``` + * `--start-rev` should point to the last patch release from the release branch. + * `--end-sha` should point to the latest commit from the release branch. 1. Compare the generated output to the new commits for the release to check if any notable change missed a release note. 1. Reword release notes as needed. Make sure to check notes for breaking From c71224267fd0931908710d1ebd771cd073aebdf6 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Wed, 15 Apr 2020 19:11:33 -0700 Subject: [PATCH 088/299] Support local snapshot RBAC for pull jobs Signed-off-by: Grant Griffiths --- .../prow.sh | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 86b2bf05..0b962f04 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -1064,18 +1064,24 @@ main () { # always pulling the image # (https://github.com/kubernetes-sigs/kind/issues/328). docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed" - done - if [ -e deploy/kubernetes/rbac.yaml ]; then - # This is one of those components which has its own RBAC rules (like external-provisioner). - # We are testing a locally built image and also want to test with the the current, - # potentially modified RBAC rules. - if [ "$(echo "$cmds" | wc -w)" != 1 ]; then - die "ambiguous deploy/kubernetes/rbac.yaml: need exactly one command, got: $cmds" + # For components with multiple cmds, the RBAC file should be in the following format: + # rbac-$cmd.yaml + # If this file cannot be found, we can default to the standard location: + # deploy/kubernetes/rbac.yaml + rbac_file_path=$(find . -type f -name "rbac-$i.yaml") + if [ "$rbac_file_path" == "" ]; then + rbac_file_path="$(pwd)/deploy/kubernetes/rbac.yaml" fi - e=$(echo "$cmds" | tr '[:lower:]' '[:upper:]' | tr - _) - images="$images ${e}_RBAC=$(pwd)/deploy/kubernetes/rbac.yaml" - fi + + if [ -e "$rbac_file_path" ]; then + # This is one of those components which has its own RBAC rules (like external-provisioner). + # We are testing a locally built image and also want to test with the the current, + # potentially modified RBAC rules. + e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) + images="$images ${e}_RBAC=$rbac_file_path" + fi + done fi if tests_need_non_alpha_cluster; then From c7964eff24e98c4a35a460897516491cc3ffdbcd Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 23 Apr 2020 10:21:49 -0700 Subject: [PATCH 089/299] Update patch release notes generation command --- .../SIDECAR_RELEASE_PROCESS.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md index c8aaa4e8..6960607e 100644 --- a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -50,7 +50,7 @@ naming convention `-on-`. ## Release Process 1. Identify all issues and ongoing PRs that should go into the release, and drive them to resolution. -1. Download [K8s release notes +1. Download v2.8+ [K8s release notes generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes) 1. Generate release notes for the release. Replace arguments with the relevant information. @@ -62,13 +62,10 @@ naming convention `-on-`. ``` * For new patch releases on a release branch: ``` - GITHUB_TOKEN= release-notes --branch=release-1.1 - --start-rev=v1.1.1 --end-sha=f0a9219b29cc9053047c39d149ce9b22bc7b918b + GITHUB_TOKEN= release-notes --discover=patch-to-latest --branch=release-1.1 --github-org=kubernetes-csi --github-repo=external-provisioner --required-author="" --output out.md ``` - * `--start-rev` should point to the last patch release from the release branch. - * `--end-sha` should point to the latest commit from the release branch. 1. Compare the generated output to the new commits for the release to check if any notable change missed a release note. 1. Reword release notes as needed. Make sure to check notes for breaking From ecb19da89034085a257f3d294aaf3374b0aa3131 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 28 May 2020 10:22:20 +0200 Subject: [PATCH 090/299] cloud build: initial set of shared files The approach taken here extends the existing support for cross-compiling binaries on the build host and specifying the Go compiler: Go is installed if needed (as in Prow testing), binaries are build on the host, then one image is created for each platform, and finally those are combined into a single multi-architecture image. --- .../build.make | 63 +++++++++++++++++++ .../cloudbuild.sh | 6 ++ .../cloudbuild.yaml | 44 +++++++++++++ .../prow.sh | 14 +++++ 4 files changed, 127 insertions(+) create mode 100755 container-object-storage-interface-controller/cloudbuild.sh create mode 100644 container-object-storage-interface-controller/cloudbuild.yaml diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 5c9793c2..e3a44f96 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -105,6 +105,69 @@ build: $(CMDS:%=build-%) container: $(CMDS:%=container-%) push: $(CMDS:%=push-%) +# Additional parameters are needed when pushing to a local registry, +# see https://github.com/docker/buildx/issues/94. +# However, that then runs into https://github.com/docker/cli/issues/2396. +# +# What works for local testing is: +# make push-multiarch PULL_BASE_REF=master REGISTRY_NAME= BUILD_PLATFORMS="linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" +DOCKER_BUILDX_CREATE_ARGS ?= + +# This target builds a multiarch image for one command using Moby BuildKit builder toolkit. +# Docker Buildx is included in Docker 19.03. +# +# ./cmd//Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows]. +# BUILD_PLATFORMS determines which individual images are included in the multiarch image. +# PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name, and determines +# the tag for the resulting multiarch image. +push-multiarch-%: check-pull-base-ref build-% + set -ex; \ + DOCKER_CLI_EXPERIMENTAL=enabled; \ + export DOCKER_CLI_EXPERIMENTAL; \ + docker buildx create $(DOCKER_BUILDX_CREATE_ARGS) --use --name multiarchimage-buildertest; \ + trap "docker buildx rm multiarchimage-buildertest" EXIT; \ + dockerfile_linux=$$(if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi); \ + dockerfile_windows=$$(if [ -e ./cmd/$*/Dockerfile.Windows ]; then echo ./cmd/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \ + if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \ + pushMultiArch () { \ + tag=$$1; \ + echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do \ + docker buildx build --push \ + --tag $(IMAGE_NAME):$$arch-$$os-$$tag \ + --platform=$$os/$$arch \ + --file $$(eval echo \$${dockerfile_$$os}) \ + --build-arg binary=./bin/$*$$suffix \ + --label revision=$(REV) \ + .; \ + done; \ + images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do echo $(IMAGE_NAME):$$arch-$$os-$$tag; done); \ + docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \ + docker manifest push -p $(IMAGE_NAME):$$tag; \ + }; \ + if [ $(PULL_BASE_REF) = "master" ]; then \ + : "creating or overwriting canary image"; \ + pushMultiArch canary; \ + elif echo $(PULL_BASE_REF) | grep -q -e 'release-*' ; then \ + : "creating or overwriting canary image for release branch"; \ + release_canary_tag=$$(echo $(PULL_BASE_REF) | cut -f2 -d '-')-canary; \ + pushMultiArch $$release_canary_tag; \ + elif docker pull $(IMAGE_NAME):$(PULL_BASE_REF) 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$(PULL_BASE_REF) not found"; then \ + : "creating release image"; \ + pushMultiArch $(PULL_BASE_REF); \ + else \ + : "ERROR: release image $(IMAGE_NAME):$(PULL_BASE_REF) already exists: a new tag is required!"; \ + exit 1; \ + fi + +.PHONY: check-pull-base-ref +check-pull-base-ref: + if ! [ "$(PULL_BASE_REF)" ]; then \ + echo >&2 "ERROR: PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name."; \ + exit 1; \ + fi + +push-multiarch: $(CMDS:%=push-multiarch-%) + clean: -rm -rf bin diff --git a/container-object-storage-interface-controller/cloudbuild.sh b/container-object-storage-interface-controller/cloudbuild.sh new file mode 100755 index 00000000..3ba11eca --- /dev/null +++ b/container-object-storage-interface-controller/cloudbuild.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +# shellcheck disable=SC1091 +. release-tools/prow.sh + +gcr_cloud_build diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml new file mode 100644 index 00000000..1def1499 --- /dev/null +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -0,0 +1,44 @@ +# A configuration file for multi-arch image building with the Google cloud build service. +# +# Repos using this file must: +# - import csi-release-tools +# - add a symlink cloudbuild.yaml -> release-tools/cloudbuild.yaml +# - add a .cloudbuild.sh which can be a custom file or a symlink +# to release-tools/cloudbuild.sh +# - accept "binary" as build argument in their Dockerfile(s) (see +# https://github.com/pohly/node-driver-registrar/blob/3018101987b0bb6da2a2657de607174d6e3728f7/Dockerfile#L4-L6) +# because binaries will get built for different architectures and then +# get copied from the built host into the container image +# +# See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md +# for more details on image pushing process in Kubernetes. + +# This must be specified in seconds. If omitted, defaults to 600s (10 mins). +timeout: 1200s +# This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, +# or any new substitutions added in the future. +options: + substitution_option: ALLOW_LOOSE +steps: + # The image must contain bash and curl. Ideally it should also contain + # the desired version of Go (currently defined in release-tools/travis.yml), + # but that just speeds up the build and is not required. + - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200421-a2bf5f8' + entrypoint: ./.cloudbuild.sh + env: + - GIT_TAG=${_GIT_TAG} + - PULL_BASE_REF=${_PULL_BASE_REF} + - REGISTRY_NAME=gcr.io/${_STAGING_PROJECT} + - HOME=/root +substitutions: + # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and + # can be used as a substitution. + _GIT_TAG: '12345' + # _PULL_BASE_REF will contain the ref that was pushed to trigger this build - + # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'. + _PULL_BASE_REF: 'master' + # The default gcr.io staging project for Kubernetes-CSI + # (=> https://console.cloud.google.com/gcr/images/k8s-staging-csi/GLOBAL). + # Might be overridden in the Prow build job for a repo which wants + # images elsewhere. + _STAGING_PROJECT: 'k8s-staging-csi' diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 0b962f04..93964e18 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -1189,3 +1189,17 @@ main () { return "$ret" } + +# This function can be called by a repo's top-level cloudbuild.sh: +# it handles environment set up in the GCR cloud build and then +# invokes "make push-multiarch" to do the actual image building. +gcr_cloud_build () { + # Register gcloud as a Docker credential helper. + # Required for "docker buildx build --push". + gcloud auth configure-docker + + # Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. + REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') + + run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make push-multiarch REV="${REV}" REGISTRY_NAME="${REGISTRY_NAME}" BUILD_PLATFORMS="${CSI_PROW_BUILD_PLATFORMS}" +} From bfa47bd4f8598688c37fd7b18e1c2b5c88cbe055 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Jun 2020 11:03:47 +0200 Subject: [PATCH 091/299] build.make: fix push-multiarch ambiguity "make push-multiarch" matched both push-multiarch and push-%. This seems to be none-deterministic and in at least one repo (external-provisioner), make picked the wildcard rule which then failed because there is no "multiarch" command. This ambiguity gets resolved by instantiating the wildcard rules only for existing commands. The advantage also is that "make push-no-such-command" will fail with an obvious "No rule to make target 'push-no-such-command'" instead of attempting to build the command. --- container-object-storage-interface-controller/build.make | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index e3a44f96..0e4a9baa 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -71,7 +71,7 @@ BUILD_PLATFORMS = # This builds each command (= the sub-directories of ./cmd) for the target platform(s) # defined by BUILD_PLATFORMS. -build-%: check-go-version-go +$(CMDS:%=build-%): build-%: check-go-version-go mkdir -p bin echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \ if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o "./bin/$*$$suffix" ./cmd/$*); then \ @@ -80,10 +80,10 @@ build-%: check-go-version-go fi; \ done -container-%: build-% +$(CMDS:%=container-%): container-%: build-% docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . -push-%: container-% +$(CMDS:%=push-%): push-%: container-% set -ex; \ push_image () { \ docker tag $*:latest $(IMAGE_NAME):$$tag; \ @@ -120,7 +120,7 @@ DOCKER_BUILDX_CREATE_ARGS ?= # BUILD_PLATFORMS determines which individual images are included in the multiarch image. # PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name, and determines # the tag for the resulting multiarch image. -push-multiarch-%: check-pull-base-ref build-% +$(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-% set -ex; \ DOCKER_CLI_EXPERIMENTAL=enabled; \ export DOCKER_CLI_EXPERIMENTAL; \ From 0c6cf1601e6546b324397e833e5fe354de031dee Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Jun 2020 11:04:29 +0200 Subject: [PATCH 092/299] build.make: properly declare push-multiarch It's not a real file and thus should better be marked as phony. --- container-object-storage-interface-controller/build.make | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 0e4a9baa..83d903e0 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -166,6 +166,7 @@ check-pull-base-ref: exit 1; \ fi +.PHONY: push-multiarch push-multiarch: $(CMDS:%=push-multiarch-%) clean: From 181f12989c1b7940d629de1faabeaabf521c137b Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 3 Jun 2020 11:05:05 +0200 Subject: [PATCH 093/299] build.make: optional inclusion of Windows in multiarch images Most repos inherit the default BUILD_PLATFORMS, which includes Windows, but don't have the necessary Dockerfile.Windows yet. To simplify the rollout of multiarch image builds, Windows binary building continues to be tested (i.e. BUILD_PLATFORMS remains unchanged), but push-multiarch skips Windows if the Dockerfile.Windows is missing. --- container-object-storage-interface-controller/build.make | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/container-object-storage-interface-controller/build.make b/container-object-storage-interface-controller/build.make index 83d903e0..c17a1c19 100644 --- a/container-object-storage-interface-controller/build.make +++ b/container-object-storage-interface-controller/build.make @@ -117,6 +117,10 @@ DOCKER_BUILDX_CREATE_ARGS ?= # Docker Buildx is included in Docker 19.03. # # ./cmd//Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows]. +# It is currently optional: if no such file exists, Windows images are not included, +# even when Windows is listed in BUILD_PLATFORMS. That way, projects can test that +# Windows binaries can be built before adding a Dockerfile for it. +# # BUILD_PLATFORMS determines which individual images are included in the multiarch image. # PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name, and determines # the tag for the resulting multiarch image. @@ -129,6 +133,9 @@ $(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-% dockerfile_linux=$$(if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi); \ dockerfile_windows=$$(if [ -e ./cmd/$*/Dockerfile.Windows ]; then echo ./cmd/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \ if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \ + if ! [ -f "$$dockerfile_windows" ]; then \ + build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe//g' -e 's/; *;/;/g')"; \ + fi; \ pushMultiArch () { \ tag=$$1; \ echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do \ From d6c108da62a83917e5c8b6feeff37ca656fd491f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Jun 2020 10:52:04 +0200 Subject: [PATCH 094/299] cloud build: initialize support for running commands in Dockerfile If the Dockerfile needs to run some command, that step fails unless QEMU is set up properly first: failed to solve: rpc error: code = Unknown desc = failed to load LLB: runtime execution on platform linux/ppc64le not supported --- container-object-storage-interface-controller/prow.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 93964e18..32ec871a 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -1198,6 +1198,12 @@ gcr_cloud_build () { # Required for "docker buildx build --push". gcloud auth configure-docker + if find . -name Dockerfile | grep -v ^./vendor | xargs --no-run-if-empty cat | grep -q ^RUN; then + # Needed for "RUN" steps on non-linux/amd64 platforms. + # See https://github.com/multiarch/qemu-user-static#getting-started + (set -x; docker run --rm --privileged multiarch/qemu-user-static --reset -p yes) + fi + # Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') From f4417ccfbcb4b15b8cb08677f83699b890a96542 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 12 Jun 2020 15:48:26 +0200 Subject: [PATCH 095/299] cloud build: k8s-staging-sig-storage As discussed in https://github.com/kubernetes/k8s.io/pull/943, we want to consolidate under k8s-staging-sig-storage. --- .../cloudbuild.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 1def1499..a22c0e7a 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -12,6 +12,8 @@ # # See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md # for more details on image pushing process in Kubernetes. +# +# To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage. # This must be specified in seconds. If omitted, defaults to 600s (10 mins). timeout: 1200s @@ -38,7 +40,7 @@ substitutions: # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'. _PULL_BASE_REF: 'master' # The default gcr.io staging project for Kubernetes-CSI - # (=> https://console.cloud.google.com/gcr/images/k8s-staging-csi/GLOBAL). + # (=> https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/GLOBAL). # Might be overridden in the Prow build job for a repo which wants # images elsewhere. - _STAGING_PROJECT: 'k8s-staging-csi' + _STAGING_PROJECT: 'k8s-staging-sig-storage' From 20d06e34b30189bbe1bfd02aad222206bf5e1d29 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Tue, 16 Jun 2020 10:45:09 +0800 Subject: [PATCH 096/299] prow.sh: enable building arm64 image --- container-object-storage-interface-controller/prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 32ec871a..9778635f 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -85,7 +85,7 @@ get_versioned_variable () { echo "$value" } -configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" +configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" # If we have a vendor directory, then use it. We must be careful to only # use this for "make" invocations inside the project's repo itself because From 6986e7c4e4f99a9555d414efd1e9e80b7a58b09a Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Wed, 17 Jun 2020 18:05:08 +0530 Subject: [PATCH 097/299] filter-junit: Fix golint error Signed-off-by: Animesh Kumar --- .../filter-junit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/filter-junit.go b/container-object-storage-interface-controller/filter-junit.go index 2f51be00..1da224a0 100644 --- a/container-object-storage-interface-controller/filter-junit.go +++ b/container-object-storage-interface-controller/filter-junit.go @@ -15,9 +15,9 @@ limitations under the License. */ /* - * This command filters a JUnit file such that only tests with a name - * matching a regular expression are passed through. By concatenating - * multiple input files it is possible to merge them into a single file. +This command filters a JUnit file such that only tests with a name +matching a regular expression are passed through. By concatenating +multiple input files it is possible to merge them into a single file. */ package main From 2e2ddf1ebe080d1ab19d551ebc224a3d7201eddb Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Thu, 18 Jun 2020 13:07:40 +0530 Subject: [PATCH 098/299] filter-junit: Fix gofmt error Signed-off-by: Animesh Kumar --- container-object-storage-interface-controller/filter-junit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/filter-junit.go b/container-object-storage-interface-controller/filter-junit.go index 1da224a0..cf1cb4ab 100644 --- a/container-object-storage-interface-controller/filter-junit.go +++ b/container-object-storage-interface-controller/filter-junit.go @@ -18,7 +18,7 @@ limitations under the License. This command filters a JUnit file such that only tests with a name matching a regular expression are passed through. By concatenating multiple input files it is possible to merge them into a single file. - */ +*/ package main import ( From 80d7f6fbfcff7bbdfa5e5cb7ff1feaa9f1dd63fb Mon Sep 17 00:00:00 2001 From: namrata-ibm Date: Wed, 8 Jul 2020 08:03:24 -0400 Subject: [PATCH 099/299] cloud build: bump timeout in Prow job --- container-object-storage-interface-controller/cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index a22c0e7a..8f678924 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -16,7 +16,7 @@ # To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage. # This must be specified in seconds. If omitted, defaults to 600s (10 mins). -timeout: 1200s +timeout: 1800s # This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, # or any new substitutions added in the future. options: From fbc09927b6ebf46813b5739d5c57d91992162e5f Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 22 Jul 2020 10:45:06 +0530 Subject: [PATCH 100/299] Initial commit --- .../CONTRIBUTING.md | 31 +++ .../LICENSE | 201 ++++++++++++++++++ .../OWNERS | 6 + .../OWNERS_ALIASES | 15 ++ .../README.md | 29 +++ .../RELEASE.md | 9 + .../SECURITY_CONTACTS | 14 ++ .../code-of-conduct.md | 3 + 8 files changed, 308 insertions(+) create mode 100644 container-object-storage-interface-controller/CONTRIBUTING.md create mode 100644 container-object-storage-interface-controller/LICENSE create mode 100644 container-object-storage-interface-controller/OWNERS create mode 100644 container-object-storage-interface-controller/OWNERS_ALIASES create mode 100644 container-object-storage-interface-controller/README.md create mode 100644 container-object-storage-interface-controller/RELEASE.md create mode 100644 container-object-storage-interface-controller/SECURITY_CONTACTS create mode 100644 container-object-storage-interface-controller/code-of-conduct.md diff --git a/container-object-storage-interface-controller/CONTRIBUTING.md b/container-object-storage-interface-controller/CONTRIBUTING.md new file mode 100644 index 00000000..3cbbabb5 --- /dev/null +++ b/container-object-storage-interface-controller/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/container-object-storage-interface-controller/LICENSE b/container-object-storage-interface-controller/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/container-object-storage-interface-controller/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS new file mode 100644 index 00000000..f3508c95 --- /dev/null +++ b/container-object-storage-interface-controller/OWNERS @@ -0,0 +1,6 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + # TODO: in your repo created from this template, you should replace the + # steering-committee with a list of project owners, see the doc linked above. + - steering-committee diff --git a/container-object-storage-interface-controller/OWNERS_ALIASES b/container-object-storage-interface-controller/OWNERS_ALIASES new file mode 100644 index 00000000..3a101b99 --- /dev/null +++ b/container-object-storage-interface-controller/OWNERS_ALIASES @@ -0,0 +1,15 @@ +# See the OWNERS docs at https://go.k8s.io/owners#owners_aliases + +aliases: + # TODO: remove this alias, it will go stale in your repo, and in your repo + # you should have your own set of approvers (see OWNERS) + # in the original template repo, we must maintain this list to approve changes + # to the template itself + steering-committee: + - cblecker + - derekwaynecarr + - dims + - lachie83 + - nikhita + - parispittman + - spiffxp diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md new file mode 100644 index 00000000..ba5444fd --- /dev/null +++ b/container-object-storage-interface-controller/README.md @@ -0,0 +1,29 @@ +# Kubernetes Template Project + +The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: + +- a `README.md` outlining the project goals, sponsoring sig, and community contact information +- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) +- a `CONTRIBUTING.md` outlining how to contribute to the project +- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code +- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content +- a `SECURITY_CONTACTS` with the contact points for the Product Security Team + to reach out to for triaging and handling of incoming issues. They must agree to abide by the + [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) + and will be removed and replaced if they violate that agreement. + +## Community, discussion, contribution, and support + +Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). + +You can reach the maintainers of this project at: + +- [Slack](http://slack.k8s.io/) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) + +### Code of conduct + +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). + +[owners]: https://git.k8s.io/community/contributors/guide/owners.md +[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE diff --git a/container-object-storage-interface-controller/RELEASE.md b/container-object-storage-interface-controller/RELEASE.md new file mode 100644 index 00000000..7274b344 --- /dev/null +++ b/container-object-storage-interface-controller/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The Kubernetes Template Project is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/container-object-storage-interface-controller/SECURITY_CONTACTS b/container-object-storage-interface-controller/SECURITY_CONTACTS new file mode 100644 index 00000000..4dfb303b --- /dev/null +++ b/container-object-storage-interface-controller/SECURITY_CONTACTS @@ -0,0 +1,14 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Committee to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +bob +alice diff --git a/container-object-storage-interface-controller/code-of-conduct.md b/container-object-storage-interface-controller/code-of-conduct.md new file mode 100644 index 00000000..0d15c00c --- /dev/null +++ b/container-object-storage-interface-controller/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) From d212d60798e7c9db33e0f16e0d3efe80673f630e Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 22 Jul 2020 10:50:17 +0530 Subject: [PATCH 101/299] Update template files to include repo-specific info --- .../CONTRIBUTING.md | 9 ++------ .../OWNERS | 7 ++++--- .../OWNERS_ALIASES | 15 ------------- .../README.md | 21 ++++--------------- .../SECURITY_CONTACTS | 6 ++++-- 5 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 container-object-storage-interface-controller/OWNERS_ALIASES diff --git a/container-object-storage-interface-controller/CONTRIBUTING.md b/container-object-storage-interface-controller/CONTRIBUTING.md index 3cbbabb5..22b0ac08 100644 --- a/container-object-storage-interface-controller/CONTRIBUTING.md +++ b/container-object-storage-interface-controller/CONTRIBUTING.md @@ -20,12 +20,7 @@ If your repo has certain guidelines for contribution, put them here ahead of the - [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! - +- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index f3508c95..b3c654f2 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -1,6 +1,7 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - # TODO: in your repo created from this template, you should replace the - # steering-committee with a list of project owners, see the doc linked above. - - steering-committee + - jsafrane + - msau42 + - saad-ali + - xing-yang diff --git a/container-object-storage-interface-controller/OWNERS_ALIASES b/container-object-storage-interface-controller/OWNERS_ALIASES deleted file mode 100644 index 3a101b99..00000000 --- a/container-object-storage-interface-controller/OWNERS_ALIASES +++ /dev/null @@ -1,15 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners#owners_aliases - -aliases: - # TODO: remove this alias, it will go stale in your repo, and in your repo - # you should have your own set of approvers (see OWNERS) - # in the original template repo, we must maintain this list to approve changes - # to the template itself - steering-committee: - - cblecker - - derekwaynecarr - - dims - - lachie83 - - nikhita - - parispittman - - spiffxp diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index ba5444fd..c8b6bfd8 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -1,16 +1,6 @@ -# Kubernetes Template Project +# Container Object Storage Controller -The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: - -- a `README.md` outlining the project goals, sponsoring sig, and community contact information -- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) -- a `CONTRIBUTING.md` outlining how to contribute to the project -- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code -- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content -- a `SECURITY_CONTACTS` with the contact points for the Product Security Team - to reach out to for triaging and handling of incoming issues. They must agree to abide by the - [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) - and will be removed and replaced if they violate that agreement. +Container Object Storage Interface (COSI) controller responsible to manage lifecycle of COSI objects. ## Community, discussion, contribution, and support @@ -18,12 +8,9 @@ Learn how to engage with the Kubernetes community on the [community page](http:/ You can reach the maintainers of this project at: -- [Slack](http://slack.k8s.io/) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) +- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) ### Code of conduct Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). - -[owners]: https://git.k8s.io/community/contributors/guide/owners.md -[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE diff --git a/container-object-storage-interface-controller/SECURITY_CONTACTS b/container-object-storage-interface-controller/SECURITY_CONTACTS index 4dfb303b..8a7b91d5 100644 --- a/container-object-storage-interface-controller/SECURITY_CONTACTS +++ b/container-object-storage-interface-controller/SECURITY_CONTACTS @@ -10,5 +10,7 @@ # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE # INSTRUCTIONS AT https://kubernetes.io/security/ -bob -alice +jsafrane +msau42 +saad-ali +xing-yang From 2b402f0b51e1b6e9084812a03fc0eca3d1681a95 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 22 Jul 2020 10:51:30 +0530 Subject: [PATCH 102/299] Initial commit --- .../CONTRIBUTING.md | 31 +++ .../LICENSE | 201 ++++++++++++++++++ .../OWNERS | 6 + .../OWNERS_ALIASES | 15 ++ .../README.md | 29 +++ .../RELEASE.md | 9 + .../SECURITY_CONTACTS | 14 ++ .../code-of-conduct.md | 3 + 8 files changed, 308 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md create mode 100644 container-object-storage-interface-provisioner-sidecar/LICENSE create mode 100644 container-object-storage-interface-provisioner-sidecar/OWNERS create mode 100644 container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES create mode 100644 container-object-storage-interface-provisioner-sidecar/README.md create mode 100644 container-object-storage-interface-provisioner-sidecar/RELEASE.md create mode 100644 container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS create mode 100644 container-object-storage-interface-provisioner-sidecar/code-of-conduct.md diff --git a/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md b/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md new file mode 100644 index 00000000..3cbbabb5 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/container-object-storage-interface-provisioner-sidecar/LICENSE b/container-object-storage-interface-provisioner-sidecar/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS new file mode 100644 index 00000000..f3508c95 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -0,0 +1,6 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + # TODO: in your repo created from this template, you should replace the + # steering-committee with a list of project owners, see the doc linked above. + - steering-committee diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES b/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES new file mode 100644 index 00000000..3a101b99 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES @@ -0,0 +1,15 @@ +# See the OWNERS docs at https://go.k8s.io/owners#owners_aliases + +aliases: + # TODO: remove this alias, it will go stale in your repo, and in your repo + # you should have your own set of approvers (see OWNERS) + # in the original template repo, we must maintain this list to approve changes + # to the template itself + steering-committee: + - cblecker + - derekwaynecarr + - dims + - lachie83 + - nikhita + - parispittman + - spiffxp diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md new file mode 100644 index 00000000..ba5444fd --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -0,0 +1,29 @@ +# Kubernetes Template Project + +The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: + +- a `README.md` outlining the project goals, sponsoring sig, and community contact information +- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) +- a `CONTRIBUTING.md` outlining how to contribute to the project +- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code +- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content +- a `SECURITY_CONTACTS` with the contact points for the Product Security Team + to reach out to for triaging and handling of incoming issues. They must agree to abide by the + [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) + and will be removed and replaced if they violate that agreement. + +## Community, discussion, contribution, and support + +Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). + +You can reach the maintainers of this project at: + +- [Slack](http://slack.k8s.io/) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) + +### Code of conduct + +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). + +[owners]: https://git.k8s.io/community/contributors/guide/owners.md +[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE diff --git a/container-object-storage-interface-provisioner-sidecar/RELEASE.md b/container-object-storage-interface-provisioner-sidecar/RELEASE.md new file mode 100644 index 00000000..7274b344 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The Kubernetes Template Project is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS b/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS new file mode 100644 index 00000000..4dfb303b --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS @@ -0,0 +1,14 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Committee to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +bob +alice diff --git a/container-object-storage-interface-provisioner-sidecar/code-of-conduct.md b/container-object-storage-interface-provisioner-sidecar/code-of-conduct.md new file mode 100644 index 00000000..0d15c00c --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) From f9e297de69bd292ce9950b409e85b487e9ff4e4a Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 22 Jul 2020 10:56:14 +0530 Subject: [PATCH 103/299] Update template files to include repo-specific info --- .../CONTRIBUTING.md | 9 ++------ .../OWNERS | 7 ++++--- .../OWNERS_ALIASES | 15 ------------- .../README.md | 21 ++++--------------- .../SECURITY_CONTACTS | 6 ++++-- 5 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES diff --git a/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md b/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md index 3cbbabb5..22b0ac08 100644 --- a/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md +++ b/container-object-storage-interface-provisioner-sidecar/CONTRIBUTING.md @@ -20,12 +20,7 @@ If your repo has certain guidelines for contribution, put them here ahead of the - [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! - +- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS index f3508c95..b3c654f2 100644 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -1,6 +1,7 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - # TODO: in your repo created from this template, you should replace the - # steering-committee with a list of project owners, see the doc linked above. - - steering-committee + - jsafrane + - msau42 + - saad-ali + - xing-yang diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES b/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES deleted file mode 100644 index 3a101b99..00000000 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS_ALIASES +++ /dev/null @@ -1,15 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners#owners_aliases - -aliases: - # TODO: remove this alias, it will go stale in your repo, and in your repo - # you should have your own set of approvers (see OWNERS) - # in the original template repo, we must maintain this list to approve changes - # to the template itself - steering-committee: - - cblecker - - derekwaynecarr - - dims - - lachie83 - - nikhita - - parispittman - - spiffxp diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index ba5444fd..73ff6fe2 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -1,16 +1,6 @@ -# Kubernetes Template Project +# Container Object Storage Interface Provisioner Sidecar -The Kubernetes Template Project is a template for starting new projects in the GitHub organizations owned by Kubernetes. All Kubernetes projects, at minimum, must have the following files: - -- a `README.md` outlining the project goals, sponsoring sig, and community contact information -- an `OWNERS` with the project leads listed as approvers ([docs on `OWNERS` files][owners]) -- a `CONTRIBUTING.md` outlining how to contribute to the project -- an unmodified copy of `code-of-conduct.md` from this repo, which outlines community behavior and the consequences of breaking the code -- a `LICENSE` which must be Apache 2.0 for code projects, or [Creative Commons 4.0] for documentation repositories, without any custom content -- a `SECURITY_CONTACTS` with the contact points for the Product Security Team - to reach out to for triaging and handling of incoming issues. They must agree to abide by the - [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) - and will be removed and replaced if they violate that agreement. + Container Object Storage Interface (COSI) provisioner responsible to interface with COSI drivers. ## Community, discussion, contribution, and support @@ -18,12 +8,9 @@ Learn how to engage with the Kubernetes community on the [community page](http:/ You can reach the maintainers of this project at: -- [Slack](http://slack.k8s.io/) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-dev) +- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) ### Code of conduct Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). - -[owners]: https://git.k8s.io/community/contributors/guide/owners.md -[Creative Commons 4.0]: https://git.k8s.io/website/LICENSE diff --git a/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS b/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS index 4dfb303b..8a7b91d5 100644 --- a/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS +++ b/container-object-storage-interface-provisioner-sidecar/SECURITY_CONTACTS @@ -10,5 +10,7 @@ # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE # INSTRUCTIONS AT https://kubernetes.io/security/ -bob -alice +jsafrane +msau42 +saad-ali +xing-yang From 16076ddbd78be9e4af0eac84668abb51c5bc0e47 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Wed, 5 Aug 2020 13:29:03 -0700 Subject: [PATCH 104/299] Add steps on promoting release images --- .../SIDECAR_RELEASE_PROCESS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md index 6960607e..f6434c82 100644 --- a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -86,6 +86,12 @@ naming convention `-on-`. [external-provisioner example](https://github.com/kubernetes-csi/external-provisioner/releases/new) 1. If release was a new major/minor version, create a new `release-` branch at that commit. +1. Check [image build status](https://k8s-testgrid.appspot.com/sig-storage-image-build). +1. Promote images from k8s-staging-sig-storage to k8s.gcr.io/sig-storage. From + the [k8s image + repo](https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage), + run `./generate.sh > images.yaml`, and send a PR with the updated images. + Once merged, the image promoter will copy the images from staging to prod. 1. Update [kubernetes-csi/docs](https://github.com/kubernetes-csi/docs) sidecar and feature pages with the new released version. 1. After all the sidecars have been released, update From 30a9f284c6a4b55df6e7c53c6db2383368529c26 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 12 Aug 2020 09:42:55 +0200 Subject: [PATCH 105/299] switch to Go 1.15 Go 1.15 was released and is the major version that Kubernetes 1.19.0 is going to use. There are probably bugs in the older 1.13.3 that were fixed, so we should update. --- container-object-storage-interface-controller/travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/travis.yml b/container-object-storage-interface-controller/travis.yml index bfd7647b..1ab13aef 100644 --- a/container-object-storage-interface-controller/travis.yml +++ b/container-object-storage-interface-controller/travis.yml @@ -6,7 +6,7 @@ git: depth: false matrix: include: - - go: 1.13.3 + - go: 1.15 before_script: - mkdir -p bin - wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep From 546d50fda947afba31ad0f1c7fe6d3a54d91fa5d Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 14 Aug 2020 14:21:51 +0200 Subject: [PATCH 106/299] prow.sh: fix installing Go for Kubernetes 1.19.0 Kubernetes 1.19.0 uses Go 1.15, but refers to it as 1.15.0. This broke both the check whether we need to install 1.15 (because "go version" reports 1.15, which didn't match 1.15.0) and then downloading the release archive (because the URL also only uses 1.15). --- container-object-storage-interface-controller/prow.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 9778635f..8ce80cf8 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -513,6 +513,10 @@ go_version_for_kubernetes () ( if ! [ "$go_version" ]; then die "Unable to determine Go version for Kubernetes $version from hack/lib/golang.sh." fi + # Strip the trailing .0. Kubernetes includes it, Go itself doesn't. + # Ignore: See if you can use ${variable//search/replace} instead. + # shellcheck disable=SC2001 + go_version="$(echo "$go_version" | sed -e 's/\.0$//')" echo "$go_version" ) From a45160b848fd4a38a61e117b737bc6f1398155b0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 14 Aug 2020 14:23:51 +0200 Subject: [PATCH 107/299] prow.sh: fix E2E suite for Kubernetes >= 1.18 It used to be necessary to override from where the E2E suite came on a case-by-case basis (initially, testing was using a more recent suite against an older Kubernetes). This should never become necessary again and the lack of a specific entry for 1.18 already had the unintended effect that Kubernetes 1.18 was tested with the suite from master, so overall it is better to always use the E2E suite which matches Kubernetes. --- .../prow.sh | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 8ce80cf8..05d397a9 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -218,17 +218,18 @@ configvar CSI_PROW_DRIVER_CANARY "${CSI_PROW_HOSTPATH_CANARY}" "driver image ove # all generated files are present. # # CSI_PROW_E2E_REPO=none disables E2E testing. -# TOOO: remove versioned variables and make e2e version match k8s version -configvar CSI_PROW_E2E_VERSION_1_15 v1.15.0 "E2E version for Kubernetes 1.15.x" -configvar CSI_PROW_E2E_VERSION_1_16 v1.16.0 "E2E version for Kubernetes 1.16.x" -configvar CSI_PROW_E2E_VERSION_1_17 v1.17.0 "E2E version for Kubernetes 1.17.x" -# TODO: add new CSI_PROW_E2E_VERSION entry for future Kubernetes releases -configvar CSI_PROW_E2E_VERSION_LATEST master "E2E version for Kubernetes master" # testing against Kubernetes master is already tracking a moving target, so we might as well use a moving E2E version -configvar CSI_PROW_E2E_REPO_LATEST https://github.com/kubernetes/kubernetes "E2E repo for Kubernetes >= 1.13.x" # currently the same for all versions -configvar CSI_PROW_E2E_IMPORT_PATH_LATEST k8s.io/kubernetes "E2E package for Kubernetes >= 1.13.x" # currently the same for all versions -configvar CSI_PROW_E2E_VERSION "$(get_versioned_variable CSI_PROW_E2E_VERSION "${csi_prow_kubernetes_version_suffix}")" "E2E version" -configvar CSI_PROW_E2E_REPO "$(get_versioned_variable CSI_PROW_E2E_REPO "${csi_prow_kubernetes_version_suffix}")" "E2E repo" -configvar CSI_PROW_E2E_IMPORT_PATH "$(get_versioned_variable CSI_PROW_E2E_IMPORT_PATH "${csi_prow_kubernetes_version_suffix}")" "E2E package" +tag_from_version () { + version="$1" + shift + case "$version" in + latest) echo "master";; + release-*) echo "$version";; + *) echo "v$version";; + esac +} +configvar CSI_PROW_E2E_VERSION "$(tag_from_version "${CSI_PROW_KUBERNETES_VERSION}")" "E2E version" +configvar CSI_PROW_E2E_REPO "https://github.com/kubernetes/kubernetes" "E2E repo" +configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package" # csi-sanity testing from the csi-test repo can be run against the installed # CSI driver. For this to work, deploying the driver must expose the Unix domain From 76e9fe906aa31c11740ce40ab1482371b33758ed Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Mon, 24 Aug 2020 16:44:47 -0700 Subject: [PATCH 108/299] Add cleanup instructions to release-notes generation --- .../SIDECAR_RELEASE_PROCESS.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md index f6434c82..91e837c9 100644 --- a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -54,14 +54,19 @@ naming convention `-on-`. generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes) 1. Generate release notes for the release. Replace arguments with the relevant information. + * Clean up old cached information (also needed if you are generating release + notes for multiple repos) + ```bash + rm -rf /tmp/k8s-repo + ``` * For new minor releases on master: - ``` + ```bash GITHUB_TOKEN= release-notes --discover=mergebase-to-latest --github-org=kubernetes-csi --github-repo=external-provisioner --required-author="" --output out.md ``` * For new patch releases on a release branch: - ``` + ```bash GITHUB_TOKEN= release-notes --discover=patch-to-latest --branch=release-1.1 --github-org=kubernetes-csi --github-repo=external-provisioner --required-author="" --output out.md From 4960c4c5012c890a6f72fce6f726654232c51a70 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Tue, 15 Sep 2020 16:10:19 -0400 Subject: [PATCH 109/299] added issue templates to COSI sidecar --- .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++++++++++++++++++ .../.github/ISSUE_TEMPLATE/enhancement.md | 18 +++++++++++ 2 files changed, 49 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/enhancement.md diff --git a/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..855e99fd --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug Report +about: Use this template for reporting bugs or issues. +title: "[DATE] - Title" +labels: bug +--- +# Bug Report + + + +**What happened**: + +**What you expected to happen**: + +**How to reproduce this bug (as minimally and precisely as possible)**: + +**Anything else relevant for this bug report?**: + +**Environment**: + +- Kubernetes version (use `kubectl version`), please list client and server: +- Sidecar version (provide the release tag or commit hash): +- Cloud provider or hardware configuration: +- OS (e.g: `cat /etc/os-release`): +- Kernel (e.g. `uname -a`): +- Install tools: +- Network plugin and version (if this is a network-related bug): +- Others: diff --git a/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/enhancement.md b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 00000000..65597407 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,18 @@ +--- +name: Enhancement/Feature Request +about: Use this template to request a new feature or enhancement for the COSI sidecar +title: "[DATE] - Title" +--- +# Enhancement + +**Is your feature request related to a problem?/Why is this needed** + + +**Describe the solution you'd like in detail** + + +**Describe alternatives you've considered** + + +**Additional context** + From 5cbaf1c8512c085789f7ee2568834ebc8f9a2cfd Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Tue, 15 Sep 2020 15:51:46 -0400 Subject: [PATCH 110/299] adds issue templates to COSI controller --- .../.github/ISSUE_TEMPLATE/bug_report.md | 30 +++++++++++++++++++ .../.github/ISSUE_TEMPLATE/enhancement.md | 19 ++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/enhancement.md diff --git a/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..bd884c11 --- /dev/null +++ b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug Report +about: Use this template for reporting bugs or issues. +title: "[DATE] - Title" +--- +# Bug Report + + + +**What happened**: + +**What you expected to happen**: + +**How to reproduce this bug (as minimally and precisely as possible)**: + +**Anything else relevant for this bug report?**: + +**Environment**: + +- Kubernetes version (use `kubectl version`), please list client and server: +- Controller version (provide the release tag or commit hash): +- Cloud provider or hardware configuration: +- OS (e.g: `cat /etc/os-release`): +- Kernel (e.g. `uname -a`): +- Install tools: +- Network plugin and version (if this is a network-related bug): +- Others: diff --git a/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/enhancement.md b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 00000000..7ed31b19 --- /dev/null +++ b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,19 @@ +--- +name: Enhancement/Feature Request +about: Use this template to request a new feature or enhancement for the COSI controller +title: "[DATE] - Title" +labels: bug +--- +# Enhancement + +**Is your feature request related to a problem?/Why is this needed** + + +**Describe the solution you'd like in detail** + + +**Describe alternatives you've considered** + + +**Additional context** + From dee0428f95c60a3b675da88e6bcfe4cb2934ad05 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 25 Sep 2020 17:41:33 -0700 Subject: [PATCH 111/299] Use staging registry for canary tests --- container-object-storage-interface-controller/prow.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 05d397a9..1812e3a7 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -211,6 +211,10 @@ configvar CSI_PROW_DRIVER_INSTALL "install_csi_driver" "name of the shell functi # still use that name. configvar CSI_PROW_DRIVER_CANARY "${CSI_PROW_HOSTPATH_CANARY}" "driver image override for canary images" +# Image registry to use for canary images. +# Only valid if CSI_PROW_DRIVER_CANARY is set. +configvar CSI_PROW_DRIVER_CANARY_REGISTRY "gcr.io/k8s-staging-sig-storage" "registry for canary images" + # The E2E testing can come from an arbitrary repo. The expectation is that # the repo supports "go test ./test/e2e -args --storage.testdriver" (https://github.com/kubernetes/kubernetes/pull/72836) # after setting KUBECONFIG. As a special case, if the repository is Kubernetes, @@ -693,7 +697,7 @@ install_csi_driver () { fi if [ "${CSI_PROW_DRIVER_CANARY}" != "stable" ]; then - images="$images IMAGE_TAG=${CSI_PROW_DRIVER_CANARY}" + images="$images IMAGE_TAG=${CSI_PROW_DRIVER_CANARY} IMAGE_REGISTRY=${CSI_PROW_DRIVER_CANARY_REGISTRY}" fi # Ignore: Double quote to prevent globbing and word splitting. # It's intentional here for $images. From 7e0e3bfb646b8dfffb16418c023c0a265f8bab41 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 25 Sep 2020 17:49:38 -0700 Subject: [PATCH 112/299] Document new method for adding CI jobs are new K8s versions --- .../SIDECAR_RELEASE_PROCESS.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md index 91e837c9..4575eb81 100644 --- a/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md +++ b/container-object-storage-interface-controller/SIDECAR_RELEASE_PROCESS.md @@ -39,10 +39,11 @@ naming convention `-on-`. 1. Changes can then be updated in all the sidecar repos and hostpath driver repo by following the [update instructions](https://github.com/kubernetes-csi/csi-release-tools/blob/master/README.md#sharing-and-updating). -1. New pull and CI jobs are configured by +1. New pull and CI jobs are configured by adding new K8s versions to the top of [gen-jobs.sh](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-csi/gen-jobs.sh). - New pull jobs that have been unverified should be initially made optional. - [Example](https://github.com/kubernetes/test-infra/pull/15055) + New pull jobs that have been unverified should be initially made optional by + setting the new K8s version as + [experimental](https://github.com/kubernetes/test-infra/blob/a1858f46d6014480b130789df58b230a49203a64/config/jobs/kubernetes-csi/gen-jobs.sh#L40). 1. Once new pull and CI jobs have been verified, and the new Kubernetes version is released, we can make the optional jobs required, and also remove the Kubernetes versions that are no longer supported. From a55193d81075bbbd64e0b263a7aee54bca323c55 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 28 Sep 2020 12:00:12 -0400 Subject: [PATCH 113/299] adds security policy for controller --- .../.github/SECURITY.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 container-object-storage-interface-controller/.github/SECURITY.md diff --git a/container-object-storage-interface-controller/.github/SECURITY.md b/container-object-storage-interface-controller/.github/SECURITY.md new file mode 100644 index 00000000..3bafc83a --- /dev/null +++ b/container-object-storage-interface-controller/.github/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +Information about supported Kubernetes versions can be found on the +[Kubernetes version and version skew support policy] page on the Kubernetes website. + +## Reporting a Vulnerability + +Instructions for reporting a vulnerability can be found on the +[Kubernetes Security and Disclosure Information] page. + +[Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions +[Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability From 060502837de0b3ae5148313b7bbe8e6865dce57d Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 28 Sep 2020 12:05:58 -0400 Subject: [PATCH 114/299] adds security policy to COSI sidecar --- .../.github/SECURITY.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/.github/SECURITY.md diff --git a/container-object-storage-interface-provisioner-sidecar/.github/SECURITY.md b/container-object-storage-interface-provisioner-sidecar/.github/SECURITY.md new file mode 100644 index 00000000..3bafc83a --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/.github/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +Information about supported Kubernetes versions can be found on the +[Kubernetes version and version skew support policy] page on the Kubernetes website. + +## Reporting a Vulnerability + +Instructions for reporting a vulnerability can be found on the +[Kubernetes Security and Disclosure Information] page. + +[Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions +[Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability From 811e6a57bc572d16de4002357b6e8d688b5e4258 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 28 Sep 2020 13:57:02 -0400 Subject: [PATCH 115/299] added provisioner line to bug_report --- .../.github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md index bd884c11..3bbfb6c0 100644 --- a/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md +++ b/container-object-storage-interface-controller/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,6 +22,7 @@ If the matter is security related, please disclose it privately via https://kube - Kubernetes version (use `kubectl version`), please list client and server: - Controller version (provide the release tag or commit hash): +- Provisoner name and version (provide the release tag or commit hash): - Cloud provider or hardware configuration: - OS (e.g: `cat /etc/os-release`): - Kernel (e.g. `uname -a`): From 9799051bb69710d3971a3782f142d5d9029c0655 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 28 Sep 2020 13:57:28 -0400 Subject: [PATCH 116/299] added provisioner line to bug_report --- .../.github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md index 855e99fd..293c9b29 100644 --- a/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md +++ b/container-object-storage-interface-provisioner-sidecar/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,6 +23,7 @@ If the matter is security related, please disclose it privately via https://kube - Kubernetes version (use `kubectl version`), please list client and server: - Sidecar version (provide the release tag or commit hash): +- Provisoner name and version (provide the release tag or commit hash): - Cloud provider or hardware configuration: - OS (e.g: `cat /etc/os-release`): - Kernel (e.g. `uname -a`): From 220161bc87e935b04f055e322e11d8a49efc7fca Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Tue, 6 Oct 2020 11:25:19 -0700 Subject: [PATCH 117/299] Only set staging registry when running canary job --- container-object-storage-interface-controller/prow.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/prow.sh b/container-object-storage-interface-controller/prow.sh index 1812e3a7..b069a318 100755 --- a/container-object-storage-interface-controller/prow.sh +++ b/container-object-storage-interface-controller/prow.sh @@ -212,7 +212,7 @@ configvar CSI_PROW_DRIVER_INSTALL "install_csi_driver" "name of the shell functi configvar CSI_PROW_DRIVER_CANARY "${CSI_PROW_HOSTPATH_CANARY}" "driver image override for canary images" # Image registry to use for canary images. -# Only valid if CSI_PROW_DRIVER_CANARY is set. +# Only valid if CSI_PROW_DRIVER_CANARY == "canary". configvar CSI_PROW_DRIVER_CANARY_REGISTRY "gcr.io/k8s-staging-sig-storage" "registry for canary images" # The E2E testing can come from an arbitrary repo. The expectation is that @@ -697,7 +697,11 @@ install_csi_driver () { fi if [ "${CSI_PROW_DRIVER_CANARY}" != "stable" ]; then + if [ "${CSI_PROW_DRIVER_CANARY}" == "canary" ]; then images="$images IMAGE_TAG=${CSI_PROW_DRIVER_CANARY} IMAGE_REGISTRY=${CSI_PROW_DRIVER_CANARY_REGISTRY}" + else + images="$images IMAGE_TAG=${CSI_PROW_DRIVER_CANARY}" + fi fi # Ignore: Double quote to prevent globbing and word splitting. # It's intentional here for $images. From 62bc87e7135da00c021f1eabdea7a3c4f863eba8 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Thu, 22 Oct 2020 22:04:00 -0700 Subject: [PATCH 118/299] Add approvers to facilitate project management --- container-object-storage-interface-controller/OWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index b3c654f2..9ea2b344 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -5,3 +5,6 @@ approvers: - msau42 - saad-ali - xing-yang + - wlan0 + - brahmaroutu + - rrati From 7abd89a0529f55db6af3b9dd9b81fb89d9576129 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Thu, 22 Oct 2020 22:09:34 -0700 Subject: [PATCH 119/299] Add approvers to facilitate project management --- container-object-storage-interface-provisioner-sidecar/OWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS index b3c654f2..9ea2b344 100644 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -5,3 +5,6 @@ approvers: - msau42 - saad-ali - xing-yang + - wlan0 + - brahmaroutu + - rrati From d8faa005d717322f7ed094b457163b89f2fd2200 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Thu, 22 Oct 2020 15:17:41 -0700 Subject: [PATCH 120/299] We maintain release tools only under Spec repo --- .../Dockerfile | 6 + .../update-vendor.sh => Makefile} | 15 +- .../release-tools/.prow.sh | 7 - .../release-tools/CONTRIBUTING.md | 31 - .../release-tools/LICENSE | 201 --- .../release-tools/OWNERS | 11 - .../release-tools/README.md | 166 --- .../release-tools/RELEASE.md | 5 - .../release-tools/SECURITY_CONTACTS | 14 - .../release-tools/SIDECAR_RELEASE_PROCESS.md | 106 -- .../release-tools/build.make | 272 ---- .../release-tools/cloudbuild.sh | 6 - .../release-tools/cloudbuild.yaml | 46 - .../release-tools/code-of-conduct.md | 3 - .../release-tools/filter-junit.go | 133 -- .../release-tools/go-get-kubernetes.sh | 104 -- .../release-tools/prow.sh | 1224 ----------------- .../release-tools/travis.yml | 21 - .../release-tools/util.sh | 148 -- .../release-tools/verify-go-version.sh | 51 - .../release-tools/verify-shellcheck.sh | 146 -- .../release-tools/verify-subtree.sh | 41 - .../release-tools/verify-vendor.sh | 60 - 23 files changed, 11 insertions(+), 2806 deletions(-) create mode 100644 container-object-storage-interface-controller/Dockerfile rename container-object-storage-interface-controller/{release-tools/update-vendor.sh => Makefile} (64%) mode change 100755 => 100644 delete mode 100755 container-object-storage-interface-controller/release-tools/.prow.sh delete mode 100644 container-object-storage-interface-controller/release-tools/CONTRIBUTING.md delete mode 100644 container-object-storage-interface-controller/release-tools/LICENSE delete mode 100644 container-object-storage-interface-controller/release-tools/OWNERS delete mode 100644 container-object-storage-interface-controller/release-tools/README.md delete mode 100644 container-object-storage-interface-controller/release-tools/RELEASE.md delete mode 100644 container-object-storage-interface-controller/release-tools/SECURITY_CONTACTS delete mode 100644 container-object-storage-interface-controller/release-tools/SIDECAR_RELEASE_PROCESS.md delete mode 100644 container-object-storage-interface-controller/release-tools/build.make delete mode 100755 container-object-storage-interface-controller/release-tools/cloudbuild.sh delete mode 100644 container-object-storage-interface-controller/release-tools/cloudbuild.yaml delete mode 100644 container-object-storage-interface-controller/release-tools/code-of-conduct.md delete mode 100644 container-object-storage-interface-controller/release-tools/filter-junit.go delete mode 100755 container-object-storage-interface-controller/release-tools/go-get-kubernetes.sh delete mode 100755 container-object-storage-interface-controller/release-tools/prow.sh delete mode 100644 container-object-storage-interface-controller/release-tools/travis.yml delete mode 100755 container-object-storage-interface-controller/release-tools/util.sh delete mode 100755 container-object-storage-interface-controller/release-tools/verify-go-version.sh delete mode 100755 container-object-storage-interface-controller/release-tools/verify-shellcheck.sh delete mode 100755 container-object-storage-interface-controller/release-tools/verify-subtree.sh delete mode 100755 container-object-storage-interface-controller/release-tools/verify-vendor.sh diff --git a/container-object-storage-interface-controller/Dockerfile b/container-object-storage-interface-controller/Dockerfile new file mode 100644 index 00000000..c080f91a --- /dev/null +++ b/container-object-storage-interface-controller/Dockerfile @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:latest +LABEL maintainers="Kubernetes Authors" +LABEL description="COSI Controller" + +COPY ./bin/cosi-controller-manager cosi-controller-manager +ENTRYPOINT ["/cosi-controller-manager"] diff --git a/container-object-storage-interface-controller/release-tools/update-vendor.sh b/container-object-storage-interface-controller/Makefile old mode 100755 new mode 100644 similarity index 64% rename from container-object-storage-interface-controller/release-tools/update-vendor.sh rename to container-object-storage-interface-controller/Makefile index 6f4c27ae..00291b44 --- a/container-object-storage-interface-controller/release-tools/update-vendor.sh +++ b/container-object-storage-interface-controller/Makefile @@ -1,6 +1,4 @@ -#!/usr/bin/env bash - -# Copyright 2019 The Kubernetes Authors. +# Copyright 2020 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,10 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [ -f Gopkg.toml ]; then - echo "Repo uses 'dep' for vendoring." - (set -x; dep ensure) -elif [ -f go.mod ]; then - release-tools/verify-go-version.sh "go" - (set -x; env GO111MODULE=on go mod tidy && env GO111MODULE=on go mod vendor) -fi +#CMDS=cosi-controller-manager +all: build + +include release-tools/build.make diff --git a/container-object-storage-interface-controller/release-tools/.prow.sh b/container-object-storage-interface-controller/release-tools/.prow.sh deleted file mode 100755 index b18c5358..00000000 --- a/container-object-storage-interface-controller/release-tools/.prow.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash -e -# -# This is for testing csi-release-tools itself in Prow. All other -# repos use prow.sh for that, but as csi-release-tools isn't a normal -# repo with some Go code in it, it has a custom Prow test script. - -./verify-shellcheck.sh "$(pwd)" diff --git a/container-object-storage-interface-controller/release-tools/CONTRIBUTING.md b/container-object-storage-interface-controller/release-tools/CONTRIBUTING.md deleted file mode 100644 index de471151..00000000 --- a/container-object-storage-interface-controller/release-tools/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing Guidelines - -Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: - -_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ - -## Getting Started - -We have full documentation on how to get started contributing here: - - - -- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests -- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) -- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers - -## Mentorship - -- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! - - diff --git a/container-object-storage-interface-controller/release-tools/LICENSE b/container-object-storage-interface-controller/release-tools/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/container-object-storage-interface-controller/release-tools/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/container-object-storage-interface-controller/release-tools/OWNERS b/container-object-storage-interface-controller/release-tools/OWNERS deleted file mode 100644 index 6d2f474e..00000000 --- a/container-object-storage-interface-controller/release-tools/OWNERS +++ /dev/null @@ -1,11 +0,0 @@ -# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md - -approvers: -- saad-ali -- msau42 -- pohly - -reviewers: -- saad-ali -- msau42 -- pohly diff --git a/container-object-storage-interface-controller/release-tools/README.md b/container-object-storage-interface-controller/release-tools/README.md deleted file mode 100644 index 60eab2a9..00000000 --- a/container-object-storage-interface-controller/release-tools/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# [csi-release-tools](https://github.com/kubernetes-csi/csi-release-tools) - -These build and test rules can be shared between different Go projects -without modifications. Customization for the different projects happen -in the top-level Makefile. - -The rules include support for building and pushing Docker images, with -the following features: - - one or more command and image per project - - push canary and/or tagged release images - - automatically derive the image tag(s) from repo tags - - the source code revision is stored in a "revision" image label - - never overwrites an existing release image - -Usage ------ - -The expected repository layout is: - - `cmd/*/*.go` - source code for each command - - `cmd/*/Dockerfile` - docker file for each command or - Dockerfile in the root when only building a single command - - `Makefile` - includes `release-tools/build.make` and sets - configuration variables - - `.travis.yml` - a symlink to `release-tools/.travis.yml` - -To create a release, tag a certain revision with a name that -starts with `v`, for example `v1.0.0`, then `make push` -while that commit is checked out. - -It does not matter on which branch that revision exists, i.e. it is -possible to create releases directly from master. A release branch can -still be created for maintenance releases later if needed. - -Release branches are expected to be named `release-x.y` for releases -`x.y.z`. Building from such a branch creates `x.y-canary` -images. Building from master creates the main `canary` image. - -Sharing and updating --------------------- - -[`git subtree`](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt) -is the recommended way of maintaining a copy of the rules inside the -`release-tools` directory of a project. This way, it is possible to make -changes also locally, test them and then push them back to the shared -repository at a later time. - -Cheat sheet: - -- `git subtree add --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once) -- `git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes) -- edit, `git commit`, `git subtree push --prefix=release-tools git@github.com:/csi-release-tools.git ` - push to a new branch before submitting a PR - -verify-shellcheck.sh --------------------- - -The [verify-shellcheck.sh](./verify-shellcheck.sh) script in this repo -is a stripped down copy of the [corresponding -script](https://github.com/kubernetes/kubernetes/blob/release-1.14/hack/verify-shellcheck.sh) -in the Kubernetes repository. It can be used to check for certain -errors shell scripts, like missing quotation marks. The default -`test-shellcheck` target in [build.make](./build.make) only checks the -scripts in this directory. Components can add more directories to -`TEST_SHELLCHECK_DIRS` to check also other scripts. - -End-to-end testing ------------------- - -A repo that wants to opt into testing via Prow must set up a top-level -`.prow.sh`. Typically that will source `prow.sh` and then transfer -control to it: - -``` bash -#! /bin/bash -e - -. release-tools/prow.sh -main -``` - -All Kubernetes-CSI repos are expected to switch to Prow. For details -on what is enabled in Prow, see -https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-csi - -Test results for periodic jobs are visible in -https://testgrid.k8s.io/sig-storage-csi-ci - -It is possible to reproduce the Prow testing locally on a suitable machine: -- Linux host -- Docker installed -- code to be tested checkout out in `$GOPATH/src/` -- `cd $GOPATH/src/ && ./.prow.sh` - -Beware that the script intentionally doesn't clean up after itself and -modifies the content of `$GOPATH`, in particular the `kubernetes` and -`kind` repositories there. Better run it in an empty, disposable -`$GOPATH`. - -When it terminates, the following command can be used to get access to -the Kubernetes cluster that was brought up for testing (assuming that -this step succeeded): - - export KUBECONFIG="$(kind get kubeconfig-path --name="csi-prow")" - -It is possible to control the execution via environment variables. See -`prow.sh` for details. Particularly useful is testing against different -Kubernetes releases: - - CSI_PROW_KUBERNETES_VERSION=1.13.3 ./.prow.sh - CSI_PROW_KUBERNETES_VERSION=latest ./.prow.sh - -Dependencies and vendoring --------------------------- - -Most projects will (eventually) use `go mod` to manage -dependencies. `dep` is also still supported by `csi-release-tools`, -but not documented here because it's not recommended anymore. - -The usual instructions for using [go -modules](https://github.com/golang/go/wiki/Modules) apply. Here's a cheat sheet -for some of the relevant commands: -- list available updates: `GO111MODULE=on go list -u -m all` -- update or add a single dependency: `GO111MODULE=on go get ` -- update all dependencies to their next minor or patch release: - `GO111MODULE=on go get ./...` (add `-u=patch` to limit to patch - releases) -- lock onto a specific version: `GO111MODULE=on go get @` -- clean up `go.mod`: `GO111MODULE=on go mod tidy` -- update vendor directory: `GO111MODULE=on go mod vendor` - -`GO111MODULE=on` can be left out when using Go >= 1.13 or when the -source is checked out outside of `$GOPATH`. - -`go mod tidy` must be used to ensure that the listed dependencies are -really still needed. Changing import statements or a tentative `go -get` can result in stale dependencies. - -The `test-vendor` verifies that it was used when run locally or in a -pre-merge CI job. If a `vendor` directory is present, it will also -verify that it's content is up-to-date. - -The `vendor` directory is optional. It is still present in projects -because it avoids downloading sources during CI builds. If this is no -longer deemed necessary, then a project can also remove the directory. - -Conversion of a repository that uses `dep` to `go mod` can be done with: - - GO111MODULE=on go mod init - release-tools/go-get-kubernetes.sh - GO111MODULE=on go mod tidy - GO111MODULE=on go mod vendor - git rm -f Gopkg.toml Gopkg.lock - git add go.mod go.sum vendor - -### Updating Kubernetes dependencies - -When using packages that are part of the Kubernetes source code, the -commands above are not enough because the [lack of semantic -versioning](https://github.com/kubernetes/kubernetes/issues/72638) -prevents `go mod` from finding newer releases. Importing directly from -`kubernetes/kubernetes` also needs `replace` statements to override -the fake `v0.0.0` versions -(https://github.com/kubernetes/kubernetes/issues/79384). The -`go-get-kubernetes.sh` script can be used to update all packages in -lockstep to a different Kubernetes version. Example usage: -``` -$ ./release-tools/go-get-kubernetes.sh 1.16.4 -``` diff --git a/container-object-storage-interface-controller/release-tools/RELEASE.md b/container-object-storage-interface-controller/release-tools/RELEASE.md deleted file mode 100644 index a0fd815b..00000000 --- a/container-object-storage-interface-controller/release-tools/RELEASE.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release Process - -No tagged releases are planned at this point. The intention is to keep -the master branch in a state such that it can be used for all -supported branches in downstream repos which use these files. diff --git a/container-object-storage-interface-controller/release-tools/SECURITY_CONTACTS b/container-object-storage-interface-controller/release-tools/SECURITY_CONTACTS deleted file mode 100644 index 2af1414e..00000000 --- a/container-object-storage-interface-controller/release-tools/SECURITY_CONTACTS +++ /dev/null @@ -1,14 +0,0 @@ -# Defined below are the security contacts for this repo. -# -# They are the contact point for the Product Security Team to reach out -# to for triaging and handling of incoming issues. -# -# The below names agree to abide by the -# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) -# and will be removed and replaced if they violate that agreement. -# -# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE -# INSTRUCTIONS AT https://kubernetes.io/security/ - -saad-ali -msau42 diff --git a/container-object-storage-interface-controller/release-tools/SIDECAR_RELEASE_PROCESS.md b/container-object-storage-interface-controller/release-tools/SIDECAR_RELEASE_PROCESS.md deleted file mode 100644 index 4575eb81..00000000 --- a/container-object-storage-interface-controller/release-tools/SIDECAR_RELEASE_PROCESS.md +++ /dev/null @@ -1,106 +0,0 @@ -# Sidecar Release Process - -This page describes the process for releasing a kubernetes-csi sidecar. - -## Prerequisites - -The release manager must: - -* Be a member of the kubernetes-csi organization. Open an - [issue](https://github.com/kubernetes/org/issues/new?assignees=&labels=area%2Fgithub-membership&template=membership.md&title=REQUEST%3A+New+membership+for+%3Cyour-GH-handle%3E) in - kubernetes/org to request membership -* Be a top level approver for the repository. To become a top level approver, - the candidate must demonstrate ownership and deep knowledge of the repository - through active maintainence, responding to and fixing issues, reviewing PRs, - test triage. -* Be part of the maintainers or admin group for the repository. admin is a - superset of maintainers, only maintainers level is required for cutting a - release. Membership can be requested by submitting a PR to kubernetes/org. - [Example](https://github.com/kubernetes/org/pull/1467) - -## Updating CI Jobs -Whenever a new Kubernetes minor version is released, our kubernetes-csi CI jobs -must be updated. - -[Our CI jobs](https://k8s-testgrid.appspot.com/sig-storage-csi-ci) have the -naming convention `-on-`. - -1. Jobs should be actively monitored to find and fix failures in sidecars and - infrastructure changes early in the development cycle. Test failures are sent - to kubernetes-sig-storage-test-failures@googlegroups.com. -1. "-on-master" jobs are the closest reflection to the new Kubernetes version. -1. Fixes to our prow.sh CI script can be tested in the [CSI hostpath - repo](https://github.com/kubernetes-csi/csi-driver-host-path) by modifying - [prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/release-tools/prow.sh) - along with any overrides in - [.prow.sh](https://github.com/kubernetes-csi/csi-driver-host-path/blob/master/.prow.sh) - to mirror the failing environment. Once e2e tests are passing (verify-unit tests - will fail), then the prow.sh changes can be submitted to [csi-release-tools](https://github.com/kubernetes-csi/csi-release-tools). -1. Changes can then be updated in all the sidecar repos and hostpath driver repo - by following the [update - instructions](https://github.com/kubernetes-csi/csi-release-tools/blob/master/README.md#sharing-and-updating). -1. New pull and CI jobs are configured by adding new K8s versions to the top of - [gen-jobs.sh](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-csi/gen-jobs.sh). - New pull jobs that have been unverified should be initially made optional by - setting the new K8s version as - [experimental](https://github.com/kubernetes/test-infra/blob/a1858f46d6014480b130789df58b230a49203a64/config/jobs/kubernetes-csi/gen-jobs.sh#L40). -1. Once new pull and CI jobs have been verified, and the new Kubernetes version - is released, we can make the optional jobs required, and also remove the - Kubernetes versions that are no longer supported. - -## Release Process -1. Identify all issues and ongoing PRs that should go into the release, and - drive them to resolution. -1. Download v2.8+ [K8s release notes - generator](https://github.com/kubernetes/release/tree/master/cmd/release-notes) -1. Generate release notes for the release. Replace arguments with the relevant - information. - * Clean up old cached information (also needed if you are generating release - notes for multiple repos) - ```bash - rm -rf /tmp/k8s-repo - ``` - * For new minor releases on master: - ```bash - GITHUB_TOKEN= release-notes --discover=mergebase-to-latest - --github-org=kubernetes-csi --github-repo=external-provisioner - --required-author="" --output out.md - ``` - * For new patch releases on a release branch: - ```bash - GITHUB_TOKEN= release-notes --discover=patch-to-latest --branch=release-1.1 - --github-org=kubernetes-csi --github-repo=external-provisioner - --required-author="" --output out.md - ``` -1. Compare the generated output to the new commits for the release to check if - any notable change missed a release note. -1. Reword release notes as needed. Make sure to check notes for breaking - changes and deprecations. -1. If release is a new major/minor version, create a new `CHANGELOG-..md` - file. Otherwise, add the release notes to the top of the existing CHANGELOG - file for that minor version. -1. Submit a PR for the CHANGELOG changes. -1. Submit a PR for README changes, in particular, Compatibility, Feature status, - and any other sections that may need updating. -1. Check that all [canary CI - jobs](https://k8s-testgrid.appspot.com/sig-storage-csi-ci) are passing, - and that test coverage is adequate for the changes that are going into the release. -1. Make sure that no new PRs have merged in the meantime, and no PRs are in - flight and soon to be merged. -1. Create a new release following a previous release as a template. Be sure to select the correct - branch. This requires Github release permissions as required by the prerequisites. - [external-provisioner example](https://github.com/kubernetes-csi/external-provisioner/releases/new) -1. If release was a new major/minor version, create a new `release-` - branch at that commit. -1. Check [image build status](https://k8s-testgrid.appspot.com/sig-storage-image-build). -1. Promote images from k8s-staging-sig-storage to k8s.gcr.io/sig-storage. From - the [k8s image - repo](https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage), - run `./generate.sh > images.yaml`, and send a PR with the updated images. - Once merged, the image promoter will copy the images from staging to prod. -1. Update [kubernetes-csi/docs](https://github.com/kubernetes-csi/docs) sidecar - and feature pages with the new released version. -1. After all the sidecars have been released, update - CSI hostpath driver with the new sidecars in the [CSI repo](https://github.com/kubernetes-csi/csi-driver-host-path/tree/master/deploy) - and [k/k - in-tree](https://github.com/kubernetes/kubernetes/tree/master/test/e2e/testing-manifests/storage-csi/hostpath/hostpath) diff --git a/container-object-storage-interface-controller/release-tools/build.make b/container-object-storage-interface-controller/release-tools/build.make deleted file mode 100644 index c17a1c19..00000000 --- a/container-object-storage-interface-controller/release-tools/build.make +++ /dev/null @@ -1,272 +0,0 @@ -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.PHONY: build-% build container-% container push-% push clean test - -# A space-separated list of all commands in the repository, must be -# set in main Makefile of a repository. -# CMDS= - -# This is the default. It can be overridden in the main Makefile after -# including build.make. -REGISTRY_NAME=quay.io/k8scsi - -# Can be set to -mod=vendor to ensure that the "vendor" directory is used. -GOFLAGS_VENDOR= - -# Revision that gets built into each binary via the main.version -# string. Uses the `git describe` output based on the most recent -# version tag with a short revision suffix or, if nothing has been -# tagged yet, just the revision. -# -# Beware that tags may also be missing in shallow clones as done by -# some CI systems (like TravisCI, which pulls only 50 commits). -REV=$(shell git describe --long --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD) - -# A space-separated list of image tags under which the current build is to be pushed. -# Determined dynamically. -IMAGE_TAGS= - -# A "canary" image gets built if the current commit is the head of the remote "master" branch. -# That branch does not exist when building some other branch in TravisCI. -IMAGE_TAGS+=$(shell if [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 origin/master 2>/dev/null)" ]; then echo "canary"; fi) - -# A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch. -# The actual suffix does not matter, only the "release-" prefix is checked. -IMAGE_TAGS+=$(shell git branch -r --points-at=HEAD | grep 'origin/release-' | grep -v -e ' -> ' | sed -e 's;.*/release-\(.*\);\1-canary;') - -# A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit. -# --abbrev=0 suppresses long format, only showing the closest tag. -IMAGE_TAGS+=$(shell tagged="$$(git describe --tags --match='v*' --abbrev=0)"; if [ "$$tagged" ] && [ "$$(git rev-list -n1 HEAD)" = "$$(git rev-list -n1 $$tagged)" ]; then echo $$tagged; fi) - -# Images are named after the command contained in them. -IMAGE_NAME=$(REGISTRY_NAME)/$* - -ifdef V -# Adding "-alsologtostderr" assumes that all test binaries contain glog. This is not guaranteed. -TESTARGS = -v -args -alsologtostderr -v 5 -else -TESTARGS = -endif - -# Specific packages can be excluded from each of the tests below by setting the *_FILTER_CMD variables -# to something like "| grep -v 'github.com/kubernetes-csi/project/pkg/foobar'". See usage below. - -# BUILD_PLATFORMS contains a set of triplets, -# separated by semicolon. An empty variable or empty entry (= just a -# semicolon) builds for the default platform of the current Go -# toolchain. -BUILD_PLATFORMS = - -# This builds each command (= the sub-directories of ./cmd) for the target platform(s) -# defined by BUILD_PLATFORMS. -$(CMDS:%=build-%): build-%: check-go-version-go - mkdir -p bin - echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \ - if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o "./bin/$*$$suffix" ./cmd/$*); then \ - echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \ - exit 1; \ - fi; \ - done - -$(CMDS:%=container-%): container-%: build-% - docker build -t $*:latest -f $(shell if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi) --label revision=$(REV) . - -$(CMDS:%=push-%): push-%: container-% - set -ex; \ - push_image () { \ - docker tag $*:latest $(IMAGE_NAME):$$tag; \ - docker push $(IMAGE_NAME):$$tag; \ - }; \ - for tag in $(IMAGE_TAGS); do \ - if [ "$$tag" = "canary" ] || echo "$$tag" | grep -q -e '-canary$$'; then \ - : "creating or overwriting canary image"; \ - push_image; \ - elif docker pull $(IMAGE_NAME):$$tag 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$$tag not found"; then \ - : "creating release image"; \ - push_image; \ - else \ - : "release image $(IMAGE_NAME):$$tag already exists, skipping push"; \ - fi; \ - done - -build: $(CMDS:%=build-%) -container: $(CMDS:%=container-%) -push: $(CMDS:%=push-%) - -# Additional parameters are needed when pushing to a local registry, -# see https://github.com/docker/buildx/issues/94. -# However, that then runs into https://github.com/docker/cli/issues/2396. -# -# What works for local testing is: -# make push-multiarch PULL_BASE_REF=master REGISTRY_NAME= BUILD_PLATFORMS="linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" -DOCKER_BUILDX_CREATE_ARGS ?= - -# This target builds a multiarch image for one command using Moby BuildKit builder toolkit. -# Docker Buildx is included in Docker 19.03. -# -# ./cmd//Dockerfile[.Windows] is used if found, otherwise Dockerfile[.Windows]. -# It is currently optional: if no such file exists, Windows images are not included, -# even when Windows is listed in BUILD_PLATFORMS. That way, projects can test that -# Windows binaries can be built before adding a Dockerfile for it. -# -# BUILD_PLATFORMS determines which individual images are included in the multiarch image. -# PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name, and determines -# the tag for the resulting multiarch image. -$(CMDS:%=push-multiarch-%): push-multiarch-%: check-pull-base-ref build-% - set -ex; \ - DOCKER_CLI_EXPERIMENTAL=enabled; \ - export DOCKER_CLI_EXPERIMENTAL; \ - docker buildx create $(DOCKER_BUILDX_CREATE_ARGS) --use --name multiarchimage-buildertest; \ - trap "docker buildx rm multiarchimage-buildertest" EXIT; \ - dockerfile_linux=$$(if [ -e ./cmd/$*/Dockerfile ]; then echo ./cmd/$*/Dockerfile; else echo Dockerfile; fi); \ - dockerfile_windows=$$(if [ -e ./cmd/$*/Dockerfile.Windows ]; then echo ./cmd/$*/Dockerfile.Windows; else echo Dockerfile.Windows; fi); \ - if [ '$(BUILD_PLATFORMS)' ]; then build_platforms='$(BUILD_PLATFORMS)'; else build_platforms="linux amd64"; fi; \ - if ! [ -f "$$dockerfile_windows" ]; then \ - build_platforms="$$(echo "$$build_platforms" | sed -e 's/windows *[^ ]* *.exe//g' -e 's/; *;/;/g')"; \ - fi; \ - pushMultiArch () { \ - tag=$$1; \ - echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do \ - docker buildx build --push \ - --tag $(IMAGE_NAME):$$arch-$$os-$$tag \ - --platform=$$os/$$arch \ - --file $$(eval echo \$${dockerfile_$$os}) \ - --build-arg binary=./bin/$*$$suffix \ - --label revision=$(REV) \ - .; \ - done; \ - images=$$(echo "$$build_platforms" | tr ';' '\n' | while read -r os arch suffix; do echo $(IMAGE_NAME):$$arch-$$os-$$tag; done); \ - docker manifest create --amend $(IMAGE_NAME):$$tag $$images; \ - docker manifest push -p $(IMAGE_NAME):$$tag; \ - }; \ - if [ $(PULL_BASE_REF) = "master" ]; then \ - : "creating or overwriting canary image"; \ - pushMultiArch canary; \ - elif echo $(PULL_BASE_REF) | grep -q -e 'release-*' ; then \ - : "creating or overwriting canary image for release branch"; \ - release_canary_tag=$$(echo $(PULL_BASE_REF) | cut -f2 -d '-')-canary; \ - pushMultiArch $$release_canary_tag; \ - elif docker pull $(IMAGE_NAME):$(PULL_BASE_REF) 2>&1 | tee /dev/stderr | grep -q "manifest for $(IMAGE_NAME):$(PULL_BASE_REF) not found"; then \ - : "creating release image"; \ - pushMultiArch $(PULL_BASE_REF); \ - else \ - : "ERROR: release image $(IMAGE_NAME):$(PULL_BASE_REF) already exists: a new tag is required!"; \ - exit 1; \ - fi - -.PHONY: check-pull-base-ref -check-pull-base-ref: - if ! [ "$(PULL_BASE_REF)" ]; then \ - echo >&2 "ERROR: PULL_BASE_REF must be set to 'master', 'release-x.y', or a tag name."; \ - exit 1; \ - fi - -.PHONY: push-multiarch -push-multiarch: $(CMDS:%=push-multiarch-%) - -clean: - -rm -rf bin - -test: check-go-version-go - -.PHONY: test-go -test: test-go -test-go: - @ echo; echo "### $@:" - go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS) - -.PHONY: test-vet -test: test-vet -test-vet: - @ echo; echo "### $@:" - go vet $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)` - -.PHONY: test-fmt -test: test-fmt -test-fmt: - @ echo; echo "### $@:" - files=$$(find . -name '*.go' | grep -v './vendor' $(TEST_FMT_FILTER_CMD)); \ - if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \ - echo "formatting errors:"; \ - gofmt -d $$files; \ - false; \ - fi - -# This test only runs when dep >= 0.5 is installed, which is the case for the CI setup. -# When using 'go mod', we allow the test to be skipped in the Prow CI under some special -# circumstances, because it depends on accessing all remote repos and thus -# running it all the time would defeat the purpose of vendoring: -# - not handling a PR or -# - the fabricated merge commit leaves go.mod, go.sum and vendor dir unchanged -# - release-tools also didn't change (changing rules or Go version might lead to -# a different result and thus must be tested) -# - import statements not changed (because if they change, go.mod might have to be updated) -# -# "git diff" is intelligent enough to annotate changes inside the "import" block in -# the start of the diff hunk: -# -# diff --git a/rpc/common.go b/rpc/common.go -# index bb4a5c4..5fa4271 100644 -# --- a/rpc/common.go -# +++ b/rpc/common.go -# @@ -21,7 +21,6 @@ import ( -# "fmt" -# "time" -# -# - "google.golang.org/grpc" -# "google.golang.org/grpc/codes" -# "google.golang.org/grpc/status" -# -# We rely on that to find such changes. -# -# Vendoring is optional when using go.mod. -.PHONY: test-vendor -test: test-vendor -test-vendor: - @ echo; echo "### $@:" - @ ./release-tools/verify-vendor.sh - -.PHONY: test-subtree -test: test-subtree -test-subtree: - @ echo; echo "### $@:" - ./release-tools/verify-subtree.sh release-tools - -# Components can extend the set of directories which must pass shellcheck. -# The default is to check only the release-tools directory itself. -TEST_SHELLCHECK_DIRS=release-tools -.PHONY: test-shellcheck -test: test-shellcheck -test-shellcheck: - @ echo; echo "### $@:" - @ ret=0; \ - if ! command -v docker; then \ - echo "skipped, no Docker"; \ - exit 0; \ - fi; \ - for dir in $(abspath $(TEST_SHELLCHECK_DIRS)); do \ - echo; \ - echo "$$dir:"; \ - ./release-tools/verify-shellcheck.sh "$$dir" || ret=1; \ - done; \ - exit $$ret - -# Targets in the makefile can depend on check-go-version- -# to trigger a warning if the x.y version of that binary does not match -# what the project uses. Make ensures that this is only checked once per -# invocation. -.PHONY: check-go-version-% -check-go-version-%: - ./release-tools/verify-go-version.sh "$*" diff --git a/container-object-storage-interface-controller/release-tools/cloudbuild.sh b/container-object-storage-interface-controller/release-tools/cloudbuild.sh deleted file mode 100755 index 3ba11eca..00000000 --- a/container-object-storage-interface-controller/release-tools/cloudbuild.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -# shellcheck disable=SC1091 -. release-tools/prow.sh - -gcr_cloud_build diff --git a/container-object-storage-interface-controller/release-tools/cloudbuild.yaml b/container-object-storage-interface-controller/release-tools/cloudbuild.yaml deleted file mode 100644 index 8f678924..00000000 --- a/container-object-storage-interface-controller/release-tools/cloudbuild.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# A configuration file for multi-arch image building with the Google cloud build service. -# -# Repos using this file must: -# - import csi-release-tools -# - add a symlink cloudbuild.yaml -> release-tools/cloudbuild.yaml -# - add a .cloudbuild.sh which can be a custom file or a symlink -# to release-tools/cloudbuild.sh -# - accept "binary" as build argument in their Dockerfile(s) (see -# https://github.com/pohly/node-driver-registrar/blob/3018101987b0bb6da2a2657de607174d6e3728f7/Dockerfile#L4-L6) -# because binaries will get built for different architectures and then -# get copied from the built host into the container image -# -# See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md -# for more details on image pushing process in Kubernetes. -# -# To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage. - -# This must be specified in seconds. If omitted, defaults to 600s (10 mins). -timeout: 1800s -# This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, -# or any new substitutions added in the future. -options: - substitution_option: ALLOW_LOOSE -steps: - # The image must contain bash and curl. Ideally it should also contain - # the desired version of Go (currently defined in release-tools/travis.yml), - # but that just speeds up the build and is not required. - - name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200421-a2bf5f8' - entrypoint: ./.cloudbuild.sh - env: - - GIT_TAG=${_GIT_TAG} - - PULL_BASE_REF=${_PULL_BASE_REF} - - REGISTRY_NAME=gcr.io/${_STAGING_PROJECT} - - HOME=/root -substitutions: - # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and - # can be used as a substitution. - _GIT_TAG: '12345' - # _PULL_BASE_REF will contain the ref that was pushed to trigger this build - - # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'. - _PULL_BASE_REF: 'master' - # The default gcr.io staging project for Kubernetes-CSI - # (=> https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/GLOBAL). - # Might be overridden in the Prow build job for a repo which wants - # images elsewhere. - _STAGING_PROJECT: 'k8s-staging-sig-storage' diff --git a/container-object-storage-interface-controller/release-tools/code-of-conduct.md b/container-object-storage-interface-controller/release-tools/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/container-object-storage-interface-controller/release-tools/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/container-object-storage-interface-controller/release-tools/filter-junit.go b/container-object-storage-interface-controller/release-tools/filter-junit.go deleted file mode 100644 index cf1cb4ab..00000000 --- a/container-object-storage-interface-controller/release-tools/filter-junit.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* -This command filters a JUnit file such that only tests with a name -matching a regular expression are passed through. By concatenating -multiple input files it is possible to merge them into a single file. -*/ -package main - -import ( - "encoding/xml" - "flag" - "io/ioutil" - "os" - "regexp" -) - -var ( - output = flag.String("o", "-", "junit file to write, - for stdout") - tests = flag.String("t", "", "regular expression matching the test names that are to be included in the output") -) - -/* - * TestSuite represents a JUnit file. Due to how encoding/xml works, we have - * represent all fields that we want to be passed through. It's therefore - * not a complete solution, but good enough for Ginkgo + Spyglass. - */ -type TestSuite struct { - XMLName string `xml:"testsuite"` - TestCases []TestCase `xml:"testcase"` -} - -type TestCase struct { - Name string `xml:"name,attr"` - Time string `xml:"time,attr"` - SystemOut string `xml:"system-out,omitempty"` - Failure string `xml:"failure,omitempty"` - Skipped SkipReason `xml:"skipped,omitempty"` -} - -// SkipReason deals with the special : -// if present, we must re-encode it, even if empty. -type SkipReason string - -func (s *SkipReason) UnmarshalText(text []byte) error { - *s = SkipReason(text) - if *s == "" { - *s = " " - } - return nil -} - -func (s SkipReason) MarshalText() ([]byte, error) { - if s == " " { - return []byte{}, nil - } - return []byte(s), nil -} - -func main() { - var junit TestSuite - var data []byte - - flag.Parse() - - re := regexp.MustCompile(*tests) - - // Read all input files. - for _, input := range flag.Args() { - if input == "-" { - if _, err := os.Stdin.Read(data); err != nil { - panic(err) - } - } else { - var err error - data, err = ioutil.ReadFile(input) - if err != nil { - panic(err) - } - } - if err := xml.Unmarshal(data, &junit); err != nil { - panic(err) - } - } - - // Keep only matching testcases. Testcases skipped in all test runs are only stored once. - filtered := map[string]TestCase{} - for _, testcase := range junit.TestCases { - if !re.MatchString(testcase.Name) { - continue - } - entry, ok := filtered[testcase.Name] - if !ok || // not present yet - entry.Skipped != "" && testcase.Skipped == "" { // replaced skipped test with real test run - filtered[testcase.Name] = testcase - } - } - junit.TestCases = nil - for _, testcase := range filtered { - junit.TestCases = append(junit.TestCases, testcase) - } - - // Re-encode. - data, err := xml.MarshalIndent(junit, "", " ") - if err != nil { - panic(err) - } - - // Write to output. - if *output == "-" { - if _, err := os.Stdout.Write(data); err != nil { - panic(err) - } - } else { - if err := ioutil.WriteFile(*output, data, 0644); err != nil { - panic(err) - } - } -} diff --git a/container-object-storage-interface-controller/release-tools/go-get-kubernetes.sh b/container-object-storage-interface-controller/release-tools/go-get-kubernetes.sh deleted file mode 100755 index 8c4e3024..00000000 --- a/container-object-storage-interface-controller/release-tools/go-get-kubernetes.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script can be used while converting a repo from "dep" to "go mod" -# by calling it after "go mod init" or to update the Kubernetes packages -# in a repo that has already been converted. Only packages that are -# part of kubernetes/kubernetes and thus part of a Kubernetes release -# are modified. Other k8.io packages (like k8s.io/klog, k8s.io/utils) -# need to be updated separately. - -set -o pipefail - -cmd=$0 - -function help () { - echo "$cmd - update all components from kubernetes/kubernetes to that version" -} - -if [ $# -ne 1 ]; then - help - exit 1 -fi -case "$1" in -h|--help|help) help; exit 0;; esac - -die () { - echo >&2 "$@" - exit 1 -} - -k8s="$1" - -# If the repo imports k8s.io/kubernetes (directly or indirectly), then -# "go mod" will try to find "v0.0.0" versions because -# k8s.io/kubernetes has those in it's go.mod file -# (https://github.com/kubernetes/kubernetes/blob/2bd9643cee5b3b3a5ecbd3af49d09018f0773c77/go.mod#L146-L157). -# (https://github.com/kubernetes/kubernetes/issues/79384). -# -# We need to replicate the replace statements to override those fake -# versions also in our go.mod file (idea and some code from -# https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597). -mods=$( (set -x; curl --silent --show-error --fail "https://raw.githubusercontent.com/kubernetes/kubernetes/v${k8s}/go.mod") | - sed -n 's|.*k8s.io/\(.*\) => ./staging/src/k8s.io/.*|k8s.io/\1|p' - ) || die "failed to determine Kubernetes staging modules" -for mod in $mods; do - # The presence of a potentially incomplete go.mod file affects this command, - # so move elsewhere. - modinfo=$(set -x; cd /; env GO111MODULE=on go mod download -json "$mod@kubernetes-${k8s}") || - die "failed to determine version of $mod: $modinfo" - v=$(echo "$modinfo" | sed -n 's|.*"Version": "\(.*\)".*|\1|p') - (set -x; env GO111MODULE=on go mod edit "-replace=$mod=$mod@$v") || die "'go mod edit' failed" -done - -packages= - -# Beware that we have to work with packages, not modules (i.e. no -m -# flag), because some modules trigger a "no Go code except tests" -# error. Getting their packages works. -if ! packages=$( (set -x; env GO111MODULE=on go list all) | grep ^k8s.io/ | sed -e 's; *;;'); then - cat >&2 <&2 <" go.mod; then - deps="$deps $(echo "$package" | sed -e "s;\$;@kubernetes-$k8s;" -e 's;^k8s.io/kubernetes\(/.*\)@kubernetes-;k8s.io/kubernetes\1@v;')" - fi -done - -# shellcheck disable=SC2086 -(set -x; env GO111MODULE=on go get $deps 2>&1) || die "go get failed" -echo "SUCCESS" diff --git a/container-object-storage-interface-controller/release-tools/prow.sh b/container-object-storage-interface-controller/release-tools/prow.sh deleted file mode 100755 index b069a318..00000000 --- a/container-object-storage-interface-controller/release-tools/prow.sh +++ /dev/null @@ -1,1224 +0,0 @@ -#! /bin/bash -# -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# This script runs inside a Prow job. It can run unit tests ("make test") -# and E2E testing. This E2E testing covers different scenarios (see -# https://github.com/kubernetes/enhancements/pull/807): -# - running the stable hostpath example against a Kubernetes release -# - running the canary hostpath example against a Kubernetes release -# - building the component in the current repo and running the -# stable hostpath example with that one component replaced against -# a Kubernetes release -# -# The intended usage of this script is that individual repos import -# csi-release-tools, then link their top-level prow.sh to this or -# include it in that file. When including it, several of the variables -# can be overridden in the top-level prow.sh to customize the script -# for the repo. -# -# The expected environment is: -# - $GOPATH/src/ for the repository that is to be tested, -# with PR branch merged (when testing a PR) -# - running on linux-amd64 -# - bazel installed (when testing against Kubernetes master), must be recent -# enough for Kubernetes master -# - kind (https://github.com/kubernetes-sigs/kind) installed -# - optional: Go already installed - -RELEASE_TOOLS_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" -REPO_DIR="$(pwd)" - -# Sets the default value for a variable if not set already and logs the value. -# Any variable set this way is usually something that a repo's .prow.sh -# or the job can set. -configvar () { - # Ignore: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"? - # shellcheck disable=SC2140 - eval : \$\{"$1":="\$2"\} - eval echo "\$3:" "$1=\${$1}" -} - -# Takes the minor version of $CSI_PROW_KUBERNETES_VERSION and overrides it to -# $1 if they are equal minor versions. Ignores versions that begin with -# "release-". -override_k8s_version () { - local current_minor_version - local override_minor_version - - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - current_minor_version="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1\.\2/')" - - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - override_minor_version="$(echo "${1}" | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1\.\2/')" - if [ "${current_minor_version}" == "${override_minor_version}" ]; then - CSI_PROW_KUBERNETES_VERSION="$1" - echo "Overriding CSI_PROW_KUBERNETES_VERSION with $1: $CSI_PROW_KUBERNETES_VERSION" - fi -} - -# Prints the value of a variable + version suffix, falling back to variable + "LATEST". -get_versioned_variable () { - local var="$1" - local version="$2" - local value - - eval value="\${${var}_${version}}" - if ! [ "$value" ]; then - eval value="\${${var}_LATEST}" - fi - echo "$value" -} - -configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" - -# If we have a vendor directory, then use it. We must be careful to only -# use this for "make" invocations inside the project's repo itself because -# setting it globally can break other go usages (like "go get " -# which is disabled with GOFLAGS=-mod=vendor). -configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory" - -# Go versions can be specified seperately for different tasks -# If the pre-installed Go is missing or a different -# version, the required version here will get installed -# from https://golang.org/dl/. -go_from_travis_yml () { - grep "^ *- go:" "${RELEASE_TOOLS_ROOT}/travis.yml" | sed -e 's/.*go: *//' -} -configvar CSI_PROW_GO_VERSION_BUILD "$(go_from_travis_yml)" "Go version for building the component" # depends on component's source code -configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e -configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below -configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below -configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below - -# kind version to use. If the pre-installed version is different, -# the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ -# (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION "v0.6.0" "kind" - -# ginkgo test runner version to use. If the pre-installed version is -# different, the desired version is built from source. -configvar CSI_PROW_GINKGO_VERSION v1.7.0 "Ginkgo" - -# Ginkgo runs the E2E test in parallel. The default is based on the number -# of CPUs, but typically this can be set to something higher in the job. -configvar CSI_PROW_GINKO_PARALLEL "-p" "Ginko parallelism parameter(s)" - -# Enables building the code in the repository. On by default, can be -# disabled in jobs which only use pre-built components. -configvar CSI_PROW_BUILD_JOB true "building code in repo enabled" - -# Kubernetes version to test against. This must be a version number -# (like 1.13.3) for which there is a pre-built kind image (see -# https://hub.docker.com/r/kindest/node/tags), "latest" (builds -# Kubernetes from the master branch) or "release-x.yy" (builds -# Kubernetes from a release branch). -# -# This can also be a version that was not released yet at the time -# that the settings below were chose. The script will then -# use the same settings as for "latest" Kubernetes. This works -# as long as there are no breaking changes in Kubernetes, like -# deprecating or changing the implementation of an alpha feature. -configvar CSI_PROW_KUBERNETES_VERSION 1.17.0 "Kubernetes" - -# This is a hack to workaround the issue that each version -# of kind currently only supports specific patch versions of -# Kubernetes. We need to override CSI_PROW_KUBERNETES_VERSION -# passed in by our CI/pull jobs to the versions that -# kind v0.5.0 supports. -# -# If the version is prefixed with "release-", then nothing -# is overridden. -override_k8s_version "1.15.3" - -# CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and -# with underscore (1_13 instead of 1.13.3) and in uppercase (LATEST -# instead of latest). -# -# This is used to derive the right defaults for the variables below -# when a Prow job just defines the Kubernetes version. -csi_prow_kubernetes_version_suffix="$(echo "${CSI_PROW_KUBERNETES_VERSION}" | tr . _ | tr '[:lower:]' '[:upper:]' | sed -e 's/^RELEASE-//' -e 's/\([0-9]*\)_\([0-9]*\).*/\1_\2/')" - -# Work directory. It has to allow running executables, therefore /tmp -# is avoided. Cleaning up after the script is intentionally left to -# the caller. -configvar CSI_PROW_WORK "$(mkdir -p "$GOPATH/pkg" && mktemp -d "$GOPATH/pkg/csiprow.XXXXXXXXXX")" "work directory" - -# By default, this script tests sidecars with the CSI hostpath driver, -# using the install_csi_driver function. That function depends on -# a deployment script that it searches for in several places: -# -# - The "deploy" directory in the current repository: this is useful -# for the situation that a component becomes incompatible with the -# shared deployment, because then it can (temporarily!) provide its -# own example until the shared one can be updated; it's also how -# csi-driver-host-path itself provides the example. -# -# - CSI_PROW_DRIVER_VERSION of the CSI_PROW_DRIVER_REPO is checked -# out: this allows other repos to reference a version of the example -# that is known to be compatible. -# -# - The /deploy directory can have multiple sub-directories, -# each with different deployments (stable set of images for Kubernetes 1.13, -# stable set of images for Kubernetes 1.14, canary for latest Kubernetes, etc.). -# This is necessary because there may be incompatible changes in the -# "API" of a component (for example, its command line options or RBAC rules) -# or in its support for different Kubernetes versions (CSIDriverInfo as -# CRD in Kubernetes 1.13 vs builtin API in Kubernetes 1.14). -# -# When testing an update for a component in a PR job, the -# CSI_PROW_DEPLOYMENT variable can be set in the -# .prow.sh of each component when there are breaking changes -# that require using a non-default deployment. The default -# is a deployment named "kubernetes-x.yy" (if available), -# otherwise "kubernetes-latest". -# "none" disables the deployment of the hostpath driver. -# -# When no deploy script is found (nothing in `deploy` directory, -# CSI_PROW_DRIVER_REPO=none), nothing gets deployed. -# -# If the deployment script is called with CSI_PROW_TEST_DRIVER= as -# environment variable, then it must write a suitable test driver configuration -# into that file in addition to installing the driver. -configvar CSI_PROW_DRIVER_VERSION "v1.3.0" "CSI driver version" -configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo" -configvar CSI_PROW_DEPLOYMENT "" "deployment" - -# The install_csi_driver function may work also for other CSI drivers, -# as long as they follow the conventions of the CSI hostpath driver. -# If they don't, then a different install function can be provided in -# a .prow.sh file and this config variable can be overridden. -configvar CSI_PROW_DRIVER_INSTALL "install_csi_driver" "name of the shell function which installs the CSI driver" - -# If CSI_PROW_DRIVER_CANARY is set (typically to "canary", but also -# version tag. Usually empty. CSI_PROW_HOSTPATH_CANARY is -# accepted as alternative name because some test-infra jobs -# still use that name. -configvar CSI_PROW_DRIVER_CANARY "${CSI_PROW_HOSTPATH_CANARY}" "driver image override for canary images" - -# Image registry to use for canary images. -# Only valid if CSI_PROW_DRIVER_CANARY == "canary". -configvar CSI_PROW_DRIVER_CANARY_REGISTRY "gcr.io/k8s-staging-sig-storage" "registry for canary images" - -# The E2E testing can come from an arbitrary repo. The expectation is that -# the repo supports "go test ./test/e2e -args --storage.testdriver" (https://github.com/kubernetes/kubernetes/pull/72836) -# after setting KUBECONFIG. As a special case, if the repository is Kubernetes, -# then `make WHAT=test/e2e/e2e.test` is called first to ensure that -# all generated files are present. -# -# CSI_PROW_E2E_REPO=none disables E2E testing. -tag_from_version () { - version="$1" - shift - case "$version" in - latest) echo "master";; - release-*) echo "$version";; - *) echo "v$version";; - esac -} -configvar CSI_PROW_E2E_VERSION "$(tag_from_version "${CSI_PROW_KUBERNETES_VERSION}")" "E2E version" -configvar CSI_PROW_E2E_REPO "https://github.com/kubernetes/kubernetes" "E2E repo" -configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package" - -# csi-sanity testing from the csi-test repo can be run against the installed -# CSI driver. For this to work, deploying the driver must expose the Unix domain -# csi.sock as a TCP service for use by the csi-sanity command, which runs outside -# of the cluster. The alternative would have been to (cross-)compile csi-sanity -# and install it inside the cluster, which is not necessarily easier. -configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo" -configvar CSI_PROW_SANITY_VERSION 5421d9f3c37be3b95b241b44a094a3db11bee789 "csi-test version" # latest master -configvar CSI_PROW_SANITY_IMPORT_PATH github.com/kubernetes-csi/csi-test "csi-test package" -configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock" -configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver" -configvar CSI_PROW_SANITY_CONTAINER "hostpath" "Kubernetes container with CSI driver" - -# The version of dep to use for 'make test-vendor'. Ignored if the project doesn't -# use dep. Only binary releases of dep are supported (https://github.com/golang/dep/releases). -configvar CSI_PROW_DEP_VERSION v0.5.1 "golang dep version to be used for vendor checking" - -# Each job can run one or more of the following tests, identified by -# a single word: -# - unit testing -# - parallel excluding alpha features -# - serial excluding alpha features -# - parallel, only alpha feature -# - serial, only alpha features -# - sanity -# -# Unknown or unsupported entries are ignored. -# -# Sanity testing with csi-sanity only covers the CSI driver itself and -# thus only makes sense in repos which provide their own CSI -# driver. Repos can enable sanity testing by setting -# CSI_PROW_TESTS_SANITY=sanity. -configvar CSI_PROW_TESTS "unit parallel serial parallel-alpha serial-alpha sanity" "tests to run" -tests_enabled () { - local t1 t2 - # We want word-splitting here, so ignore: Quote to prevent word splitting, or split robustly with mapfile or read -a. - # shellcheck disable=SC2206 - local tests=(${CSI_PROW_TESTS}) - for t1 in "$@"; do - for t2 in "${tests[@]}"; do - if [ "$t1" = "$t2" ]; then - return - fi - done - done - return 1 -} -sanity_enabled () { - [ "${CSI_PROW_TESTS_SANITY}" = "sanity" ] && tests_enabled "sanity" -} -tests_need_kind () { - tests_enabled "parallel" "serial" "serial-alpha" "parallel-alpha" || - sanity_enabled -} -tests_need_non_alpha_cluster () { - tests_enabled "parallel" "serial" || - sanity_enabled -} -tests_need_alpha_cluster () { - tests_enabled "parallel-alpha" "serial-alpha" -} - -# Regex for non-alpha, feature-tagged tests that should be run. -# -# Starting with 1.17, snapshots is beta, but the E2E tests still have the -# [Feature:] tag. They need to be explicitly enabled. -configvar CSI_PROW_E2E_FOCUS_1_15 '^' "non-alpha, feature-tagged tests for Kubernetes = 1.15" # no tests to run, match nothing -configvar CSI_PROW_E2E_FOCUS_1_16 '^' "non-alpha, feature-tagged tests for Kubernetes = 1.16" # no tests to run, match nothing -configvar CSI_PROW_E2E_FOCUS_LATEST '\[Feature:VolumeSnapshotDataSource\]' "non-alpha, feature-tagged tests for Kubernetes >= 1.17" -configvar CSI_PROW_E2E_FOCUS "$(get_versioned_variable CSI_PROW_E2E_FOCUS "${csi_prow_kubernetes_version_suffix}")" "non-alpha, feature-tagged tests" - -# Serial vs. parallel is always determined by these regular expressions. -# Individual regular expressions are seperated by spaces for readability -# and expected to not contain spaces. Use dots instead. The complete -# regex for Ginkgo will be created by joining the individual terms. -configvar CSI_PROW_E2E_SERIAL '\[Serial\] \[Disruptive\]' "tags for serial E2E tests" -regex_join () { - echo "$@" | sed -e 's/ */|/g' -e 's/^|*//' -e 's/|*$//' -e 's/^$/this-matches-nothing/g' -} - -# Which tests are alpha depends on the Kubernetes version. We could -# use the same E2E test for all Kubernetes version. This would have -# the advantage that new tests can be applied to older versions -# without having to backport tests. -# -# But the feature tag gets removed from E2E tests when the corresponding -# feature becomes beta, so we would have to track which tests were -# alpha in previous Kubernetes releases. This was considered too -# error prone. Therefore we use E2E tests that match the Kubernetes -# version that is getting tested. -configvar CSI_PROW_E2E_ALPHA_LATEST '\[Feature:' "alpha tests for Kubernetes >= 1.14" # there's no need to update this, adding a new case for CSI_PROW_E2E for a new Kubernetes is enough -configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi_prow_kubernetes_version_suffix}")" "alpha tests" - -# After the parallel E2E test without alpha features, a test cluster -# with alpha features is brought up and tests that were previously -# disabled are run. The alpha gates in each release have to be listed -# explicitly. If none are set (= variable empty), alpha testing -# is skipped. -# -# Testing against "latest" Kubernetes is problematic because some alpha -# feature which used to work might stop working or change their behavior -# such that the current tests no longer pass. If that happens, -# kubernetes-csi components must be updated, either by disabling -# the failing test for "latest" or by updating the test and not running -# it anymore for older releases. -configvar CSI_PROW_E2E_ALPHA_GATES_1_15 'VolumeSnapshotDataSource=true,ExpandCSIVolumes=true' "alpha feature gates for Kubernetes 1.15" -configvar CSI_PROW_E2E_ALPHA_GATES_1_16 'VolumeSnapshotDataSource=true' "alpha feature gates for Kubernetes 1.16" -# TODO: add new CSI_PROW_ALPHA_GATES_xxx entry for future Kubernetes releases and -# add new gates to CSI_PROW_E2E_ALPHA_GATES_LATEST. -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kubernetes" -configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" - -# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment -configvar CSI_SNAPSHOTTER_VERSION 'v2.0.1' "external-snapshotter version tag" - -# Some tests are known to be unusable in a KinD cluster. For example, -# stopping kubelet with "ssh systemctl stop kubelet" simply -# doesn't work. Such tests should be written in a way that they verify -# whether they can run with the current cluster provider, but until -# they are, we filter them out by name. Like the other test selection -# variables, this is again a space separated list of regular expressions. -# -# "different node" test skips can be removed once -# https://github.com/kubernetes/kubernetes/pull/82678 has been backported -# to all the K8s versions we test against -configvar CSI_PROW_E2E_SKIP 'Disruptive|different\s+node' "tests that need to be skipped" - -# This is the directory for additional result files. Usually set by Prow, but -# if not (for example, when invoking manually) it defaults to the work directory. -configvar ARTIFACTS "${CSI_PROW_WORK}/artifacts" "artifacts" -mkdir -p "${ARTIFACTS}" - -run () { - echo "$(date) $(go version | sed -e 's/.*version \(go[^ ]*\).*/\1/') $(if [ "$(pwd)" != "${REPO_DIR}" ]; then pwd; fi)\$" "$@" >&2 - "$@" -} - -info () { - echo >&2 INFO: "$@" -} - -warn () { - echo >&2 WARNING: "$@" -} - -die () { - echo >&2 ERROR: "$@" - exit 1 -} - -# For additional tools. -CSI_PROW_BIN="${CSI_PROW_WORK}/bin" -mkdir -p "${CSI_PROW_BIN}" -PATH="${CSI_PROW_BIN}:$PATH" - -# Ensure that PATH has the desired version of the Go tools, then run command given as argument. -# Empty parameter uses the already installed Go. In Prow, that version is kept up-to-date by -# bumping the container image regularly. -run_with_go () { - local version - version="$1" - shift - - if ! [ "$version" ] || go version 2>/dev/null | grep -q "go$version"; then - run "$@" - else - if ! [ -d "${CSI_PROW_WORK}/go-$version" ]; then - run curl --fail --location "https://dl.google.com/go/go$version.linux-amd64.tar.gz" | tar -C "${CSI_PROW_WORK}" -zxf - || die "installation of Go $version failed" - mv "${CSI_PROW_WORK}/go" "${CSI_PROW_WORK}/go-$version" - fi - PATH="${CSI_PROW_WORK}/go-$version/bin:$PATH" run "$@" - fi -} - -# Ensure that we have the desired version of kind. -install_kind () { - if kind --version 2>/dev/null | grep -q " ${CSI_PROW_KIND_VERSION}$"; then - return - fi - if run curl --fail --location -o "${CSI_PROW_WORK}/bin/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${CSI_PROW_KIND_VERSION}/kind-linux-amd64"; then - chmod u+x "${CSI_PROW_WORK}/bin/kind" - else - git_checkout https://github.com/kubernetes-sigs/kind "${GOPATH}/src/sigs.k8s.io/kind" "${CSI_PROW_KIND_VERSION}" --depth=1 && - (cd "${GOPATH}/src/sigs.k8s.io/kind" && make install INSTALL_DIR="${CSI_PROW_WORK}/bin") - fi -} - -# Ensure that we have the desired version of the ginkgo test runner. -install_ginkgo () { - # CSI_PROW_GINKGO_VERSION contains the tag with v prefix, the command line output does not. - if [ "v$(ginkgo version 2>/dev/null | sed -e 's/.* //')" = "${CSI_PROW_GINKGO_VERSION}" ]; then - return - fi - git_checkout https://github.com/onsi/ginkgo "$GOPATH/src/github.com/onsi/ginkgo" "${CSI_PROW_GINKGO_VERSION}" --depth=1 && - # We have to get dependencies and hence can't call just "go build". - run_with_go "${CSI_PROW_GO_VERSION_GINKGO}" go get github.com/onsi/ginkgo/ginkgo || die "building ginkgo failed" && - mv "$GOPATH/bin/ginkgo" "${CSI_PROW_BIN}" -} - -# Ensure that we have the desired version of dep. -install_dep () { - if dep version 2>/dev/null | grep -q "version:.*${CSI_PROW_DEP_VERSION}$"; then - return - fi - run curl --fail --location -o "${CSI_PROW_WORK}/bin/dep" "https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64" && - chmod u+x "${CSI_PROW_WORK}/bin/dep" -} - -# This checks out a repo ("https://github.com/kubernetes/kubernetes") -# in a certain location ("$GOPATH/src/k8s.io/kubernetes") at -# a certain revision (a hex commit hash, v1.13.1, master). It's okay -# for that directory to exist already. -git_checkout () { - local repo path revision - repo="$1" - shift - path="$1" - shift - revision="$1" - shift - - mkdir -p "$path" - if ! [ -d "$path/.git" ]; then - run git init "$path" - fi - if (cd "$path" && run git fetch "$@" "$repo" "$revision"); then - (cd "$path" && run git checkout FETCH_HEAD) || die "checking out $repo $revision failed" - else - # Might have been because fetching by revision is not - # supported by GitHub (https://github.com/isaacs/github/issues/436). - # Fall back to fetching everything. - (cd "$path" && run git fetch "$repo" '+refs/heads/*:refs/remotes/csiprow/heads/*' '+refs/tags/*:refs/tags/*') || die "fetching $repo failed" - (cd "$path" && run git checkout "$revision") || die "checking out $repo $revision failed" - fi - # This is useful for local testing or when switching between different revisions in the same - # repo. - (cd "$path" && run git clean -fdx) || die "failed to clean $path" -} - -# This clones a repo ("https://github.com/kubernetes/kubernetes") -# in a certain location ("$GOPATH/src/k8s.io/kubernetes") at -# a the head of a specific branch (i.e., release-1.13, master). -# The directory cannot exist. -git_clone_branch () { - local repo path branch parent - repo="$1" - shift - path="$1" - shift - branch="$1" - shift - - parent="$(dirname "$path")" - mkdir -p "$parent" - (cd "$parent" && run git clone --single-branch --branch "$branch" "$repo" "$path") || die "cloning $repo" failed - # This is useful for local testing or when switching between different revisions in the same - # repo. - (cd "$path" && run git clean -fdx) || die "failed to clean $path" -} - -list_gates () ( - set -f; IFS=',' - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - set -- $1 - while [ "$1" ]; do - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - echo "$1" | sed -e 's/ *\([^ =]*\) *= *\([^ ]*\) */ \1: \2/' - shift - done -) - -go_version_for_kubernetes () ( - local path="$1" - local version="$2" - local go_version - - # We use the minimal Go version specified for each K8S release (= minimum_go_version in hack/lib/golang.sh). - # More recent versions might also work, but we don't want to count on that. - go_version="$(grep minimum_go_version= "$path/hack/lib/golang.sh" | sed -e 's/.*=go//')" - if ! [ "$go_version" ]; then - die "Unable to determine Go version for Kubernetes $version from hack/lib/golang.sh." - fi - # Strip the trailing .0. Kubernetes includes it, Go itself doesn't. - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - go_version="$(echo "$go_version" | sed -e 's/\.0$//')" - echo "$go_version" -) - -csi_prow_kind_have_kubernetes=false -# Brings up a Kubernetes cluster and sets KUBECONFIG. -# Accepts additional feature gates in the form gate1=true|false,gate2=... -start_cluster () { - local image gates - gates="$1" - - if kind get clusters | grep -q csi-prow; then - run kind delete cluster --name=csi-prow || die "kind delete failed" - fi - - # Build from source? - if [[ "${CSI_PROW_KUBERNETES_VERSION}" =~ ^release-|^latest$ ]]; then - if ! ${csi_prow_kind_have_kubernetes}; then - local version="${CSI_PROW_KUBERNETES_VERSION}" - if [ "$version" = "latest" ]; then - version=master - fi - git_clone_branch https://github.com/kubernetes/kubernetes "${CSI_PROW_WORK}/src/kubernetes" "$version" || die "checking out Kubernetes $version failed" - - go_version="$(go_version_for_kubernetes "${CSI_PROW_WORK}/src/kubernetes" "$version")" || die "cannot proceed without knowing Go version for Kubernetes" - run_with_go "$go_version" kind build node-image --type bazel --image csiprow/node:latest --kube-root "${CSI_PROW_WORK}/src/kubernetes" || die "'kind build node-image' failed" - csi_prow_kind_have_kubernetes=true - fi - image="csiprow/node:latest" - else - image="kindest/node:v${CSI_PROW_KUBERNETES_VERSION}" - fi - cat >"${CSI_PROW_WORK}/kind-config.yaml" <>"${CSI_PROW_WORK}/kind-config.yaml" </dev/null; wait) - info "For container output see job artifacts." - die "deploying the CSI driver with ${deploy_driver} failed" - fi -} - -# Installs all nessesary snapshotter CRDs -install_snapshot_crds() { - # Wait until volumesnapshot CRDs are in place. - CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/config/crd" - kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshotclasses.yaml" --validate=false - kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshots.yaml" --validate=false - kubectl apply -f "${CRD_BASE_DIR}/snapshot.storage.k8s.io_volumesnapshotcontents.yaml" --validate=false - cnt=0 - until kubectl get volumesnapshotclasses.snapshot.storage.k8s.io \ - && kubectl get volumesnapshots.snapshot.storage.k8s.io \ - && kubectl get volumesnapshotcontents.snapshot.storage.k8s.io; do - if [ $cnt -gt 30 ]; then - echo >&2 "ERROR: snapshot CRDs not ready after over 1 min" - exit 1 - fi - echo "$(date +%H:%M:%S)" "waiting for snapshot CRDs, attempt #$cnt" - cnt=$((cnt + 1)) - sleep 2 - done -} - -# Install snapshot controller and associated RBAC, retrying until the pod is running. -install_snapshot_controller() { - kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml" - cnt=0 - until kubectl get clusterrolebinding snapshot-controller-role; do - if [ $cnt -gt 30 ]; then - echo "Cluster role bindings:" - kubectl describe clusterrolebinding - echo >&2 "ERROR: snapshot controller RBAC not ready after over 5 min" - exit 1 - fi - echo "$(date +%H:%M:%S)" "waiting for snapshot RBAC setup complete, attempt #$cnt" - cnt=$((cnt + 1)) - sleep 10 - done - - - kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml" - cnt=0 - expected_running_pods=$(curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${CSI_SNAPSHOTTER_VERSION}"/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml | grep replicas | cut -d ':' -f 2-) - while [ "$(kubectl get pods -l app=snapshot-controller | grep 'Running' -c)" -lt "$expected_running_pods" ]; do - if [ $cnt -gt 30 ]; then - echo "snapshot-controller pod status:" - kubectl describe pods -l app=snapshot-controller - echo >&2 "ERROR: snapshot controller not ready after over 5 min" - exit 1 - fi - echo "$(date +%H:%M:%S)" "waiting for snapshot controller deployment to complete, attempt #$cnt" - cnt=$((cnt + 1)) - sleep 10 - done -} - -# collect logs and cluster status (like the version of all components, Kubernetes version, test version) -collect_cluster_info () { - cat <>"${ARTIFACTS}/$namespace/$pod/$container.log" & - echo "$!" - done - done -} - -# Makes the E2E test suite binary available as "${CSI_PROW_WORK}/e2e.test". -install_e2e () { - if [ -e "${CSI_PROW_WORK}/e2e.test" ]; then - return - fi - - git_checkout "${CSI_PROW_E2E_REPO}" "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}" --depth=1 && - if [ "${CSI_PROW_E2E_IMPORT_PATH}" = "k8s.io/kubernetes" ]; then - go_version="${CSI_PROW_GO_VERSION_E2E:-$(go_version_for_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}")}" && - run_with_go "$go_version" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && - ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/e2e.test" "${CSI_PROW_WORK}" - else - run_with_go "${CSI_PROW_GO_VERSION_E2E}" go test -c -o "${CSI_PROW_WORK}/e2e.test" "${CSI_PROW_E2E_IMPORT_PATH}/test/e2e" - fi -} - -# Makes the csi-sanity test suite binary available as -# "${CSI_PROW_WORK}/csi-sanity". -install_sanity () ( - if [ -e "${CSI_PROW_WORK}/csi-sanity" ]; then - return - fi - - git_checkout "${CSI_PROW_SANITY_REPO}" "${GOPATH}/src/${CSI_PROW_SANITY_IMPORT_PATH}" "${CSI_PROW_SANITY_VERSION}" --depth=1 || die "checking out csi-sanity failed" - run_with_go "${CSI_PROW_GO_VERSION_SANITY}" go test -c -o "${CSI_PROW_WORK}/csi-sanity" "${CSI_PROW_SANITY_IMPORT_PATH}/cmd/csi-sanity" || die "building csi-sanity failed" -) - -# Captures pod output while running some other command. -run_with_loggers () ( - loggers=$(start_loggers -f) - trap 'kill $loggers' EXIT - - run "$@" -) - -# Invokes the filter-junit.go tool. -run_filter_junit () { - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" go run "${RELEASE_TOOLS_ROOT}/filter-junit.go" "$@" -} - -# Runs the E2E test suite in a sub-shell. -run_e2e () ( - name="$1" - shift - - install_e2e || die "building e2e.test failed" - install_ginkgo || die "installing ginkgo failed" - - # Rename, merge and filter JUnit files. Necessary in case that we run the E2E suite again - # and to avoid the large number of "skipped" tests that we get from using - # the full Kubernetes E2E testsuite while only running a few tests. - move_junit () { - if ls "${ARTIFACTS}"/junit_[0-9]*.xml 2>/dev/null >/dev/null; then - run_filter_junit -t="External Storage" -o "${ARTIFACTS}/junit_${name}.xml" "${ARTIFACTS}"/junit_[0-9]*.xml && rm -f "${ARTIFACTS}"/junit_[0-9]*.xml - fi - } - trap move_junit EXIT - - cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" && - run_with_loggers ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml" -) - -# Run csi-sanity against installed CSI driver. -run_sanity () ( - install_sanity || die "installing csi-sanity failed" - - cat >"${CSI_PROW_WORK}/mkdir_in_pod.sh" <"${CSI_PROW_WORK}/rmdir_in_pod.sh" </\>/g' -e 's/\x1B...//g' -} - -# The "make test" output starts each test with "### :" -# and then ends when the next test starts or with "make: *** -# [] Error 1" when there was a failure. Here we read each -# line of that output, split it up into individual tests and generate -# a make-test.xml file in JUnit format. -make_test_to_junit () { - local ret out testname testoutput - ret=0 - # Plain make-test.xml was not delivered as text/xml by the web - # server and ignored by spyglass. It seems that the name has to - # match junit*.xml. - out="${ARTIFACTS}/junit_make_test.xml" - testname= - echo "" >>"$out" - - while IFS= read -r line; do - echo "$line" # pass through - if echo "$line" | grep -q "^### [^ ]*:$"; then - if [ "$testname" ]; then - # previous test succesful - echo " " >>"$out" - echo " " >>"$out" - fi - # Ignore: See if you can use ${variable//search/replace} instead. - # shellcheck disable=SC2001 - # - # start new test - testname="$(echo "$line" | sed -e 's/^### \([^ ]*\):$/\1/')" - testoutput= - echo " " >>"$out" - echo " " >>"$out" - elif echo "$line" | grep -q '^make: .*Error [0-9]*$'; then - if [ "$testname" ]; then - # Ignore: Consider using { cmd1; cmd2; } >> file instead of individual redirects. - # shellcheck disable=SC2129 - # - # end test with failure - echo " " >>"$out" - # Include the same text as in also in , - # because then it is easier to view in spyglass (shown directly - # instead of having to click through to stdout). - echo " " >>"$out" - echo -n "$testoutput" | ascii_to_xml >>"$out" - echo " " >>"$out" - echo " " >>"$out" - fi - # remember failure for exit code - ret=1 - # not currently inside a test - testname= - else - if [ "$testname" ]; then - # Test output. - echo "$line" | ascii_to_xml >>"$out" - testoutput="$testoutput$line -" - fi - fi - done - # if still in a test, close it now - if [ "$testname" ]; then - echo " " >>"$out" - echo " " >>"$out" - fi - echo "" >>"$out" - - # this makes the error more visible in spyglass - if [ "$ret" -ne 0 ]; then - echo "ERROR: 'make test' failed" - return 1 - fi -} - -# version_gt returns true if arg1 is greater than arg2. -# -# This function expects versions to be one of the following formats: -# X.Y.Z, release-X.Y.Z, vX.Y.Z -# -# where X,Y, and Z are any number. -# -# Partial versions (1.2, release-1.2) work as well. -# The follow substrings are stripped before version comparison: -# - "v" -# - "release-" -# - "kubernetes-" -# -# Usage: -# version_gt release-1.3 v1.2.0 (returns true) -# version_gt v1.1.1 v1.2.0 (returns false) -# version_gt 1.1.1 v1.2.0 (returns false) -# version_gt 1.3.1 v1.2.0 (returns true) -# version_gt 1.1.1 release-1.2.0 (returns false) -# version_gt 1.2.0 1.2.2 (returns false) -function version_gt() { - versions=$(for ver in "$@"; do ver=${ver#release-}; ver=${ver#kubernetes-}; echo "${ver#v}"; done) - greaterVersion=${1#"release-"}; - greaterVersion=${greaterVersion#"kubernetes-"}; - greaterVersion=${greaterVersion#"v"}; - test "$(printf '%s' "$versions" | sort -V | head -n 1)" != "$greaterVersion" -} - -main () { - local images ret - ret=0 - - images= - if ${CSI_PROW_BUILD_JOB}; then - # A successful build is required for testing. - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" "BUILD_PLATFORMS=${CSI_PROW_BUILD_PLATFORMS}" || die "'make all' failed" - # We don't want test failures to prevent E2E testing below, because the failure - # might have been minor or unavoidable, for example when experimenting with - # changes in "release-tools" in a PR (that fails the "is release-tools unmodified" - # test). - if tests_enabled "unit"; then - if [ -f Gopkg.toml ] && ! install_dep; then - warn "installing 'dep' failed, cannot test vendoring" - ret=1 - fi - if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" 2>&1 | make_test_to_junit; then - warn "'make test' failed, proceeding anyway" - ret=1 - fi - fi - # Required for E2E testing. - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make container' failed" - fi - - if tests_need_kind; then - install_kind || die "installing kind failed" - - if ${CSI_PROW_BUILD_JOB}; then - cmds="$(grep '^\s*CMDS\s*=' Makefile | sed -e 's/\s*CMDS\s*=//')" - # Get the image that was just built (if any) from the - # top-level Makefile CMDS variable and set the - # deploy.sh env variables for it. We also need to - # side-load those images into the cluster. - for i in $cmds; do - e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) - images="$images ${e}_REGISTRY=none ${e}_TAG=csiprow" - - # We must avoid the tag "latest" because that implies - # always pulling the image - # (https://github.com/kubernetes-sigs/kind/issues/328). - docker tag "$i:latest" "$i:csiprow" || die "tagging the locally built container image for $i failed" - - # For components with multiple cmds, the RBAC file should be in the following format: - # rbac-$cmd.yaml - # If this file cannot be found, we can default to the standard location: - # deploy/kubernetes/rbac.yaml - rbac_file_path=$(find . -type f -name "rbac-$i.yaml") - if [ "$rbac_file_path" == "" ]; then - rbac_file_path="$(pwd)/deploy/kubernetes/rbac.yaml" - fi - - if [ -e "$rbac_file_path" ]; then - # This is one of those components which has its own RBAC rules (like external-provisioner). - # We are testing a locally built image and also want to test with the the current, - # potentially modified RBAC rules. - e=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr - _) - images="$images ${e}_RBAC=$rbac_file_path" - fi - done - fi - - if tests_need_non_alpha_cluster; then - start_cluster || die "starting the non-alpha cluster failed" - - # Install necessary snapshot CRDs and snapshot controller - # For Kubernetes 1.17+, we will install the CRDs and snapshot controller. - if version_gt "${CSI_PROW_KUBERNETES_VERSION}" "1.16.255" || "${CSI_PROW_KUBERNETES_VERSION}" == "latest"; then - info "Version ${CSI_PROW_KUBERNETES_VERSION}, installing CRDs and snapshot controller" - install_snapshot_crds - install_snapshot_controller - else - info "Version ${CSI_PROW_KUBERNETES_VERSION}, skipping CRDs and snapshot controller" - fi - - # Installing the driver might be disabled. - if ${CSI_PROW_DRIVER_INSTALL} "$images"; then - collect_cluster_info - - if sanity_enabled; then - if ! run_sanity; then - ret=1 - fi - fi - - if tests_enabled "parallel"; then - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \ - -focus="External.Storage" \ - -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E parallel failed" - ret=1 - fi - - # Run tests that are feature tagged, but non-alpha - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - if ! run_e2e parallel-features ${CSI_PROW_GINKO_PARALLEL} \ - -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_FOCUS}"))" \ - -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}")"; then - warn "E2E parallel features failed" - ret=1 - fi - fi - - if tests_enabled "serial"; then - if ! run_e2e serial \ - -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_SERIAL}"))" \ - -skip="$(regex_join "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E serial failed" - ret=1 - fi - fi - fi - delete_cluster_inside_prow_job - fi - - if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then - # Need to (re)create the cluster. - start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed" - - # Install necessary snapshot CRDs and snapshot controller - # For Kubernetes 1.17+, we will install the CRDs and snapshot controller. - if version_gt "${CSI_PROW_KUBERNETES_VERSION}" "1.16.255" || "${CSI_PROW_KUBERNETES_VERSION}" == "latest"; then - info "Version ${CSI_PROW_KUBERNETES_VERSION}, installing CRDs and snapshot controller" - install_snapshot_crds - install_snapshot_controller - else - info "Version ${CSI_PROW_KUBERNETES_VERSION}, skipping CRDs and snapshot controller" - fi - - # Installing the driver might be disabled. - if ${CSI_PROW_DRIVER_INSTALL} "$images"; then - collect_cluster_info - - if tests_enabled "parallel-alpha"; then - # Ignore: Double quote to prevent globbing and word splitting. - # shellcheck disable=SC2086 - if ! run_e2e parallel-alpha ${CSI_PROW_GINKO_PARALLEL} \ - -focus="External.Storage.*($(regex_join "${CSI_PROW_E2E_ALPHA}"))" \ - -skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E parallel alpha failed" - ret=1 - fi - fi - - if tests_enabled "serial-alpha"; then - if ! run_e2e serial-alpha \ - -focus="External.Storage.*(($(regex_join "${CSI_PROW_E2E_SERIAL}")).*($(regex_join "${CSI_PROW_E2E_ALPHA}"))|($(regex_join "${CSI_PROW_E2E_ALPHA}")).*($(regex_join "${CSI_PROW_E2E_SERIAL}")))" \ - -skip="$(regex_join "${CSI_PROW_E2E_SKIP}")"; then - warn "E2E serial alpha failed" - ret=1 - fi - fi - fi - delete_cluster_inside_prow_job - fi - fi - - # Merge all junit files into one. This gets rid of duplicated "skipped" tests. - if ls "${ARTIFACTS}"/junit_*.xml 2>/dev/null >&2; then - run_filter_junit -o "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}"/junit_*.xml && rm "${ARTIFACTS}"/junit_*.xml && mv "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}" - fi - - return "$ret" -} - -# This function can be called by a repo's top-level cloudbuild.sh: -# it handles environment set up in the GCR cloud build and then -# invokes "make push-multiarch" to do the actual image building. -gcr_cloud_build () { - # Register gcloud as a Docker credential helper. - # Required for "docker buildx build --push". - gcloud auth configure-docker - - if find . -name Dockerfile | grep -v ^./vendor | xargs --no-run-if-empty cat | grep -q ^RUN; then - # Needed for "RUN" steps on non-linux/amd64 platforms. - # See https://github.com/multiarch/qemu-user-static#getting-started - (set -x; docker run --rm --privileged multiarch/qemu-user-static --reset -p yes) - fi - - # Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. - REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') - - run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make push-multiarch REV="${REV}" REGISTRY_NAME="${REGISTRY_NAME}" BUILD_PLATFORMS="${CSI_PROW_BUILD_PLATFORMS}" -} diff --git a/container-object-storage-interface-controller/release-tools/travis.yml b/container-object-storage-interface-controller/release-tools/travis.yml deleted file mode 100644 index 1ab13aef..00000000 --- a/container-object-storage-interface-controller/release-tools/travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -sudo: required -services: - - docker -git: - depth: false -matrix: - include: - - go: 1.15 -before_script: -- mkdir -p bin -- wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O bin/dep -- chmod u+x bin/dep -- export PATH=$PWD/bin:$PATH -script: -- make -k all test GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' ) -after_success: - - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" quay.io; - make push GOFLAGS_VENDOR=$( [ -d vendor ] && echo '-mod=vendor' ); - fi diff --git a/container-object-storage-interface-controller/release-tools/util.sh b/container-object-storage-interface-controller/release-tools/util.sh deleted file mode 100755 index abeb1b2e..00000000 --- a/container-object-storage-interface-controller/release-tools/util.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2014 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function kube::util::sourced_variable { - # Call this function to tell shellcheck that a variable is supposed to - # be used from other calling context. This helps quiet an "unused - # variable" warning from shellcheck and also document your code. - true -} - -kube::util::sortable_date() { - date "+%Y%m%d-%H%M%S" -} - -# arguments: target, item1, item2, item3, ... -# returns 0 if target is in the given items, 1 otherwise. -kube::util::array_contains() { - local search="$1" - local element - shift - for element; do - if [[ "${element}" == "${search}" ]]; then - return 0 - fi - done - return 1 -} - -# Example: kube::util::trap_add 'echo "in trap DEBUG"' DEBUG -# See: http://stackoverflow.com/questions/3338030/multiple-bash-traps-for-the-same-signal -kube::util::trap_add() { - local trap_add_cmd - trap_add_cmd=$1 - shift - - for trap_add_name in "$@"; do - local existing_cmd - local new_cmd - - # Grab the currently defined trap commands for this trap - existing_cmd=$(trap -p "${trap_add_name}" | awk -F"'" '{print $2}') - - if [[ -z "${existing_cmd}" ]]; then - new_cmd="${trap_add_cmd}" - else - new_cmd="${trap_add_cmd};${existing_cmd}" - fi - - # Assign the test. Disable the shellcheck warning telling that trap - # commands should be single quoted to avoid evaluating them at this - # point instead evaluating them at run time. The logic of adding new - # commands to a single trap requires them to be evaluated right away. - # shellcheck disable=SC2064 - trap "${new_cmd}" "${trap_add_name}" - done -} - -kube::util::download_file() { - local -r url=$1 - local -r destination_file=$2 - - rm "${destination_file}" 2&> /dev/null || true - - for i in $(seq 5) - do - if ! curl -fsSL --retry 3 --keepalive-time 2 "${url}" -o "${destination_file}"; then - echo "Downloading ${url} failed. $((5-i)) retries left." - sleep 1 - else - echo "Downloading ${url} succeed" - return 0 - fi - done - return 1 -} - -# Wait for background jobs to finish. Return with -# an error status if any of the jobs failed. -kube::util::wait-for-jobs() { - local fail=0 - local job - for job in $(jobs -p); do - wait "${job}" || fail=$((fail + 1)) - done - return ${fail} -} - -# kube::util::join -# Concatenates the list elements with the delimiter passed as first parameter -# -# Ex: kube::util::join , a b c -# -> a,b,c -function kube::util::join { - local IFS="$1" - shift - echo "$*" -} - -# kube::util::check-file-in-alphabetical-order -# Check that the file is in alphabetical order -# -function kube::util::check-file-in-alphabetical-order { - local failure_file="$1" - if ! diff -u "${failure_file}" <(LC_ALL=C sort "${failure_file}"); then - { - echo - echo "${failure_file} is not in alphabetical order. Please sort it:" - echo - echo " LC_ALL=C sort -o ${failure_file} ${failure_file}" - echo - } >&2 - false - fi -} - -# Some useful colors. -if [[ -z "${color_start-}" ]]; then - declare -r color_start="\033[" - declare -r color_red="${color_start}0;31m" - declare -r color_yellow="${color_start}0;33m" - declare -r color_green="${color_start}0;32m" - declare -r color_blue="${color_start}1;34m" - declare -r color_cyan="${color_start}1;36m" - declare -r color_norm="${color_start}0m" - - kube::util::sourced_variable "${color_start}" - kube::util::sourced_variable "${color_red}" - kube::util::sourced_variable "${color_yellow}" - kube::util::sourced_variable "${color_green}" - kube::util::sourced_variable "${color_blue}" - kube::util::sourced_variable "${color_cyan}" - kube::util::sourced_variable "${color_norm}" -fi - -# ex: ts=2 sw=2 et filetype=sh diff --git a/container-object-storage-interface-controller/release-tools/verify-go-version.sh b/container-object-storage-interface-controller/release-tools/verify-go-version.sh deleted file mode 100755 index f242e769..00000000 --- a/container-object-storage-interface-controller/release-tools/verify-go-version.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -GO="$1" - -if [ ! "$GO" ]; then - echo >&2 "usage: $0 " - exit 1 -fi - -die () { - echo "ERROR: $*" - exit 1 -} - -version=$("$GO" version) || die "determining version of $GO failed" -# shellcheck disable=SC2001 -majorminor=$(echo "$version" | sed -e 's/.*go\([0-9]*\)\.\([0-9]*\).*/\1.\2/') -# shellcheck disable=SC2001 -expected=$(grep "^ *- go:" "release-tools/travis.yml" | sed -e 's/.*go: *\([0-9]*\)\.\([0-9]*\).*/\1.\2/') - -if [ "$majorminor" != "$expected" ]; then - cat >&2 < /dev/null || true -} - -# ensure we're linting the source tree -cd "${ROOT}" - -# find all shell scripts excluding ./_*, ./.git/*, ./vendor*, -# and anything git-ignored -all_shell_scripts=() -while IFS=$'\n' read -r script; - do git check-ignore -q "$script" || all_shell_scripts+=("$script"); -done < <(find . -name "*.sh" \ - -not \( \ - -path ./_\* -o \ - -path ./.git\* -o \ - -path ./vendor\* \ - \)) - -# detect if the host machine has the required shellcheck version installed -# if so, we will use that instead. -HAVE_SHELLCHECK=false -if which shellcheck &>/dev/null; then - detected_version="$(shellcheck --version | grep 'version: .*')" - if [[ "${detected_version}" = "version: ${SHELLCHECK_VERSION}" ]]; then - HAVE_SHELLCHECK=true - fi -fi - -# tell the user which we've selected and possibly set up the container -if ${HAVE_SHELLCHECK}; then - echo "Using host shellcheck ${SHELLCHECK_VERSION} binary." -else - echo "Using shellcheck ${SHELLCHECK_VERSION} docker image." - # remove any previous container, ensure we will attempt to cleanup on exit, - # and create the container - remove_container - kube::util::trap_add 'remove_container' EXIT - if ! output="$(create_container 2>&1)"; then - { - echo "Failed to create shellcheck container with output: " - echo "" - echo "${output}" - } >&2 - exit 1 - fi -fi - -# lint each script, tracking failures -errors=() -for f in "${all_shell_scripts[@]}"; do - set +o errexit - if ${HAVE_SHELLCHECK}; then - failedLint=$(shellcheck --exclude="${SHELLCHECK_DISABLED}" "${f}") - else - failedLint=$(docker exec -t ${SHELLCHECK_CONTAINER} \ - shellcheck --exclude="${SHELLCHECK_DISABLED}" "${f}") - fi - set -o errexit - if [[ -n "${failedLint}" ]]; then - errors+=( "${failedLint}" ) - fi -done - -# Check to be sure all the packages that should pass lint are. -if [ ${#errors[@]} -eq 0 ]; then - echo 'Congratulations! All shell files are passing lint.' -else - { - echo "Errors from shellcheck:" - for err in "${errors[@]}"; do - echo "$err" - done - echo - echo 'Please review the above warnings. You can test via "./hack/verify-shellcheck"' - echo 'If the above warnings do not make sense, you can exempt them from shellcheck' - echo 'checking by adding the "shellcheck disable" directive' - echo '(https://github.com/koalaman/shellcheck/wiki/Directive#disable).' - echo - } >&2 - false -fi diff --git a/container-object-storage-interface-controller/release-tools/verify-subtree.sh b/container-object-storage-interface-controller/release-tools/verify-subtree.sh deleted file mode 100755 index f04a9fa2..00000000 --- a/container-object-storage-interface-controller/release-tools/verify-subtree.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -e -# -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script verifies that the content of a directory managed -# by "git subtree" has not been modified locally. It does that -# by looking for commits that modify the files with the -# subtree prefix (aka directory) while ignoring merge -# commits. Merge commits are where "git subtree" pulls the -# upstream files into the directory. -# -# Theoretically a developer can subvert this check by modifying files -# in a merge commit, but in practice that shouldn't happen. - -DIR="$1" -if [ ! "$DIR" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -REV=$(git log -n1 --remove-empty --format=format:%H --no-merges -- "$DIR") -if [ "$REV" ]; then - echo "Directory '$DIR' contains non-upstream changes:" - echo - git log --no-merges -- "$DIR" - exit 1 -else - echo "$DIR is a clean copy of upstream." -fi diff --git a/container-object-storage-interface-controller/release-tools/verify-vendor.sh b/container-object-storage-interface-controller/release-tools/verify-vendor.sh deleted file mode 100755 index b413e4b4..00000000 --- a/container-object-storage-interface-controller/release-tools/verify-vendor.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -if [ -f Gopkg.toml ]; then - echo "Repo uses 'dep' for vendoring." - case "$(dep version 2>/dev/null | grep 'version *:')" in - *v0.[56789]*) - if dep check; then - echo "vendor up-to-date" - else - exit 1 - fi - ;; - *) echo "skipping check, dep >= 0.5 required";; - esac -elif [ -f go.mod ]; then - echo "Repo uses 'go mod'." - # shellcheck disable=SC2235 - if [ "${JOB_NAME}" ] && - ( [ "${JOB_TYPE}" != "presubmit" ] || - [ "$( (git diff "${PULL_BASE_SHA}..HEAD" -- go.mod go.sum vendor release-tools; - git diff "${PULL_BASE_SHA}..HEAD" | grep -e '^@@.*@@ import (' -e '^[+-]import') | - wc -l)" -eq 0 ] ); then - echo "Skipping vendor check because the Prow pre-submit job does not affect dependencies." - elif ! (set -x; env GO111MODULE=on go mod tidy); then - echo "ERROR: vendor check failed." - exit 1 - elif [ "$(git status --porcelain -- go.mod go.sum | wc -l)" -gt 0 ]; then - echo "ERROR: go module files *not* up-to-date, they did get modified by 'GO111MODULE=on go mod tidy':"; - git diff -- go.mod go.sum - exit 1 - elif [ -d vendor ]; then - if ! (set -x; env GO111MODULE=on go mod vendor); then - echo "ERROR: vendor check failed." - exit 1 - elif [ "$(git status --porcelain -- vendor | wc -l)" -gt 0 ]; then - echo "ERROR: vendor directory *not* up-to-date, it did get modified by 'GO111MODULE=on go mod vendor':" - git status -- vendor - git diff -- vendor - exit 1 - else - echo "Go dependencies and vendor directory up-to-date." - fi - else - echo "Go dependencies up-to-date." - fi -fi From 4a271c7aa972725b4f2362a649c08e8d7f76dc54 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Sun, 25 Oct 2020 20:47:27 -0700 Subject: [PATCH 121/299] Basic makefile template to get release tools --- .../.gitignore | 5 +++++ container-object-storage-interface-controller/Makefile | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 container-object-storage-interface-controller/.gitignore diff --git a/container-object-storage-interface-controller/.gitignore b/container-object-storage-interface-controller/.gitignore new file mode 100644 index 00000000..dda7f45d --- /dev/null +++ b/container-object-storage-interface-controller/.gitignore @@ -0,0 +1,5 @@ +*.tmp +.DS_Store +.build +*.swp +release-tools diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 00291b44..6df02e59 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -13,6 +13,14 @@ # limitations under the License. #CMDS=cosi-controller-manager -all: build +all: reltools build +.PHONY: reltools +reltools: release-tools/build.make +release-tools/build.make: + $(eval CURDIR := $(shell pwd)) + $(eval TMP := $(shell mktemp -d)) + $(shell cd ${TMP} && git clone git@github.com:kubernetes-sigs/container-object-storage-interface-spec.git) + $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) + $(shell rm -rf ${TMP}) include release-tools/build.make From 27c5ed88b2aead235cebc34043d8e71aef77911c Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Mon, 7 Dec 2020 18:35:36 -0500 Subject: [PATCH 122/299] Added grpc client and server modules --- .../go.mod | 8 + .../go.sum | 84 +++++++++++ .../pkg/grpcclient/client.go | 139 ++++++++++++++++++ .../pkg/grpcserver/server.go | 136 +++++++++++++++++ 4 files changed, 367 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/go.mod create mode 100644 container-object-storage-interface-provisioner-sidecar/go.sum create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod new file mode 100644 index 00000000..d664a054 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -0,0 +1,8 @@ +module github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar + +go 1.14 + +require ( + google.golang.org/grpc v1.34.0 // indirect + k8s.io/klog v1.0.0 // indirect +) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum new file mode 100644 index 00000000..1f1ec4f7 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -0,0 +1,84 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go new file mode 100644 index 00000000..a8441ad2 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go @@ -0,0 +1,139 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package grpcclient + +import ( + "context" + "errors" + "net" + "strings" + "time" + + "google.golang.org/grpc" + + "k8s.io/klog" +) + +type options struct { + reconnect func() bool +} + +// Option is the type of all optional parameters for Connect. +type Option func(o *options) + +type GRPCClient struct { + serverAddress string + dialOptions []grpc.DialOption +} + +// NewGRPCClient creates a new GRPCClient +func NewGRPCClient(address string, dialOptions []grpc.DialOption, connectOptions []Option) (*GRPCClient, error) { + var o options + for _, option := range connectOptions { + option(&o) + } + + dialOptions = append(dialOptions, + grpc.WithInsecure(), // Don't use TLS, it's usually local Unix domain socket in a container. + grpc.WithBackoffMaxDelay(time.Second), // Retry every second after failure. + grpc.WithBlock(), // Block until connection succeeds. + ) + + unixPrefix := "unix://" + if strings.HasPrefix(address, "tcp://") { + address = address[6:] + } + if strings.HasPrefix(address, "/") { + // It looks like filesystem path. + address = unixPrefix + address + } + + if strings.HasPrefix(address, unixPrefix) { + // state variables for the custom dialer + haveConnected := false + lostConnection := false + reconnect := true + + dialOptions = append(dialOptions, grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { + if haveConnected && !lostConnection { + // We have detected a loss of connection for the first time. Decide what to do... + // Record this once. TODO (?): log at regular time intervals. + klog.Errorf("Lost connection to %s.", address) + // Inform caller and let it decide? Default is to reconnect. + if o.reconnect != nil { + reconnect = o.reconnect() + } + lostConnection = true + } + if !reconnect { + return nil, errors.New("connection lost, reconnecting disabled") + } + conn, err := net.DialTimeout("unix", address[len(unixPrefix):], timeout) + if err == nil { + // Connection restablished. + haveConnected = true + lostConnection = false + } + return conn, err + })) + } else if o.reconnect != nil { + return nil, errors.New("OnConnectionLoss callback only supported for unix:// addresses") + } + + return &GRPCClient{serverAddress: address, dialOptions: dialOptions}, nil +} + +// Connect connects to the grpc server +func (c *GRPCClient) ConnectWithLogging(interval time.Duration) (*grpc.ClientConn, error) { + klog.Infof("Connecting to %s", c.serverAddress) + + grpcLogFunc := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + klog.V(5).Infof("GRPC call: %s", method) + klog.V(5).Infof("GRPC request: %s", req) + err := invoker(ctx, method, req, reply, cc, opts...) + klog.V(5).Infof("GRPC response: %s", reply) + klog.V(5).Infof("GRPC error: %v", err) + return err + } + + // Log all messages + c.dialOptions = append(c.dialOptions, grpc.WithChainUnaryInterceptor(grpcLogFunc)) + + // Connect in background. + var conn *grpc.ClientConn + var err error + ready := make(chan bool) + go func() { + conn, err = grpc.Dial(c.serverAddress, c.dialOptions...) + close(ready) + }() + + // Log error every connectionLoggingInterval + ticker := time.NewTicker(interval) + defer ticker.Stop() + + // Wait until Dial() succeeds. + for { + select { + case <-ticker.C: + klog.Warningf("Still connecting to %s", c.serverAddress) + + case <-ready: + return conn, err + } + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go new file mode 100644 index 00000000..896b1de2 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go @@ -0,0 +1,136 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package grpcserver + +import ( + "fmt" + "net" + "os" + "strings" + "sync" + + "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" + "golang.org/x/net/context" + "google.golang.org/grpc" + + osi "github.com/kubernetes-sigs/container-object-storage-interface-spec" + + "k8s.io/klog" +) + +// Defines Non blocking GRPC server interfaces +type NonBlockingGRPCServer interface { + // Start services at the endpoint + Start(endpoint string, cds osi.ProvisionerServer) + // Waits for the service to stop + Wait() + // Stops the service gracefully + Stop() + // Stops the service forcefully + ForceStop() +} + +func NewNonBlockingGRPCServer() NonBlockingGRPCServer { + return &nonBlockingGRPCServer{} +} + +// NonBlocking server +type nonBlockingGRPCServer struct { + wg sync.WaitGroup + server *grpc.Server +} + +func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + klog.Infof("GRPC call: %s", info.FullMethod) + klog.Infof("GRPC request: %s", protosanitizer.StripSecrets(req)) + resp, err := handler(ctx, req) + if err != nil { + klog.Errorf("GRPC error: %v", err) + } else { + klog.Infof("GRPC response: %s", protosanitizer.StripSecrets(resp)) + } + return resp, err +} + +func ParseEndpoint(ep string) (string, string, error) { + if strings.HasPrefix(strings.ToLower(ep), "unix://") || strings.HasPrefix(strings.ToLower(ep), "tcp://") { + s := strings.SplitN(ep, "://", 2) + if s[1] != "" { + return s[0], s[1], nil + } + } + return "", "", fmt.Errorf("Invalid endpoint: %v", ep) +} + +func (s *nonBlockingGRPCServer) Start(endpoint string, cds osi.ProvisionerServer) { + + s.wg.Add(1) + + go s.serve(endpoint, cds) + + return +} + +func (s *nonBlockingGRPCServer) Wait() { + s.wg.Wait() +} + +func (s *nonBlockingGRPCServer) Stop() { + s.server.GracefulStop() +} + +func (s *nonBlockingGRPCServer) ForceStop() { + s.server.Stop() +} + +func (s *nonBlockingGRPCServer) serve(endpoint string, driver osi.ProvisionerServer) { + + proto, addr, err := ParseEndpoint(endpoint) + if err != nil { + klog.Fatal(err.Error()) + } + + if proto == "unix" { + addr = "/" + addr + if err := os.Remove(addr); err != nil && !os.IsNotExist(err) { + klog.Fatalf("Failed to remove %s, error: %s", addr, err.Error()) + } + } + klog.Infof("Create listener on %s", endpoint) + + //listener, err := net.Listen("tcp", fmt.Sprintf(":%d", osi-port)) + listener, err := net.Listen(proto, addr) + if err != nil { + klog.Fatalf("Failed to listen: %v", err) + } + + opts := []grpc.ServerOption{ + grpc.UnaryInterceptor(logGRPC), + } + server := grpc.NewServer(opts...) + s.server = server + + klog.Infof("Registering CosiControllerServer") + if driver != nil { + osi.RegisterProvisionerServer(server, driver) + } + + klog.Infof("Listening for connections on address: %#v", listener.Addr()) + + server.Serve(listener) + +} From 31d8e987847965d7ba52de7524b2490b0aca6ad9 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Wed, 25 Nov 2020 10:47:01 -0800 Subject: [PATCH 123/299] Adding bucketrequest controller --- .../.gitignore | 2 + .../.prow.sh | 6 + .../Makefile | 6 +- .../controller-manager/controller-manager.go | 85 ++ .../go.mod | 15 + .../go.sum | 750 ++++++++++++++++++ .../pkg/bucketrequest/bucketrequest.go | 164 ++++ .../pkg/bucketrequest/bucketrequest_test.go | 215 +++++ .../pkg/util/util.go | 374 +++++++++ 9 files changed, 1615 insertions(+), 2 deletions(-) create mode 100755 container-object-storage-interface-controller/.prow.sh create mode 100644 container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go create mode 100644 container-object-storage-interface-controller/go.mod create mode 100644 container-object-storage-interface-controller/go.sum create mode 100644 container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go create mode 100644 container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go create mode 100644 container-object-storage-interface-controller/pkg/util/util.go diff --git a/container-object-storage-interface-controller/.gitignore b/container-object-storage-interface-controller/.gitignore index dda7f45d..c5f97758 100644 --- a/container-object-storage-interface-controller/.gitignore +++ b/container-object-storage-interface-controller/.gitignore @@ -2,4 +2,6 @@ .DS_Store .build *.swp +travis.yml release-tools +bin diff --git a/container-object-storage-interface-controller/.prow.sh b/container-object-storage-interface-controller/.prow.sh new file mode 100755 index 00000000..682601dd --- /dev/null +++ b/container-object-storage-interface-controller/.prow.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +. release-tools/prow.sh + +main + diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 6df02e59..6c19baab 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -12,15 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -#CMDS=cosi-controller-manager all: reltools build .PHONY: reltools reltools: release-tools/build.make release-tools/build.make: $(eval CURDIR := $(shell pwd)) $(eval TMP := $(shell mktemp -d)) - $(shell cd ${TMP} && git clone git@github.com:kubernetes-sigs/container-object-storage-interface-spec.git) + $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) $(shell rm -rf ${TMP}) + ln -s release-tools/travis.yml travis.yml + +CMDS=controller-manager include release-tools/build.make diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go new file mode 100644 index 00000000..533d898d --- /dev/null +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -0,0 +1,85 @@ +package main + +import ( + "context" + "flag" + "os" + "os/signal" + "syscall" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + + bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketrequest" + + "github.com/golang/glog" +) + +var cmd = &cobra.Command{ + Use: "controller-manager", + Short: "central controller for managing bucket* and bucketAccess* API objects", + SilenceErrors: true, + SilenceUsage: true, + RunE: func(c *cobra.Command, args []string) error { + return run(c.Context(), args) + }, + DisableFlagsInUseLine: true, +} + +var kubeConfig string + +func init() { + viper.AutomaticEnv() + + cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine) + flag.Set("logtostderr", "true") + + strFlag := func(c *cobra.Command, ptr *string, name string, short string, dfault string, desc string) { + c.PersistentFlags(). + StringVarP(ptr, name, short, dfault, desc) + } + strFlag(cmd, &kubeConfig, "kube-config", "", kubeConfig, "path to kubeconfig file") + + hideFlag := func(name string) { + cmd.PersistentFlags().MarkHidden(name) + } + hideFlag("alsologtostderr") + hideFlag("log_backtrace_at") + hideFlag("log_dir") + hideFlag("logtostderr") + hideFlag("master") + hideFlag("stderrthreshold") + hideFlag("vmodule") + + // suppress the incorrect prefix in glog output + flag.CommandLine.Parse([]string{}) + viper.BindPFlags(cmd.PersistentFlags()) + +} + +func main() { + if err := cmd.Execute(); err != nil { + glog.Fatal(err.Error()) + } + + var cancel context.CancelFunc + + _, cancel = context.WithCancel(cmd.Context()) + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + + go func() { + <-sigs + cancel() + }() +} + +func run(ctx context.Context, args []string) error { + ctrl, err := bucketcontroller.NewDefaultObjectStorageController("controller-manager", "leader-lock", 40) + if err != nil { + return err + } + ctrl.AddBucketRequestListener(bucketrequest.NewListener()) + return ctrl.Run(ctx) +} diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod new file mode 100644 index 00000000..19ac6584 --- /dev/null +++ b/container-object-storage-interface-controller/go.mod @@ -0,0 +1,15 @@ +module github.com/kubernetes-sigs/container-object-storage-interface-controller + +go 1.15 + +require ( + github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 + github.com/spf13/cobra v1.1.1 + github.com/spf13/viper v1.7.1 + golang.org/x/time v0.0.0-20191024005414-555d28b269f0 + k8s.io/apiextensions-apiserver v0.19.4 + k8s.io/apimachinery v0.19.4 + k8s.io/client-go v0.19.4 + sigs.k8s.io/controller-tools v0.4.1 +) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum new file mode 100644 index 00000000..e2f76648 --- /dev/null +++ b/container-object-storage-interface-controller/go.sum @@ -0,0 +1,750 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/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/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.12 h1:OO9WrvhDwtiMY/Opr1j1iFZzirI3JW4/bxNFRcntAr4= +github.com/go-openapi/spec v0.19.12/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.11 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= +github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/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= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/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/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 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 h1:kBd9bCHv429J7Y8Mp2w1Xg3QtDiRAhittzYC/45/G2E= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-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/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +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/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +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 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +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/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/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +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= +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.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +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.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +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= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= +golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +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 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= +k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= +k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= +k8s.io/apiextensions-apiserver v0.19.4 h1:D9ak9T012tb3vcGFWYmbQuj9SCC8YM4zhA4XZqsAQC4= +k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw= +k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= +k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= +k8s.io/apiserver v0.19.4/go.mod h1:X8WRHCR1UGZDd7HpV0QDc1h/6VbbpAeAGyxSh8yzZXw= +k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= +k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= +k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= +sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= +sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= +sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +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= diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go new file mode 100644 index 00000000..861f233a --- /dev/null +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -0,0 +1,164 @@ +package bucketrequest + +import ( + "context" + "fmt" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" + bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" + kubeclientset "k8s.io/client-go/kubernetes" + + "github.com/golang/glog" +) + +type bucketRequestListener struct { + kubeClient kubeclientset.Interface + bucketClient bucketclientset.Interface +} + +func NewListener() bucketcontroller.BucketRequestListener { + return &bucketRequestListener{} +} + +func (b *bucketRequestListener) InitializeKubeClient(k kubeclientset.Interface) { + b.kubeClient = k +} + +func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { + b.bucketClient = bc +} + +// Add creates a bucket in response to a bucketrequest +func (b *bucketRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketRequest) error { + glog.V(1).Infof("add called for bucket %s", obj.Name) + bucketRequest := obj + err := b.provisionBucketRequestOperation(ctx, bucketRequest) + if err != nil { + // Provisioning is 100% finished / not in progress. + switch err { + case util.ErrInvalidBucketClass: + glog.V(5).Infof("Bucket Class specified does not exist. Stop provisioning, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + err = nil + case util.ErrBucketAlreadyExists: + glog.V(5).Infof("Bucket already exist for this bucket request. Stop provisioning, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + err = nil + default: + glog.V(2).Infof("Final error received, removing buckerRequest %s from bucketRequests in progress", bucketRequest.UID) + } + return err + } + + glog.V(5).Infof("BucketRequest processing succeeded, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + return nil +} + +// update processes any updates made to the bucket request +func (b *bucketRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketRequest) error { + glog.V(1).Infof("update called for bucket %v", old) + return nil +} + +// Delete processes a bucket for which bucket request is deleted +func (b *bucketRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketRequest) error { + return nil +} + +// provisionBucketRequestOperation attempts to provision a bucket for the given bucketRequest. +// Returns nil error only when the bucket was provisioned, an error it set appropriately if not. +// Returns a normal error when the bucket was not provisioned and provisioning should be retried (requeue the bucketRequest), +// or the special error errBucketAlreadyExists, errInvalidBucketClass, when provisioning was impossible and +// no further attempts to provision should be tried. +func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { + // Most code here is identical to that found in controller.go of kube's controller... + bucketClassName := b.GetBucketClass(bucketRequest) + + // A previous doProvisionBucketRequest may just have finished while we were waiting for + // the locks. Check that bucket (with deterministic name) hasn't been provisioned + // yet. + bucket := b.FindBucket(ctx, bucketRequest) + if bucket != nil { + // bucket has been already provisioned, nothing to do. + glog.Info("Bucket already exists", bucket.Name) + return util.ErrBucketAlreadyExists + } + + bucketClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) + if bucketClass == nil { + // bucketclass does not exist in order to create a bucket + return util.ErrInvalidBucketClass + } + + glog.Infof("creating bucket for bucketrequest %v", bucketRequest.Name) + + // create bucket + bucket = &v1alpha1.Bucket{} + bucket.Name = fmt.Sprintf("%s%s", bucketRequest.Spec.BucketPrefix, util.GetUUID()) + bucket.Spec.Provisioner = bucketClass.Provisioner + bucket.Spec.RetentionPolicy = bucketClass.RetentionPolicy + bucket.Spec.AnonymousAccessMode = bucketClass.AnonymousAccessMode + bucket.Spec.BucketClassName = bucketClass.Name + bucket.Spec.BucketRequest = &v1alpha1.BucketRequestReference{ + Name: bucketRequest.Name, + Namespace: bucketRequest.Namespace, + UID: bucketRequest.ObjectMeta.UID} + bucket.Spec.AllowedNamespaces = util.CopyStrings(bucketClass.AllowedNamespaces) + bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) + + // TODO have a switch statement to populate appropriate protocol based on BR.Protocol + bucket.Spec.Protocol.RequestedProtocol = bucketRequest.Spec.Protocol + + bucket, err = b.bucketClient.ObjectstorageV1alpha1().Buckets().Create(context.Background(), bucket, metav1.CreateOptions{}) + if err != nil { + glog.V(5).Infof("Error occurred when creating bucket %v", err) + return err + } + + glog.Infof("Finished creating bucket %v", bucket.Name) + return nil +} + +// GetBucketClass returns BucketClassName. If no bucket class was in the request it returns empty +// TODO this methods can be more sophisticate to address bucketClass overrides using annotations just like SC. +func (b *bucketRequestListener) GetBucketClass(bucketRequest *v1alpha1.BucketRequest) string { + + if bucketRequest.Spec.BucketClassName != "" { + return bucketRequest.Spec.BucketClassName + } + + return "" +} + +func (b *bucketRequestListener) FindBucket(ctx context.Context, br *v1alpha1.BucketRequest) *v1alpha1.Bucket { + bucketList, err := b.bucketClient.ObjectstorageV1alpha1().Buckets().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil + } + if len(bucketList.Items) > 0 { + for _, bucket := range bucketList.Items { + if strings.HasPrefix(bucket.Name, br.Spec.BucketPrefix) && + bucket.Spec.BucketClassName == br.Spec.BucketClassName && + bucket.Spec.BucketRequest.Name == br.Name && + bucket.Spec.BucketRequest.Namespace == br.Namespace && + bucket.Spec.BucketRequest.UID == br.ObjectMeta.UID { + return &bucket + } + } + } + return nil +} + +// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. +func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { + glog.V(1).Infof("clone called for bucket %s", bucketRequest.Spec.BucketInstanceName) + return util.ErrNotImplemented +} + +// logOperation format and prints logs +func logOperation(operation, format string, a ...interface{}) string { + return fmt.Sprintf(fmt.Sprintf("%s: %s", operation, format), a...) +} diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go new file mode 100644 index 00000000..cef7e37c --- /dev/null +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -0,0 +1,215 @@ +package bucketrequest + +import ( + "context" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + "k8s.io/client-go/kubernetes/fake" + + types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" +) + +var classGoldParameters = map[string]string{ + "param1": "value1", + "param2": "value2", +} + +var goldClass = types.BucketClass{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketClass", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "classgold", + }, + AllowedNamespaces: []string{"default", "cosins"}, + Parameters: classGoldParameters, + Protocol: "s3", + IsDefaultBucketClass: false, +} + +var bucketRequest1 = types.BucketRequest{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketRequest", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bucketrequest1", + Namespace: "default", + }, + Spec: types.BucketRequestSpec{ + BucketPrefix: "cosi", + Protocol: types.RequestedProtocol{ + Name: "s3", + Version: "", + }, + BucketClassName: "classgold", + }, +} + +var bucketRequest2 = types.BucketRequest{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketRequest", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bucketrequest2", + Namespace: "default", + }, + Spec: types.BucketRequestSpec{ + BucketPrefix: "cosi", + Protocol: types.RequestedProtocol{ + Name: "s3", + Version: "", + }, + BucketClassName: "classgold", + }, +} + +// Test basic add functionality +func TestAdd(t *testing.T) { + runCreateBucket(t, "add") +} + +// Test add with multipleBRs +func TestAddWithMultipleBR(t *testing.T) { + runCreateBucketWithMultipleBR(t, "addWithMultipleBR") +} + +// Test add idempotency +func TestAddIdempotency(t *testing.T) { + runCreateBucketIdempotency(t, "addWithMultipleBR") +} + +func runCreateBucket(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) + if err != nil { + t.Fatalf("Error occurred when creating bucketclass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating bucketrequest: %v", err) + } + + listener.Add(ctx, bucketrequest) + + bucketList := util.GetBuckets(ctx, client, 1) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) + + if len(bucketList.Items) != 1 { + t.Fatalf("Expecting a single bucket created but found %v", len(bucketList.Items)) + } + bucket := bucketList.Items[0] + + if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { + return + } else { + t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + } +} + +func runCreateBucketWithMultipleBR(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) + if err != nil { + t.Fatalf("Error occurred when creating bucketclass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating bucketrequest: %v", err) + } + + bucketrequest2, err := util.CreateBucketRequest(ctx, client, &bucketRequest2) + if err != nil { + t.Fatalf("Error occurred when creating bucketrequest: %v", err) + } + + listener.Add(ctx, bucketrequest) + listener.Add(ctx, bucketrequest2) + + bucketList := util.GetBuckets(ctx, client, 2) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketrequest2, *bucketclass, bucketList.Items) + if len(bucketList.Items) != 2 { + t.Fatalf("Expecting two buckets created but found %v", len(bucketList.Items)) + } + bucket := bucketList.Items[0] + bucket2 := bucketList.Items[1] + + if (util.ValidateBucket(bucket, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket2, *bucketrequest2, *bucketclass)) || + (util.ValidateBucket(bucket2, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket, *bucketrequest2, *bucketclass)) { + return + } else { + t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + } +} + +func runCreateBucketIdempotency(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) + if err != nil { + t.Fatalf("Error occurred when creating bucketclass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating bucketrequest: %v", err) + } + + listener.Add(ctx, bucketrequest) + + bucketList := util.GetBuckets(ctx, client, 1) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) + + if len(bucketList.Items) != 1 { + t.Errorf("Expecting a single bucket created but found %v", len(bucketList.Items)) + } + bucket := bucketList.Items[0] + + if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { + return + } else { + t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + // call the add directly the second time + } + + listener.Add(ctx, bucketrequest) + + bucketList = util.GetBuckets(ctx, client, 1) + if len(bucketList.Items) != 1 { + t.Fatalf("Expecting a single bucket created but found %v", len(bucketList.Items)) + } +} diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go new file mode 100644 index 00000000..ba7e2c30 --- /dev/null +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -0,0 +1,374 @@ +package util + +import ( + "context" + "errors" + "fmt" + "golang.org/x/time/rate" + "os" + "reflect" + "strings" + "time" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextensions "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/uuid" + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/workqueue" + + types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" + "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + + "sigs.k8s.io/controller-tools/pkg/crd" + crdmarkers "sigs.k8s.io/controller-tools/pkg/crd/markers" + "sigs.k8s.io/controller-tools/pkg/genall" + "sigs.k8s.io/controller-tools/pkg/loader" + "sigs.k8s.io/controller-tools/pkg/markers" + + "github.com/golang/glog" +) + +var ( + // Error codes that the central controller will return + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") + ErrInvalidBucketClass = errors.New("Cannot find Bucket Class with the name specified in the bucket request") + ErrBCUnavailable = errors.New("BucketClass is not available") + ErrNotImplemented = errors.New("Operation Not Implemented") +) + +func CopySS(m map[string]string) map[string]string { + if m == nil { + return nil + } + copy := make(map[string]string, len(m)) + for k, v := range m { + copy[k] = v + } + return copy +} + +func CopyStrings(s []string) []string { + if s == nil { + return nil + } + c := make([]string, len(s)) + copy(c, s) + return c +} + +func GetUUID() string { + return string(uuid.NewUUID()) +} + +// SetupTest is utility function to create clients and controller +// This is used by bucket request and bucket access request unit tests +func SetupTest(ctx context.Context) (bucketclientset.Interface, kubeclientset.Interface, *controller.ObjectStorageController) { + + // Initialize the clients + config, err := func() (*rest.Config, error) { + kubeConfig := os.Getenv("KUBECONFIG") + if kubeConfig != "" { + return clientcmd.BuildConfigFromFlags("", kubeConfig) + } + return rest.InClusterConfig() + }() + if err != nil { + glog.Fatalf("Failed to create clients: %v", err) + } + + kubeClient, err := kubeclientset.NewForConfig(config) + if err != nil { + glog.Fatalf("Failed to create Kubernetes client: %v", err) + } + client, err := bucketclientset.NewForConfig(config) + if err != nil { + glog.Fatalf("Failed to create ObjectStorage client: %v", err) + } + + crdClientset, err := apiextensions.NewForConfig(config) + if err != nil { + glog.Fatalf("Failed to create CRD client: %v", err) + } + + err = RegisterCRDs(ctx, crdClientset.CustomResourceDefinitions()) + if err != nil { + glog.Fatalf("Failed to register CRDs: %v", err) + } + + rateLimit := workqueue.NewMaxOfRateLimiter( + workqueue.NewItemExponentialFailureRateLimiter(100*time.Millisecond, 600*time.Second), + &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ) + ctrl, err := controller.NewObjectStorageControllerWithClientset("controller-manager", "leader-lock", 40, rateLimit, kubeClient, client) + if err != nil { + glog.Fatalf("Failed to create ObjectStorage Controller: %v", err) + } + + go ctrl.Run(ctx) + return client, kubeClient, ctrl +} + +// GetBuckets will wait and fetch expected number of buckets created by the test +// This is used by bucket request unit tests +func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpected int) *types.BucketList { + bucketList, err := client.ObjectstorageV1alpha1().Buckets().List(ctx, metav1.ListOptions{}) + if len(bucketList.Items) > 0 { + return bucketList + } + numtimes := 0 + for numtimes < 10 { + bucketList, err = client.ObjectstorageV1alpha1().Buckets().List(ctx, metav1.ListOptions{}) + if len(bucketList.Items) >= numExpected { + return bucketList + } else { + glog.Errorf("Failed to fetch the bucket created %v", err) + } + numtimes++ + <-time.After(time.Duration(numtimes) * time.Second) + } + return &types.BucketList{} +} + +// Validates the content of the bucket against bucket request and backet class +// This is used by bucket request unit tests +func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, bucketclass types.BucketClass) bool { + if strings.HasPrefix(bucket.Name, bucketrequest.Spec.BucketPrefix) && + bucket.Spec.BucketClassName == bucketrequest.Spec.BucketClassName && + bucket.Spec.BucketRequest.Name == bucketrequest.Name && + bucket.Spec.BucketRequest.Namespace == bucketrequest.Namespace && + bucket.Spec.BucketRequest.UID == bucketrequest.ObjectMeta.UID && + bucket.Spec.BucketClassName == bucketclass.Name && + reflect.DeepEqual(bucket.Spec.Parameters, bucketclass.Parameters) && + bucket.Spec.Provisioner == bucketclass.Provisioner && + bucket.Spec.RetentionPolicy == bucketclass.RetentionPolicy && + bucket.Spec.AnonymousAccessMode == bucketclass.AnonymousAccessMode { + return true + } + return false +} + +// Validates the content of the bucket against bucket request and backet class +// This is used by bucket access request unit tests +func GetBucketAccesses(ctx context.Context, client bucketclientset.Interface, numExpected int) *types.BucketAccessList { + bucketaccessList, _ := client.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) + if len(bucketaccessList.Items) > 0 { + return bucketaccessList + } + numtimes := 0 + for numtimes < 10 { + bucketaccessList, _ = client.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) + if len(bucketaccessList.Items) >= numExpected { + return bucketaccessList + } + numtimes++ + <-time.After(time.Duration(numtimes) * time.Second) + } + return &types.BucketAccessList{} +} + +// Validates the content of the bucket access against bucket access request and backet access class +// This is used by bucket access request unit tests +func ValidateBucketAccess(bucketaccess types.BucketAccess, bucketaccessrequest types.BucketAccessRequest, bucketaccessclass types.BucketAccessClass) bool { + if bucketaccess.Spec.BucketInstanceName != "" && + bucketaccess.Spec.BucketAccessRequest == bucketaccessrequest.Name && + bucketaccess.Spec.ServiceAccount == bucketaccessrequest.Spec.ServiceAccountName && + bucketaccess.Spec.PolicyActionsConfigMapData != "" && + bucketaccess.Spec.Provisioner == bucketaccessclass.Provisioner { + return true + } + return false +} + +// Deletes any bucket api object or an array of bucket or bucket access objects. +// This is used by bucket request and bucket access request unit tests +func DeleteObjects(ctx context.Context, client bucketclientset.Interface, objs ...interface{}) { + for _, obj := range objs { + switch t := obj.(type) { + case types.Bucket: + client.ObjectstorageV1alpha1().Buckets().Delete(ctx, obj.(types.Bucket).Name, metav1.DeleteOptions{}) + case types.BucketRequest: + client.ObjectstorageV1alpha1().BucketRequests(obj.(types.BucketRequest).Namespace).Delete(ctx, obj.(types.BucketRequest).Name, metav1.DeleteOptions{}) + case types.BucketClass: + client.ObjectstorageV1alpha1().BucketClasses().Delete(ctx, obj.(types.BucketClass).Name, metav1.DeleteOptions{}) + case []types.Bucket: + for _, a := range obj.([]types.Bucket) { + DeleteObjects(ctx, client, a) + } + case types.BucketAccess: + client.ObjectstorageV1alpha1().BucketAccesses().Delete(ctx, obj.(types.BucketAccess).Name, metav1.DeleteOptions{}) + case types.BucketAccessRequest: + client.ObjectstorageV1alpha1().BucketAccessRequests(obj.(types.BucketAccessRequest).Namespace).Delete(ctx, obj.(types.BucketAccessRequest).Name, metav1.DeleteOptions{}) + case types.BucketAccessClass: + client.ObjectstorageV1alpha1().BucketAccessClasses().Delete(ctx, obj.(types.BucketAccessClass).Name, metav1.DeleteOptions{}) + case []types.BucketAccess: + for _, a := range obj.([]types.BucketAccess) { + DeleteObjects(ctx, client, a) + } + default: + glog.Errorf("Unknown Obj of type %v", t) + } + } +} + +// CreateBucketRequest creates a bucket request object or return an existing bucket request object +// This is used by bucket request unit tests +func CreateBucketRequest(ctx context.Context, client bucketclientset.Interface, br *types.BucketRequest) (*types.BucketRequest, error) { + br, err := client.ObjectstorageV1alpha1().BucketRequests(br.Namespace).Create(ctx, br, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + br, err = client.ObjectstorageV1alpha1().BucketRequests(br.Namespace).Get(ctx, br.Name, metav1.GetOptions{}) + } + return br, err +} + +// CreateBucketAccessRequest creates a bucket access request object or return an existing bucket access request object +// This is used by bucket access request unit tests +func CreateBucketAccessRequest(ctx context.Context, client bucketclientset.Interface, bar *types.BucketAccessRequest) (*types.BucketAccessRequest, error) { + bar, err := client.ObjectstorageV1alpha1().BucketAccessRequests(bar.Namespace).Create(ctx, bar, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + bar, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bar.Namespace).Get(ctx, bar.Name, metav1.GetOptions{}) + } + return bar, err +} + +// CreateBucketClass creates a bucket class object or return an existing bucket class object +// This is used by bucket request unit tests +func CreateBucketClass(ctx context.Context, client bucketclientset.Interface, bc *types.BucketClass) (*types.BucketClass, error) { + bc, err := client.ObjectstorageV1alpha1().BucketClasses().Create(ctx, bc, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + bc, err = client.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bc.Name, metav1.GetOptions{}) + } + return bc, err +} + +// CreateBucketAccessClass creates a bucket access class object or return an existing bucket access class object +// This is used by bucket request unit tests +func CreateBucketAccessClass(ctx context.Context, client bucketclientset.Interface, bac *types.BucketAccessClass) (*types.BucketAccessClass, error) { + bac, err := client.ObjectstorageV1alpha1().BucketAccessClasses().Create(ctx, bac, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + bac, err = client.ObjectstorageV1alpha1().BucketAccessClasses().Get(ctx, bac.Name, metav1.GetOptions{}) + } + return bac, err +} + +// CreateBucket creates a bucket object or return an existing bucket object +// This is used by bucket request unit tests +func CreateBucket(ctx context.Context, client bucketclientset.Interface, b *types.Bucket) (*types.Bucket, error) { + b, err := client.ObjectstorageV1alpha1().Buckets().Create(ctx, b, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + b, err = client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) + } + return b, err +} + +// CreateBucketAccess creates a bucket access object or return an existing bucket access object +// This is used by bucket access request unit tests +func CreateBucketAccess(ctx context.Context, client bucketclientset.Interface, ba *types.BucketAccess) (*types.BucketAccess, error) { + ba, err := client.ObjectstorageV1alpha1().BucketAccesses().Create(ctx, ba, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + ba, err = client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) + } + return ba, err +} + +// getCRDClient returns CRD interface for managing CRD objects programmatically +// Used by unit tests and functional tests +func getCRDClient() (apiextensions.CustomResourceDefinitionInterface, error) { + config, err := func() (*rest.Config, error) { + kubeConfig := os.Getenv("KUBECONFIG") + + if kubeConfig != "" { + return clientcmd.BuildConfigFromFlags("", kubeConfig) + } + return rest.InClusterConfig() + }() + + crdClientset, err := apiextensions.NewForConfig(config) + if err != nil { + glog.Fatalf("could not initialize crd client: %v", err) + return nil, err + } + return crdClientset.CustomResourceDefinitions(), err +} + +// RegisterCRDs registers the CRD so that unit tests can use the CRD to perform bucket API testing +func RegisterCRDs(ctx context.Context, client apiextensions.CustomResourceDefinitionInterface) error { + var err error + if client == nil { + client, err = getCRDClient() + } + if err != nil { + return err + } + + roots, err := loader.LoadRoots("github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1") + if err != nil { + return err + } + + defn := markers.Must(markers.MakeDefinition("crd", markers.DescribesPackage, crd.Generator{})) + optionsRegistry := &markers.Registry{} + if err := optionsRegistry.Register(defn); err != nil { + return err + } + + if err := genall.RegisterOptionsMarkers(optionsRegistry); err != nil { + return err + } + + if err := crdmarkers.Register(optionsRegistry); err != nil { + return err + } + + parser := &crd.Parser{ + Collector: &markers.Collector{ + Registry: optionsRegistry, + }, + Checker: &loader.TypeChecker{}, + } + crd.AddKnownTypes(parser) + for _, root := range roots { + parser.NeedPackage(root) + } + + metav1Pkg := crd.FindMetav1(roots) + if metav1Pkg == nil { + // no objects in the roots, since nothing imported metav1 + return fmt.Errorf("no objects found in all roots") + } + + // TODO: allow selecting a specific object + kubeKinds := crd.FindKubeKinds(parser, metav1Pkg) + if len(kubeKinds) == 0 { + // no objects in the roots + return fmt.Errorf("no kube kind-objects found in all roots") + } + + //crdClient := utils.GetCRDClient() + crdClient := client + + for groupKind := range kubeKinds { + parser.NeedCRDFor(groupKind, func() *int { + i := 256 + return &i + }()) + crdRaw := parser.CustomResourceDefinitions[groupKind] + glog.Infof("creating CRD: %v", groupKind) + if crdRaw.ObjectMeta.Annotations == nil { + crdRaw.ObjectMeta.Annotations = map[string]string{} + } + if _, ok := crdRaw.ObjectMeta.Annotations[apiextensionsv1.KubeAPIApprovedAnnotation]; !ok { + crdRaw.ObjectMeta.Annotations[apiextensionsv1.KubeAPIApprovedAnnotation] = "https://github.com/kubernetes/kubernetes/pull/78458" + } + if _, err := crdClient.Create(ctx, &crdRaw, metav1.CreateOptions{}); err != nil { + if !apierrors.IsAlreadyExists(err) { + return err + } + } + } + return nil +} From 5658545e793475b55f66ca4b604cfd679fdbce27 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Tue, 8 Dec 2020 19:53:34 -0500 Subject: [PATCH 124/299] Add BucketAccess Controller --- .../go.mod | 10 +- .../go.sum | 553 +++++++++++++++++ .../bucketaccess/bucket_access_controller.go | 274 ++++++++ .../bucket_access_controller_test.go | 583 ++++++++++++++++++ 4 files changed, 1418 insertions(+), 2 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index d664a054..c4ad3ff4 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -3,6 +3,12 @@ module github.com/kubernetes-sigs/container-object-storage-interface-provisioner go 1.14 require ( - google.golang.org/grpc v1.34.0 // indirect - k8s.io/klog v1.0.0 // indirect + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 + github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687 + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 + google.golang.org/grpc v1.34.0 + k8s.io/api v0.19.4 + k8s.io/apimachinery v0.19.4 + k8s.io/client-go v0.19.4 + k8s.io/klog v1.0.0 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 1f1ec4f7..0cc55e3a 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -1,18 +1,179 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.12 h1:OO9WrvhDwtiMY/Opr1j1iFZzirI3JW4/bxNFRcntAr4= +github.com/go-openapi/spec v0.19.12/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.11 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -21,49 +182,364 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 h1:kBd9bCHv429J7Y8Mp2w1Xg3QtDiRAhittzYC/45/G2E= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687 h1:8M3yKR8iGDCVBIX811qYTwDonVU9vad/xHxVSk/vPzo= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +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/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +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= +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.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +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= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-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-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -74,11 +550,88 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= +k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= +k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= +k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= +k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= +k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= +k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= +sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +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= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go new file mode 100644 index 00000000..7122d1f7 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -0,0 +1,274 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bucketaccess + +import ( + "context" + "fmt" + "strings" + "time" + + v1 "k8s.io/api/core/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + utilversion "k8s.io/apimachinery/pkg/util/version" + + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" + "k8s.io/client-go/util/workqueue" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" + "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + + osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + + "k8s.io/klog" + + "golang.org/x/time/rate" +) + +func generateSecretName(uid types.UID) string { + return fmt.Sprintf("ba-%s", string(uid)) +} + +// bucketAccessListener manages BucketAccess objects +type bucketAccessListener struct { + kubeClient kubeclientset.Interface + bucketAccessClient bucketclientset.Interface + provisionerClient osspec.ProvisionerClient + + // The name of the provisioner for which this controller handles + // bucket access. + provisionerName string + kubeVersion *utilversion.Version +} + +// NewBucketAccessController returns a controller that manages BucketAccess objects +func NewBucketAccessController(provisionerName string, client osspec.ProvisionerClient) (*controller.ObjectStorageController, error) { + rateLimit := workqueue.NewMaxOfRateLimiter( + workqueue.NewItemExponentialFailureRateLimiter(5*time.Second, 60*time.Minute), + &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ) + + identity := fmt.Sprintf("object-storage-sidecar-%s", provisionerName) + bc, err := controller.NewObjectStorageController(identity, "bucket-access-controller", 5, rateLimit) + if err != nil { + return nil, err + } + + bal := bucketAccessListener{ + provisionerName: provisionerName, + provisionerClient: client, + } + bc.AddBucketAccessListener(&bal) + + return bc, nil +} + +// InitializeKubeClient initializes the kubernetes client +func (bal *bucketAccessListener) InitializeKubeClient(k kubeclientset.Interface) { + bal.kubeClient = k + + serverVersion, err := k.Discovery().ServerVersion() + if err != nil { + klog.Errorf("unable to get server version: %v", err) + } else { + bal.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + } +} + +// InitializeBucketClient initializes the object storage bucket client +func (bal *bucketAccessListener) InitializeBucketClient(bc bucketclientset.Interface) { + bal.bucketAccessClient = bc +} + +// Add will call the provisioner to grant permissions +func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAccess) error { + klog.V(1).Infof("bucketAccessListener: add called for bucket access %s", obj.Name) + + // Verify this bucket access is for this provisioner + if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { + return nil + } + + bucketInstanceName := obj.Spec.BucketInstanceName + bucket, err := bal.bucketAccessClient.ObjectstorageV1alpha1().Buckets().Get(ctx, bucketInstanceName, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("unable to get bucket instance %s: %+v", bucketInstanceName, err) + } + + req := osspec.ProvisionerGrantBucketAccessRequest{ + Principal: obj.Spec.Principal, + AccessPolicy: obj.Spec.PolicyActionsConfigMapData, + BucketContext: map[string]string{}, + } + + switch bucket.Spec.Protocol.Name { + case v1alpha1.ProtocolNameS3: + req.BucketName = bucket.Spec.Protocol.S3.BucketName + req.BucketContext["Region"] = bucket.Spec.Protocol.S3.Region + req.BucketContext["Version"] = bucket.Spec.Protocol.S3.Version + req.BucketContext["SignatureVersion"] = string(bucket.Spec.Protocol.S3.SignatureVersion) + req.BucketContext["Endpoint"] = bucket.Spec.Protocol.S3.Endpoint + case v1alpha1.ProtocolNameAzure: + req.BucketName = bucket.Spec.Protocol.AzureBlob.ContainerName + req.BucketContext["StorageAccount"] = bucket.Spec.Protocol.AzureBlob.StorageAccount + case v1alpha1.ProtocolNameGCS: + req.BucketName = bucket.Spec.Protocol.GCS.BucketName + req.BucketContext["ServiceAccount"] = bucket.Spec.Protocol.GCS.ServiceAccount + req.BucketContext["PrivateKeyName"] = bucket.Spec.Protocol.GCS.PrivateKeyName + req.BucketContext["ProjectID"] = bucket.Spec.Protocol.GCS.ProjectID + default: + return fmt.Errorf("unknown protocol: %s", bucket.Spec.Protocol.Name) + } + + // TODO set grpc timeout + rsp, err := bal.provisionerClient.ProvisionerGrantBucketAccess(ctx, &req) + if err != nil { + klog.Errorf("error calling ProvisionerGrantBucketAccess: %v", err) + return err + } + klog.V(1).Infof("provisioner returned grant bucket access response %v", rsp) + + // Only update the principal in the BucketAccess if it wasn't set because + // that means that the provisioner created one + if len(obj.Spec.Principal) == 0 { + err = bal.updatePrincipal(ctx, obj.Name, *rsp) + if err != nil { + return err + } + } + + // Only create the secret with credentials if serviveAccount isn't set. + // If serviceAccount is set then authorization happens out of band in the + // cloud provider + if len(obj.Spec.ServiceAccount) == 0 { + secret := v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: generateSecretName(obj.UID), + }, + StringData: map[string]string{ + "CredentialsFilePath": rsp.CredentialsFilePath, + "CredentialsFileContents": rsp.CredentialsFileContents, + }, + Type: v1.SecretTypeOpaque, + } + // It's unlikely but should probably handle retries on rare case of collision + _, err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Create(ctx, &secret, metav1.CreateOptions{}) + if err != nil { + return err + } + } + + // update bucket access status to granted + return bal.updateStatus(ctx, obj.Name, "Permissions Granted", true) +} + +// Update does nothing +func (bal *bucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { + klog.V(1).Infof("bucketAccessListener: update called for bucket %s", old.Name) + return nil +} + +// Delete will call the provisioner to revoke permissions +func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccess) error { + klog.V(1).Infof("bucketAccessListener: delete called for bucket access %s", obj.Name) + + // Verify this bucket access is for this provisioner + if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { + return nil + } + + bucketInstanceName := obj.Spec.BucketInstanceName + bucket, err := bal.bucketAccessClient.ObjectstorageV1alpha1().Buckets().Get(ctx, bucketInstanceName, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("unable to get bucket instance %s: %+v", bucketInstanceName, err) + } + + req := osspec.ProvisionerRevokeBucketAccessRequest{ + Principal: obj.Spec.Principal, + BucketContext: map[string]string{}, + } + + switch bucket.Spec.Protocol.Name { + case v1alpha1.ProtocolNameS3: + req.BucketName = bucket.Spec.Protocol.S3.BucketName + req.BucketContext["Region"] = bucket.Spec.Protocol.S3.Region + req.BucketContext["Version"] = bucket.Spec.Protocol.S3.Version + req.BucketContext["SignatureVersion"] = string(bucket.Spec.Protocol.S3.SignatureVersion) + req.BucketContext["Endpoint"] = bucket.Spec.Protocol.S3.Endpoint + case v1alpha1.ProtocolNameAzure: + req.BucketName = bucket.Spec.Protocol.AzureBlob.ContainerName + req.BucketContext["StorageAccount"] = bucket.Spec.Protocol.AzureBlob.StorageAccount + case v1alpha1.ProtocolNameGCS: + req.BucketName = bucket.Spec.Protocol.GCS.BucketName + req.BucketContext["ServiceAccount"] = bucket.Spec.Protocol.GCS.ServiceAccount + req.BucketContext["PrivateKeyName"] = bucket.Spec.Protocol.GCS.PrivateKeyName + req.BucketContext["ProjectID"] = bucket.Spec.Protocol.GCS.ProjectID + default: + return fmt.Errorf("unknown protocol: %s", bucket.Spec.Protocol.Name) + } + + // TODO set grpc timeout + rsp, err := bal.provisionerClient.ProvisionerRevokeBucketAccess(ctx, &req) + if err != nil { + klog.Errorf("error calling ProvisionerRevokeBucketAccess: %v", err) + return err + } + klog.V(1).Infof("provisioner returned revoke bucket access response %v", rsp) + + // Delete the secret + if len(obj.Spec.ServiceAccount) == 0 { + // It's unlikely but should probably handle retries on rare case of collision + err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Delete(ctx, generateSecretName(obj.UID), metav1.DeleteOptions{}) + if err != nil { + return err + } + } + + // Update bucket access status to revoked + return bal.updateStatus(ctx, obj.Name, "Permissions Revoked", false) +} + +func (bal *bucketAccessListener) updateStatus(ctx context.Context, name, msg string, state bool) error { + err := retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return err + } + bucketAccess.Status.Message = msg + bucketAccess.Status.AccessGranted = state + _, err = bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}) + return err + }) + return err +} + +func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp osspec.ProvisionerGrantBucketAccessResponse) error { + err := retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return err + } + bucketAccess.Spec.Principal = resp.Principal + _, err = bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Update(ctx, bucketAccess, metav1.UpdateOptions{}) + return err + }) + return err +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go new file mode 100644 index 00000000..517ca224 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -0,0 +1,583 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bucketaccess + +import ( + "context" + "reflect" + "strings" + "testing" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + fakebucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + + osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/version" + + fakediscovery "k8s.io/client-go/discovery/fake" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" + + "google.golang.org/grpc" +) + +func TestInitializeKubeClient(t *testing.T) { + client := fakekubeclientset.NewSimpleClientset() + fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) + if !ok { + t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") + } + + fakeVersion := &version.Info{ + GitVersion: "v1.0.0", + } + fakeDiscovery.FakedServerVersion = fakeVersion + + bal := bucketAccessListener{} + bal.InitializeKubeClient(client) + + if bal.kubeClient == nil { + t.Errorf("kubeClient was nil") + } + + expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) + if !reflect.DeepEqual(expected, bal.kubeVersion) { + t.Errorf("expected %+v, but got %+v", expected, bal.kubeVersion) + } +} + +func TestInitializeBucketClient(t *testing.T) { + client := fakebucketclientset.NewSimpleClientset() + + bal := bucketAccessListener{} + bal.InitializeBucketClient(client) + + if bal.bucketAccessClient == nil { + t.Errorf("bucketClient was nil") + } +} + +func TestAddWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.MockProvisionerClient }{} + mpc.GrantBucketAccess = func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bal := bucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bal.Add(ctx, &ba) + if err != nil { + t.Errorf("error returned: %+v", err) + } +} + +func TestAdd(t *testing.T) { + provisioner := "provisioner1" + region := "region1" + bucketName := "bucket1" + principal := "principal1" + protocolVersion := "proto1" + sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) + account := "account1" + keyName := "keyName1" + projID := "id1" + endpoint := "endpoint1" + instanceName := "instance" + credsContents := "credsContents" + credsFile := "credsFile" + generatedPrincipal := "driverPrincipal" + sa := "serviceAccount" + mpc := struct{ fakespec.MockProvisionerClient }{} + + testCases := []struct { + name string + setProtocol func(b *v1alpha1.Bucket) + protocolName v1alpha1.ProtocolName + grantFunc func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) + principal string + serviceAccount string + }{ + { + name: "S3", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["Version"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: principal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: principal, + serviceAccount: "", + }, + { + name: "GCS", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ + ServiceAccount: account, + PrivateKeyName: keyName, + ProjectID: projID, + BucketName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameGCS, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["ServiceAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + } + if in.BucketContext["PrivateKeyName"] != keyName { + t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + } + if in.BucketContext["ProjectID"] != projID { + t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + } + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: principal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: principal, + serviceAccount: "", + }, + { + name: "AzureBlob", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ + StorageAccount: account, + ContainerName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameAzure, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["StorageAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + } + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: principal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: principal, + serviceAccount: "", + }, + { + name: "No Principal", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: generatedPrincipal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: "", + serviceAccount: "", + }, + { + name: "ServiceAccount exists", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: principal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: principal, + serviceAccount: sa, + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: instanceName, + }, + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{ + RequestedProtocol: v1alpha1.RequestedProtocol{ + Name: tc.protocolName, + }, + }, + }, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + BucketInstanceName: instanceName, + Provisioner: provisioner, + Principal: tc.principal, + ServiceAccount: tc.serviceAccount, + }, + } + + ctx := context.TODO() + tc.setProtocol(&b) + client := fakebucketclientset.NewSimpleClientset(&ba, &b) + kubeClient := fakekubeclientset.NewSimpleClientset() + mpc.GrantBucketAccess = tc.grantFunc + bal := bucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketAccessClient: client, + kubeClient: kubeClient, + } + + err := bal.Add(ctx, &ba) + if err != nil { + t.Errorf("add returned: %+v", err) + } + + updatedBA, _ := client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) + if updatedBA.Status.AccessGranted != true { + t.Errorf("expected %t, got %t", true, ba.Status.AccessGranted) + } + if len(tc.principal) <= 0 { + if !strings.EqualFold(updatedBA.Spec.Principal, generatedPrincipal) { + t.Errorf("expected %s, got %s", generatedPrincipal, updatedBA.Spec.Principal) + } + } + + secretName := generateSecretName(ba.UID) + secret, err := kubeClient.CoreV1().Secrets("objectstorage-system").Get(ctx, secretName, metav1.GetOptions{}) + if len(tc.serviceAccount) > 0 { + if err == nil { + t.Errorf("secret should not have been created") + } + } else { + if secret.StringData["CredentialsFilePath"] != credsFile { + t.Errorf("expected %s, got %s", credsFile, secret.StringData["CredentialsFilePath"]) + } + if secret.StringData["CredentialsFileContents"] != credsContents { + t.Errorf("expected %s, got %s", credsContents, secret.StringData["CredentialsFileContents"]) + } + } + } +} + +func TestDeleteWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.MockProvisionerClient }{} + mpc.RevokeBucketAccess = func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bal := bucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bal.Delete(ctx, &ba) + if err != nil { + t.Errorf("error returned: %+v", err) + } +} + +func TestDelete(t *testing.T) { + provisioner := "provisioner1" + region := "region1" + bucketName := "bucket1" + principal := "principal1" + protocolVersion := "proto1" + sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) + account := "account1" + keyName := "keyName1" + projID := "id1" + endpoint := "endpoint1" + instanceName := "instance" + mpc := struct{ fakespec.MockProvisionerClient }{} + + testCases := []struct { + name string + setProtocol func(b *v1alpha1.Bucket) + protocolName v1alpha1.ProtocolName + revokeFunc func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) + serviceAccount string + }{ + { + name: "S3", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["Version"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil + }, + serviceAccount: "", + }, + { + name: "GCS", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ + ServiceAccount: account, + PrivateKeyName: keyName, + ProjectID: projID, + BucketName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameGCS, + revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["ServiceAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + } + if in.BucketContext["PrivateKeyName"] != keyName { + t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + } + if in.BucketContext["ProjectID"] != projID { + t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + } + return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil + }, + serviceAccount: "", + }, + { + name: "AzureBlob", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ + StorageAccount: account, + ContainerName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameAzure, + revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["StorageAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + } + return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil + }, + serviceAccount: "", + }, + { + name: "service account exists", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["Version"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil + }, + serviceAccount: "serviceAccount", + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: instanceName, + }, + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{ + RequestedProtocol: v1alpha1.RequestedProtocol{ + Name: tc.protocolName, + }, + }, + }, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + BucketInstanceName: instanceName, + Provisioner: provisioner, + Principal: principal, + ServiceAccount: tc.serviceAccount, + }, + Status: v1alpha1.BucketAccessStatus{ + AccessGranted: true, + }, + } + secretName := generateSecretName(ba.UID) + secret := v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: secretName, + Namespace: "objectstorage-system", + }, + Type: v1.SecretTypeOpaque, + } + + ctx := context.TODO() + tc.setProtocol(&b) + client := fakebucketclientset.NewSimpleClientset(&ba, &b) + kubeClient := fakekubeclientset.NewSimpleClientset(&secret) + mpc.RevokeBucketAccess = tc.revokeFunc + bal := bucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketAccessClient: client, + kubeClient: kubeClient, + } + + err := bal.Delete(ctx, &ba) + if err != nil { + t.Errorf("delete returned: %+v", err) + } + + updatedBA, _ := client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) + if updatedBA.Status.AccessGranted != false { + t.Errorf("expected %t, got %t", false, ba.Status.AccessGranted) + } + + _, err = kubeClient.CoreV1().Secrets("objectstorage-system").Get(ctx, secretName, metav1.GetOptions{}) + if len(tc.serviceAccount) == 0 { + if err == nil { + t.Errorf("secret should not exist") + } + } + } +} From 896c05bc657a042c54479ae585500b3f8abd1339 Mon Sep 17 00:00:00 2001 From: Manjunath A Kumatagi Date: Wed, 9 Dec 2020 21:34:08 +0530 Subject: [PATCH 125/299] Fix kubeconfig flag --- .../cmd/controller-manager/controller-manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index 533d898d..5ac029c4 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -39,7 +39,7 @@ func init() { c.PersistentFlags(). StringVarP(ptr, name, short, dfault, desc) } - strFlag(cmd, &kubeConfig, "kube-config", "", kubeConfig, "path to kubeconfig file") + strFlag(cmd, &kubeConfig, "kubeconfig", "", kubeConfig, "path to kubeconfig file") hideFlag := func(name string) { cmd.PersistentFlags().MarkHidden(name) From bc899af1a8f0fb67718eb311bbbbdf546362df04 Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Thu, 10 Dec 2020 11:29:23 -0500 Subject: [PATCH 126/299] Added Kustomize for controller, sidecar & CRDs Signed-off-by: Tejas Parikh --- .../deploy/base/deployment.yaml | 24 ++++++ .../deploy/base/ns.yaml | 5 ++ .../deploy/base/rbac.yaml | 55 +++++++++++++ .../deploy/base/sa.yaml | 6 ++ .../kustomization.yaml | 81 +++++++++++++++++++ 5 files changed, 171 insertions(+) create mode 100644 container-object-storage-interface-controller/deploy/base/deployment.yaml create mode 100644 container-object-storage-interface-controller/deploy/base/ns.yaml create mode 100644 container-object-storage-interface-controller/deploy/base/rbac.yaml create mode 100644 container-object-storage-interface-controller/deploy/base/sa.yaml create mode 100644 container-object-storage-interface-controller/kustomization.yaml diff --git a/container-object-storage-interface-controller/deploy/base/deployment.yaml b/container-object-storage-interface-controller/deploy/base/deployment.yaml new file mode 100644 index 00000000..c33295be --- /dev/null +++ b/container-object-storage-interface-controller/deploy/base/deployment.yaml @@ -0,0 +1,24 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: objectstorage-controller + namespace: objectstorage-system +spec: + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + selector: + matchLabels: + app: objectstorage-controller + template: + metadata: + labels: + app: objectstorage-controller + spec: + serviceAccountName: objectstorage-controller-sa + containers: + - name: objectstorage-controller + image: quay.io/containerobjectstorage/objectstorage-controller:latest diff --git a/container-object-storage-interface-controller/deploy/base/ns.yaml b/container-object-storage-interface-controller/deploy/base/ns.yaml new file mode 100644 index 00000000..c31ae9c4 --- /dev/null +++ b/container-object-storage-interface-controller/deploy/base/ns.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: objectstorage-system diff --git a/container-object-storage-interface-controller/deploy/base/rbac.yaml b/container-object-storage-interface-controller/deploy/base/rbac.yaml new file mode 100644 index 00000000..1051b694 --- /dev/null +++ b/container-object-storage-interface-controller/deploy/base/rbac.yaml @@ -0,0 +1,55 @@ +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: objectstorage-controller-role +rules: +- apiGroups: ["objectstorage.k8s.io"] + resources: ["bucketrequests", "bucketaccessrequests"] + verbs: ["get", "list", "watch"] +- apiGroups: ["objectstorage.k8s.io"] + resources: ["buckets", "bucketaccess"] + verbs: ["get", "list", "watch", "update", "create", "delete"] +- apiGroups: ["objectstorage.k8s.io"] + resources: ["bucketclass","bucketaccessclass"] + verbs: ["get", "list"] +- apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: system:objectstorage-controller +subjects: + - kind: ServiceAccount + name: objectstorage-controller-sa + namespace: objectstorage-system +roleRef: + kind: ClusterRole + name: objectstorage-controller-role + apiGroup: rbac.authorization.k8s.io +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: objectstorage-controller + namespace: objectstorage-system +rules: +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: objectstorage-controller + namespace: objectstorage-system +subjects: + - kind: ServiceAccount + name: objectstorage-controller-sa + namespace: objectstorage-system +roleRef: + kind: Role + name: objectstorage-controller + apiGroup: rbac.authorization.k8s.io diff --git a/container-object-storage-interface-controller/deploy/base/sa.yaml b/container-object-storage-interface-controller/deploy/base/sa.yaml new file mode 100644 index 00000000..802dbb8c --- /dev/null +++ b/container-object-storage-interface-controller/deploy/base/sa.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: objectstorage-controller-sa + namespace: objectstorage-system diff --git a/container-object-storage-interface-controller/kustomization.yaml b/container-object-storage-interface-controller/kustomization.yaml new file mode 100644 index 00000000..0d2ba6d9 --- /dev/null +++ b/container-object-storage-interface-controller/kustomization.yaml @@ -0,0 +1,81 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +# Controller +- name: objectstorage-controller + newName: quay.io/containerobjectstorage/objectstorage-controller + newTag: latest +# Sidecar +- name: object-storage-sidecar + newName: quay.io/containerobjectstorage/object-storage-sidecar + newTag: latest +# Sample Driver +- name: sample-driver + newName: quay.io/containerobjectstorage/sample-driver + newTag: latest + +resources: +# CRDs +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccessclasses.yaml +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccesses.yaml +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccessrequests.yaml +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketclasses.yaml +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketrequests.yaml +- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_buckets.yaml +# Controller +- deploy/base/ns.yaml +- deploy/base/sa.yaml +- deploy/base/rbac.yaml +- deploy/base/deployment.yaml +# Sidecar +- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml + +patches: +# CRDs +- target: + kind: CustomResourceDefinition + patch: |- + - op: add + path: /metadata/annotations + value: + controller-gen.kubebuilder.io/version: (devel) + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/2 +# Controller +- target: + kind: Deployment + name: objectstorage-controller + patch: |- + - op: replace + path: /spec/template/spec/containers/0/imagePullPolicy + value: IfNotPresent +# Sidecar +- target: + kind: Deployment + name: object-storage-provisioner + patch: |- + - op: replace + path: /spec/template/spec/containers/0/imagePullPolicy + value: IfNotPresent + - op: replace + path: /spec/template/spec/containers/1/imagePullPolicy + value: IfNotPresent + - op: replace + path: /metadata + value: + name: object-storage-provisioner + labels: + app: object-storage-provisioner + namespace: objectstorage-provisioner-ns +- target: + kind: Secret + name: object-storage-provisioner + patch: |- + - op: replace + path: /metadata + value: + name: object-storage-provisioner + labels: + app: object-storage-provisioner + namespace: objectstorage-provisioner-ns From 94947cca6af4435d085e907adfe33cc477f1a96f Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Fri, 4 Dec 2020 08:57:14 -0800 Subject: [PATCH 127/299] Adding BucketAccess Add Functionality, Fix cmd controller and pass context to command Fixes https://github.com/kubernetes-sigs/container-object-storage-interface-controller/issues/10 Fixes https://github.com/kubernetes-sigs/container-object-storage-interface-controller/issues/8 --- .../controller-manager/controller-manager.go | 14 +- .../go.mod | 3 +- .../go.sum | 11 +- .../bucketaccessrequest.go | 162 +++++++++ .../bucketaccessrequest_test.go | 332 ++++++++++++++++++ .../pkg/bucketrequest/bucketrequest.go | 41 ++- .../pkg/bucketrequest/bucketrequest_test.go | 51 ++- .../pkg/util/util.go | 40 ++- 8 files changed, 605 insertions(+), 49 deletions(-) create mode 100644 container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go create mode 100644 container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index 533d898d..750e833b 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -11,6 +11,7 @@ import ( "github.com/spf13/viper" bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketaccessrequest" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketrequest" "github.com/golang/glog" @@ -59,13 +60,9 @@ func init() { } func main() { - if err := cmd.Execute(); err != nil { - glog.Fatal(err.Error()) - } - - var cancel context.CancelFunc + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() // Just in case - _, cancel = context.WithCancel(cmd.Context()) sigs := make(chan os.Signal, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) @@ -73,6 +70,10 @@ func main() { <-sigs cancel() }() + + if err := cmd.ExecuteContext(ctx); err != nil { + glog.Fatal(err.Error()) + } } func run(ctx context.Context, args []string) error { @@ -81,5 +82,6 @@ func run(ctx context.Context, args []string) error { return err } ctrl.AddBucketRequestListener(bucketrequest.NewListener()) + ctrl.AddBucketAccessRequestListener(bucketaccessrequest.NewListener()) return ctrl.Run(ctx) } diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 19ac6584..f1959337 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -4,10 +4,11 @@ go 1.15 require ( github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 github.com/spf13/cobra v1.1.1 github.com/spf13/viper v1.7.1 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 + k8s.io/api v0.19.4 k8s.io/apiextensions-apiserver v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index e2f76648..6d6c49cb 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -257,6 +257,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/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= @@ -289,8 +290,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 h1:kBd9bCHv429J7Y8Mp2w1Xg3QtDiRAhittzYC/45/G2E= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 h1:1Zmlu1GKd1iIv9fdc1mkaTuUtoNqet4NLYLE/8p9ylw= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -336,6 +337,7 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= @@ -343,6 +345,7 @@ github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -486,7 +489,6 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -661,6 +663,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -693,7 +696,6 @@ k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apiextensions-apiserver v0.19.4 h1:D9ak9T012tb3vcGFWYmbQuj9SCC8YM4zhA4XZqsAQC4= k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw= @@ -727,6 +729,7 @@ k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go new file mode 100644 index 00000000..48cebc99 --- /dev/null +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -0,0 +1,162 @@ +package bucketaccessrequest + +import ( + "context" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" + bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" + + "github.com/golang/glog" +) + +type bucketAccessRequestListener struct { + kubeClient kubeclientset.Interface + bucketClient bucketclientset.Interface +} + +func NewListener() bucketcontroller.BucketAccessRequestListener { + return &bucketAccessRequestListener{} +} + +func (b *bucketAccessRequestListener) InitializeKubeClient(k kubeclientset.Interface) { + b.kubeClient = k +} + +func (b *bucketAccessRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { + b.bucketClient = bc +} + +func (b *bucketAccessRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { + glog.V(1).Infof("Add called for BucketAccessRequest %s", obj.Name) + bucketAccessRequest := obj + + err := b.provisionBucketAccess(ctx, bucketAccessRequest) + if err != nil { + // Provisioning is 100% finished / not in progress. + switch err { + case util.ErrInvalidBucketAccessClass: + glog.V(1).Infof("BucketAccessClass specified does not exist while processing BucketAccessRequest %v.", bucketAccessRequest.Name) + err = nil + case util.ErrBucketAccessAlreadyExists: + glog.V(1).Infof("BucketAccess already exist for this BucketAccessRequest %v.", bucketAccessRequest.Name) + err = nil + default: + glog.V(1).Infof("Error occurred processing BucketAccessRequest %v: %v", bucketAccessRequest.Name, err) + } + return err + } + + glog.V(1).Infof("BucketAccessRequest %v is successfully processed.", bucketAccessRequest.Name) + return nil +} + +func (b *bucketAccessRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccessRequest) error { + glog.V(1).Infof("Update called for BucketAccessRequest %v", old.Name) + return nil +} + +func (b *bucketAccessRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { + glog.V(1).Infof("Delete called for BucketAccessRequest %v", obj.Name) + return nil +} + +// provisionBucketAccess attempts to provision a BucketAccess for the given bucketAccessRequest. +// Returns nil error only when the bucketaccess was provisioned. An error is return if we cannot create bucket access. +// A normal error is returned when bucket acess was not provisioned and provisioning should be retried (requeue the bucketAccessRequest), +// or a special error errBucketAccessAlreadyExists, errInvalidBucketAccessClass is returned when provisioning was impossible and +// no further attempts to provision should be tried. +func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketAccessRequest *v1alpha1.BucketAccessRequest) error { + bucketAccessClassName := bucketAccessRequest.Spec.BucketAccessClassName + + bucketaccess := b.FindBucketAccess(ctx, bucketAccessRequest) + if bucketaccess != nil { + // bucketaccess has provisioned, nothing to do. + return util.ErrBucketAccessAlreadyExists + } + + bucketAccessClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) + if bucketAccessClass == nil { + // bucket access class is invalid or not specified, cannot continue with provisioning. + return util.ErrInvalidBucketAccessClass + } + + bucketRequest, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketAccessRequest.Namespace).Get(ctx, bucketAccessRequest.Spec.BucketRequestName, metav1.GetOptions{}) + if bucketRequest == nil { + // bucket request does not exist, we have to reject this provision. + return util.ErrInvalidBucketRequest + } + if err != nil { + return err + } + + if bucketRequest.Spec.BucketInstanceName == "" { + return util.ErrWaitForBucketProvisioning + } + + sa, err := b.kubeClient.CoreV1().ServiceAccounts(bucketAccessRequest.Namespace).Get(ctx, bucketAccessRequest.Spec.ServiceAccountName, metav1.GetOptions{}) + if err != nil { + return err + } + + bucketaccess = &v1alpha1.BucketAccess{} + bucketaccess.Name = util.GetUUID() + + bucketaccess.Spec.BucketInstanceName = bucketRequest.Spec.BucketInstanceName + bucketaccess.Spec.BucketAccessRequest = &v1.ObjectReference{ + Name: bucketAccessRequest.Name, + Namespace: bucketAccessRequest.Namespace, + UID: bucketAccessRequest.ObjectMeta.UID} + bucketaccess.Spec.ServiceAccount = &v1.ObjectReference{ + Name: sa.Name, + Namespace: sa.Namespace, + UID: sa.ObjectMeta.UID} + // bucketaccess.Spec.MintedSecretName - set by the driver + bucketaccess.Spec.PolicyActionsConfigMapData, err = util.ReadConfigData(b.kubeClient, bucketAccessClass.PolicyActionsConfigMap) + if err != nil { + return err + } + // bucketaccess.Spec.Principal - set by the driver + bucketaccess.Spec.Provisioner = bucketAccessClass.Provisioner + bucketaccess.Spec.Parameters = util.CopySS(bucketAccessClass.Parameters) + + bucketaccess, err = b.bucketClient.ObjectstorageV1alpha1().BucketAccesses().Create(context.Background(), bucketaccess, metav1.CreateOptions{}) + if err != nil { + return err + } + + err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketAccessRequest.Spec.BucketAccessName = bucketaccess.Name + _, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil + }) + if err != nil { + return err + } + glog.Infof("Finished creating BucketAccess %v", bucketaccess.Name) + return nil +} + +func (b *bucketAccessRequestListener) FindBucketAccess(ctx context.Context, bar *v1alpha1.BucketAccessRequest) *v1alpha1.BucketAccess { + bucketAccessList, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) + if err != nil || len(bucketAccessList.Items) <= 0 { + return nil + } + for _, bucketaccess := range bucketAccessList.Items { + if bucketaccess.Spec.BucketAccessRequest.Name == bar.Name && + bucketaccess.Spec.BucketAccessRequest.Namespace == bar.Namespace && + bucketaccess.Spec.BucketAccessRequest.UID == bar.UID { + return &bucketaccess + } + } + return nil +} diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go new file mode 100644 index 00000000..73834949 --- /dev/null +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -0,0 +1,332 @@ +package bucketaccessrequest + +import ( + "context" + "testing" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + "k8s.io/client-go/kubernetes/fake" + + types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" +) + +var sa1 = v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sa1", + Namespace: "default", + }, +} + +var sa2 = v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sa2", + Namespace: "default", + }, +} + +var cosiConfigMap = v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "testconfigmap", + Namespace: "default", + Labels: map[string]string{ + "cosi-configmap": "test-cred1", + }, + }, + Data: map[string]string{ + "profile": "profile1", + "certfile": "cert1", + }, +} + +var classGoldAccessParameters = map[string]string{ + "param1": "value1", + "param2": "value2", +} + +var goldAccessClass = types.BucketAccessClass{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketAccessClass", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "classaccessgold", + }, + Provisioner: "provisioner1", + PolicyActionsConfigMap: &v1.ObjectReference{Name: "testconfigmap", Namespace: "default"}, + Parameters: classGoldAccessParameters, +} + +var bucketRequest1 = types.BucketRequest{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketRequest", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bucketrequest1", + Namespace: "default", + }, + Spec: types.BucketRequestSpec{ + BucketPrefix: "cosi", + Protocol: types.RequestedProtocol{ + Name: "s3", + Version: "", + }, + BucketClassName: "classgold", + BucketInstanceName: "cosi1234567890", + }, +} + +var bucketAccessRequest1 = types.BucketAccessRequest{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketAccessRequest", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bucketaccessrequest1", + Namespace: "default", + }, + Spec: types.BucketAccessRequestSpec{ + ServiceAccountName: "sa1", + BucketRequestName: "bucketrequest1", + BucketAccessClassName: "classaccessgold", + }, +} + +var bucketAccessRequest2 = types.BucketAccessRequest{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "objectstorage.k8s.io/v1alpha1", + Kind: "BucketAccessRequest", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "bucketaccessrequest2", + Namespace: "default", + }, + Spec: types.BucketAccessRequestSpec{ + ServiceAccountName: "sa2", + BucketRequestName: "bucketrequest1", + BucketAccessClassName: "classaccessgold", + }, +} + +// Test basic add functionality +func TestAddBAR(t *testing.T) { + runCreateBucketAccess(t, "add") +} + +// Test add with multipleBRs +func TestAddWithMultipleBAR(t *testing.T) { + runCreateBucketWithMultipleBA(t, "addWithMultipleBR") +} + +// Test add idempotency +func TestAddBARIdempotency(t *testing.T) { + runCreateBucketIdempotency(t, "addWithMultipleBR") +} + +func runCreateBucketAccess(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ServiceAccount: %v", err) + } + defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) + + _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ConfigMap: %v", err) + } + defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) + + bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketRequest: %v", err) + } + + bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) + } + + listener.Add(ctx, bucketaccessrequest) + + bucketAccessList := util.GetBucketAccesses(ctx, client, 1) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessclass, bucketAccessList.Items) + + if len(bucketAccessList.Items) != 1 { + t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) + } + bucketaccess := bucketAccessList.Items[0] + + bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) + } + + if util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) { + return + } else { + t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) + } +} + +func runCreateBucketWithMultipleBA(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ServiceAccount: %v", err) + } + defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) + + _, err = kubeClient.CoreV1().ServiceAccounts(sa2.Namespace).Create(ctx, &sa2, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ServiceAccount: %v", err) + } + defer kubeClient.CoreV1().ServiceAccounts(sa2.Namespace).Delete(ctx, sa2.Name, metav1.DeleteOptions{}) + + _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ConfigMap: %v", err) + } + defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) + + bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketRequest: %v", err) + } + + bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) + } + + bucketaccessrequest2, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest2) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) + } + + listener.Add(ctx, bucketaccessrequest) + listener.Add(ctx, bucketaccessrequest2) + + bucketAccessList := util.GetBucketAccesses(ctx, client, 2) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessrequest2, *bucketaccessclass, bucketAccessList.Items) + + if len(bucketAccessList.Items) != 2 { + t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) + } + bucketaccess := bucketAccessList.Items[0] + bucketaccess2 := bucketAccessList.Items[1] + + bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) + } + bucketaccessrequest2, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest2.Namespace).Get(ctx, bucketaccessrequest2.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) + } + + if (util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) && util.ValidateBucketAccess(bucketaccess2, *bucketaccessrequest2, *bucketaccessclass)) || + (util.ValidateBucketAccess(bucketaccess2, *bucketaccessrequest, *bucketaccessclass) && util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest2, *bucketaccessclass)) { + return + } else { + t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) + } + +} + +func runCreateBucketIdempotency(t *testing.T, name string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bucketclientset.NewSimpleClientset() + kubeClient := fake.NewSimpleClientset() + + listener := NewListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + + _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ServiceAccount: %v", err) + } + defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) + + _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Error occurred when creating ConfigMap: %v", err) + } + defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) + + bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) + } + + bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketRequest: %v", err) + } + + bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) + if err != nil { + t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) + } + + listener.Add(ctx, bucketaccessrequest) + + bucketAccessList := util.GetBucketAccesses(ctx, client, 1) + defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessclass, bucketAccessList.Items) + + if len(bucketAccessList.Items) != 1 { + t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) + } + bucketaccess := bucketAccessList.Items[0] + + bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) + } + + if !util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) { + t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) + } + + // call the add directly the second time + listener.Add(ctx, bucketaccessrequest) + bucketAccessList = util.GetBucketAccesses(ctx, client, 1) + if len(bucketAccessList.Items) != 1 { + t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) + } +} diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index 861f233a..ab126302 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" @@ -12,6 +13,7 @@ import ( bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" "github.com/golang/glog" ) @@ -35,36 +37,37 @@ func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interf // Add creates a bucket in response to a bucketrequest func (b *bucketRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketRequest) error { - glog.V(1).Infof("add called for bucket %s", obj.Name) + glog.V(1).Infof("Add called for BucketRequest %s", obj.Name) bucketRequest := obj err := b.provisionBucketRequestOperation(ctx, bucketRequest) if err != nil { // Provisioning is 100% finished / not in progress. switch err { case util.ErrInvalidBucketClass: - glog.V(5).Infof("Bucket Class specified does not exist. Stop provisioning, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + glog.V(1).Infof("BucketClass specified does not exist while processing BucketRequest %v.", bucketRequest.Name) err = nil case util.ErrBucketAlreadyExists: - glog.V(5).Infof("Bucket already exist for this bucket request. Stop provisioning, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + glog.V(1).Infof("Bucket already exist for this bucket request %v.", bucketRequest.Name) err = nil default: - glog.V(2).Infof("Final error received, removing buckerRequest %s from bucketRequests in progress", bucketRequest.UID) + glog.V(1).Infof("Error occurred processing BucketRequest %v: %v", bucketRequest.Name, err) } return err } - glog.V(5).Infof("BucketRequest processing succeeded, removing bucketRequest %s from bucketRequests in progress", bucketRequest.UID) + glog.V(1).Infof("BucketRequest %v is successfully processed.", bucketRequest.Name) return nil } // update processes any updates made to the bucket request func (b *bucketRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketRequest) error { - glog.V(1).Infof("update called for bucket %v", old) + glog.V(1).Infof("Update called for BucketRequest %v", old.Name) return nil } // Delete processes a bucket for which bucket request is deleted func (b *bucketRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketRequest) error { + glog.V(1).Infof("Delete called for BucketRequest %v", obj.Name) return nil } @@ -93,7 +96,7 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont return util.ErrInvalidBucketClass } - glog.Infof("creating bucket for bucketrequest %v", bucketRequest.Name) + glog.Infof("Creating Bucket for BucketRequest %v", bucketRequest.Name) // create bucket bucket = &v1alpha1.Bucket{} @@ -102,7 +105,7 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket.Spec.RetentionPolicy = bucketClass.RetentionPolicy bucket.Spec.AnonymousAccessMode = bucketClass.AnonymousAccessMode bucket.Spec.BucketClassName = bucketClass.Name - bucket.Spec.BucketRequest = &v1alpha1.BucketRequestReference{ + bucket.Spec.BucketRequest = &v1.ObjectReference{ Name: bucketRequest.Name, Namespace: bucketRequest.Namespace, UID: bucketRequest.ObjectMeta.UID} @@ -114,11 +117,22 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket, err = b.bucketClient.ObjectstorageV1alpha1().Buckets().Create(context.Background(), bucket, metav1.CreateOptions{}) if err != nil { - glog.V(5).Infof("Error occurred when creating bucket %v", err) + glog.V(5).Infof("Error occurred when creating Bucket %v", err) return err } - glog.Infof("Finished creating bucket %v", bucket.Name) + err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketRequest.Spec.BucketInstanceName = bucket.Name + _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil + }) + if err != nil { + return err + } + glog.Infof("Finished creating Bucket %v", bucket.Name) return nil } @@ -154,11 +168,6 @@ func (b *bucketRequestListener) FindBucket(ctx context.Context, br *v1alpha1.Buc // cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { - glog.V(1).Infof("clone called for bucket %s", bucketRequest.Spec.BucketInstanceName) + glog.V(1).Infof("Clone called for Bucket %s", bucketRequest.Spec.BucketInstanceName) return util.ErrNotImplemented } - -// logOperation format and prints logs -func logOperation(operation, format string, a ...interface{}) string { - return fmt.Sprintf(fmt.Sprintf("%s: %s", operation, format), a...) -} diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index cef7e37c..87057e55 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -71,7 +71,7 @@ var bucketRequest2 = types.BucketRequest{ } // Test basic add functionality -func TestAdd(t *testing.T) { +func TestAddBR(t *testing.T) { runCreateBucket(t, "add") } @@ -81,7 +81,7 @@ func TestAddWithMultipleBR(t *testing.T) { } // Test add idempotency -func TestAddIdempotency(t *testing.T) { +func TestAddBRIdempotency(t *testing.T) { runCreateBucketIdempotency(t, "addWithMultipleBR") } @@ -98,12 +98,12 @@ func runCreateBucket(t *testing.T, name string) { bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { - t.Fatalf("Error occurred when creating bucketclass: %v", err) + t.Fatalf("Error occurred when creating BucketClass: %v", err) } bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) if err != nil { - t.Fatalf("Error occurred when creating bucketrequest: %v", err) + t.Fatalf("Error occurred when creating BucketRequest: %v", err) } listener.Add(ctx, bucketrequest) @@ -112,14 +112,19 @@ func runCreateBucket(t *testing.T, name string) { defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) if len(bucketList.Items) != 1 { - t.Fatalf("Expecting a single bucket created but found %v", len(bucketList.Items)) + t.Fatalf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] + bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when reading BucketRequest: %v", err) + } + if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { return } else { - t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) } } @@ -136,17 +141,17 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { - t.Fatalf("Error occurred when creating bucketclass: %v", err) + t.Fatalf("Error occurred when creating BucketClass: %v", err) } bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) if err != nil { - t.Fatalf("Error occurred when creating bucketrequest: %v", err) + t.Fatalf("Error occurred when creating BucketRequest: %v", err) } bucketrequest2, err := util.CreateBucketRequest(ctx, client, &bucketRequest2) if err != nil { - t.Fatalf("Error occurred when creating bucketrequest: %v", err) + t.Fatalf("Error occurred when creating BucketRequest: %v", err) } listener.Add(ctx, bucketrequest) @@ -155,16 +160,25 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { bucketList := util.GetBuckets(ctx, client, 2) defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketrequest2, *bucketclass, bucketList.Items) if len(bucketList.Items) != 2 { - t.Fatalf("Expecting two buckets created but found %v", len(bucketList.Items)) + t.Fatalf("Expecting two Buckets created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] bucket2 := bucketList.Items[1] + bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when reading BucketRequest: %v", err) + } + bucketrequest2, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest2.Namespace).Get(ctx, bucketrequest2.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when reading BucketRequest: %v", err) + } + if (util.ValidateBucket(bucket, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket2, *bucketrequest2, *bucketclass)) || (util.ValidateBucket(bucket2, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket, *bucketrequest2, *bucketclass)) { return } else { - t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) } } @@ -181,12 +195,12 @@ func runCreateBucketIdempotency(t *testing.T, name string) { bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { - t.Fatalf("Error occurred when creating bucketclass: %v", err) + t.Fatalf("Error occurred when creating BucketClass: %v", err) } bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) if err != nil { - t.Fatalf("Error occurred when creating bucketrequest: %v", err) + t.Fatalf("Error occurred when creating BucketRequest: %v", err) } listener.Add(ctx, bucketrequest) @@ -195,14 +209,19 @@ func runCreateBucketIdempotency(t *testing.T, name string) { defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) if len(bucketList.Items) != 1 { - t.Errorf("Expecting a single bucket created but found %v", len(bucketList.Items)) + t.Errorf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] + bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + if err != nil { + t.Fatalf("Error occurred when reading BucketRequest: %v", err) + } + if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { return } else { - t.Fatalf("Failed to compare the resulting bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) // call the add directly the second time } @@ -210,6 +229,6 @@ func runCreateBucketIdempotency(t *testing.T, name string) { bucketList = util.GetBuckets(ctx, client, 1) if len(bucketList.Items) != 1 { - t.Fatalf("Expecting a single bucket created but found %v", len(bucketList.Items)) + t.Fatalf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } } diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index ba7e2c30..14a8cede 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -2,6 +2,7 @@ package util import ( "context" + "encoding/json" "errors" "fmt" "golang.org/x/time/rate" @@ -10,6 +11,7 @@ import ( "strings" "time" + v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextensions "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -35,10 +37,15 @@ import ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") - ErrInvalidBucketClass = errors.New("Cannot find Bucket Class with the name specified in the bucket request") - ErrBCUnavailable = errors.New("BucketClass is not available") - ErrNotImplemented = errors.New("Operation Not Implemented") + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") + ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") + ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") + ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") + ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") + ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") + ErrBCUnavailable = errors.New("BucketClass is not available") + ErrNotImplemented = errors.New("Operation Not Implemented") + ErrNilConfigMap = errors.New("ConfigMap cannot be nil") ) func CopySS(m map[string]string) map[string]string { @@ -65,6 +72,25 @@ func GetUUID() string { return string(uuid.NewUUID()) } +func ReadConfigData(kubeClient kubeclientset.Interface, configMapRef *v1.ObjectReference) (string, error) { + if configMapRef == nil { + return "", ErrNilConfigMap + } + configMap, err := kubeClient.CoreV1().ConfigMaps(configMapRef.Namespace).Get(context.TODO(), configMapRef.Name, metav1.GetOptions{}) + if err != nil { + return "", err + } + payload := make(map[string]string) + for name, data := range configMap.Data { + payload[name] = data + } + cData, err := json.Marshal(payload) + if err != nil { + return "", err + } + return string(cData), nil +} + // SetupTest is utility function to create clients and controller // This is used by bucket request and bucket access request unit tests func SetupTest(ctx context.Context) (bucketclientset.Interface, kubeclientset.Interface, *controller.ObjectStorageController) { @@ -138,6 +164,7 @@ func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpect // This is used by bucket request unit tests func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, bucketclass types.BucketClass) bool { if strings.HasPrefix(bucket.Name, bucketrequest.Spec.BucketPrefix) && + bucketrequest.Spec.BucketInstanceName == bucket.Name && bucket.Spec.BucketClassName == bucketrequest.Spec.BucketClassName && bucket.Spec.BucketRequest.Name == bucketrequest.Name && bucket.Spec.BucketRequest.Namespace == bucketrequest.Namespace && @@ -175,8 +202,9 @@ func GetBucketAccesses(ctx context.Context, client bucketclientset.Interface, nu // This is used by bucket access request unit tests func ValidateBucketAccess(bucketaccess types.BucketAccess, bucketaccessrequest types.BucketAccessRequest, bucketaccessclass types.BucketAccessClass) bool { if bucketaccess.Spec.BucketInstanceName != "" && - bucketaccess.Spec.BucketAccessRequest == bucketaccessrequest.Name && - bucketaccess.Spec.ServiceAccount == bucketaccessrequest.Spec.ServiceAccountName && + bucketaccessrequest.Spec.BucketAccessName == bucketaccess.Name && + bucketaccess.Spec.BucketAccessRequest.UID == bucketaccessrequest.UID && + bucketaccess.Spec.ServiceAccount.Name == bucketaccessrequest.Spec.ServiceAccountName && bucketaccess.Spec.PolicyActionsConfigMapData != "" && bucketaccess.Spec.Provisioner == bucketaccessclass.Provisioner { return true From d5b597678b8761668478874ec0dab550ae930582 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Thu, 10 Dec 2020 18:18:22 -0500 Subject: [PATCH 128/299] Updates for latest api changes --- .../bucket_access_controller_test.go | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go index 517ca224..65489b2a 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -29,6 +29,7 @@ import ( fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" @@ -142,8 +143,8 @@ func TestAdd(t *testing.T) { if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) } if in.Principal != principal { t.Errorf("expected %s, got %s", principal, in.Principal) @@ -185,13 +186,13 @@ func TestAdd(t *testing.T) { t.Errorf("expected %s, got %s", principal, in.Principal) } if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) } if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) } if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -219,7 +220,7 @@ func TestAdd(t *testing.T) { t.Errorf("expected %s, got %s", principal, in.Principal) } if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -406,8 +407,8 @@ func TestDelete(t *testing.T) { if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) } if in.Principal != principal { t.Errorf("expected %s, got %s", principal, in.Principal) @@ -444,13 +445,13 @@ func TestDelete(t *testing.T) { t.Errorf("expected %s, got %s", principal, in.Principal) } if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) } if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) } if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -473,7 +474,7 @@ func TestDelete(t *testing.T) { t.Errorf("expected %s, got %s", principal, in.Principal) } if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -495,8 +496,8 @@ func TestDelete(t *testing.T) { if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) } if in.Principal != principal { t.Errorf("expected %s, got %s", principal, in.Principal) From 1384cf42122efb9499e181f334e10d49124d8b43 Mon Sep 17 00:00:00 2001 From: Somers B Matthews Date: Mon, 14 Dec 2020 11:04:15 -0600 Subject: [PATCH 129/299] updated README.md fixed spacing typo in README.md added repo/images table to README.md added images to README.md changed name of adapter image in README.md changed urls in README.md edited README.md --- .../README.md | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index 73ff6fe2..a7ae792b 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -1,16 +1,42 @@ +COSI repos and images: + +[Spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec) \ +[API](https://github.com/kubernetes-sigs/container-object-storage-interface-api) \ +[Controller](https://github.com/kubernetes-sigs/container-object-storage-interface-controller)
+  - [images: cosi-controller](https://quay.io/repository/containerobjectstorage/objectstorage-controller?tab=tags) \ + [Provisioner Sidecar](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar)
+   - images: cosi-provisioner \ + [CSI Adapter](https://github.com/kubernetes-sigs/container-object-storage-interface-csi-adapter)
+   - images: cosi-node-adapter + +
+ +COSI deprecated repos: + +[Spec](https://github.com/container-object-storage-interface/spec) \ +[API](https://github.com/container-object-storage-interface/api) \ +[Manager (i.e. Controller)](https://github.com/container-object-storage-interface/cosi-controller-manager) \ +[Provisioner Sidecar](https://github.com/container-object-storage-interface/cosi-provisioner-sidecar) \ +[Ephemeral CSI Driver](https://github.com/container-object-storage-interface/ephemeral-csi-driver) + # Container Object Storage Interface Provisioner Sidecar Container Object Storage Interface (COSI) provisioner responsible to interface with COSI drivers. ## Community, discussion, contribution, and support +If you are new to a SIG Storage project, check out this [contributing guide](https://github.com/kubernetes/community/blob/master/sig-storage/CONTRIBUTING.md) +and the [community page](https://github.com/kubernetes/community/tree/master/sig-storage). + +If you are new to the SIG Storage COSI project, check out the [spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec/blob/master/spec.md), [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1979-object-storage-support), and [project board](https://github.com/orgs/kubernetes-sigs/projects/). + Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). You can reach the maintainers of this project at: - [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) +- [Mailing List](https://groups.google.com/g/container-object-storage-interface-wg?pli=1) ### Code of conduct -Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). \ No newline at end of file From 6eafde50c8eea4f97d57519fdd3275aed6b5a6ec Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 17:30:23 +0000 Subject: [PATCH 130/299] Move `kustomization.yaml` into its layer, `deploy/base` --- .../{ => deploy/base}/kustomization.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename container-object-storage-interface-controller/{ => deploy/base}/kustomization.yaml (96%) diff --git a/container-object-storage-interface-controller/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml similarity index 96% rename from container-object-storage-interface-controller/kustomization.yaml rename to container-object-storage-interface-controller/deploy/base/kustomization.yaml index 0d2ba6d9..ac342fa5 100644 --- a/container-object-storage-interface-controller/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -25,10 +25,10 @@ resources: - https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketrequests.yaml - https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_buckets.yaml # Controller -- deploy/base/ns.yaml -- deploy/base/sa.yaml -- deploy/base/rbac.yaml -- deploy/base/deployment.yaml +- ns.yaml +- sa.yaml +- rbac.yaml +- deployment.yaml # Sidecar - https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml From 93e31706c5141ef0e616f7ab39d351ffb2ede0ef Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 17:32:48 +0000 Subject: [PATCH 131/299] deploy: don't override images The images names/tags are properly encoded in the base manifests, no need to override them through a Kustomization. --- .../deploy/base/kustomization.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml index ac342fa5..1125dca9 100644 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -2,20 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -images: -# Controller -- name: objectstorage-controller - newName: quay.io/containerobjectstorage/objectstorage-controller - newTag: latest -# Sidecar -- name: object-storage-sidecar - newName: quay.io/containerobjectstorage/object-storage-sidecar - newTag: latest -# Sample Driver -- name: sample-driver - newName: quay.io/containerobjectstorage/sample-driver - newTag: latest - resources: # CRDs - https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccessclasses.yaml From 91350bbaf44dd5e6a02908b6894082752337cc22 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 17:37:09 +0000 Subject: [PATCH 132/299] deploy: don't use `IfNotPresent` `imagePullPolicy` for `latest` images --- .../deploy/base/kustomization.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml index 1125dca9..296f7eca 100644 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -28,25 +28,11 @@ patches: value: controller-gen.kubebuilder.io/version: (devel) api-approved.kubernetes.io: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/2 -# Controller -- target: - kind: Deployment - name: objectstorage-controller - patch: |- - - op: replace - path: /spec/template/spec/containers/0/imagePullPolicy - value: IfNotPresent # Sidecar - target: kind: Deployment name: object-storage-provisioner patch: |- - - op: replace - path: /spec/template/spec/containers/0/imagePullPolicy - value: IfNotPresent - - op: replace - path: /spec/template/spec/containers/1/imagePullPolicy - value: IfNotPresent - op: replace path: /metadata value: From 9784b32e07ee748f1b26d0766185587fe5b714ec Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 17:50:19 +0000 Subject: [PATCH 133/299] deploy: create `fullstack` Kustomize layer This deploys the controller (base layer) as well as the provisioner. End result remains the same. --- .../deploy/base/kustomization.yaml | 25 ------------- .../deploy/fullstack/kustomization.yaml | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml index 296f7eca..37a1da29 100644 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -15,8 +15,6 @@ resources: - sa.yaml - rbac.yaml - deployment.yaml -# Sidecar -- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml patches: # CRDs @@ -28,26 +26,3 @@ patches: value: controller-gen.kubebuilder.io/version: (devel) api-approved.kubernetes.io: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/2 -# Sidecar -- target: - kind: Deployment - name: object-storage-provisioner - patch: |- - - op: replace - path: /metadata - value: - name: object-storage-provisioner - labels: - app: object-storage-provisioner - namespace: objectstorage-provisioner-ns -- target: - kind: Secret - name: object-storage-provisioner - patch: |- - - op: replace - path: /metadata - value: - name: object-storage-provisioner - labels: - app: object-storage-provisioner - namespace: objectstorage-provisioner-ns diff --git a/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml new file mode 100644 index 00000000..8804e9db --- /dev/null +++ b/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../base/ + +resources: +# Sidecar +- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml + +patches: +# Sidecar +- target: + kind: Deployment + name: object-storage-provisioner + patch: |- + - op: replace + path: /metadata + value: + name: object-storage-provisioner + labels: + app: object-storage-provisioner + namespace: objectstorage-provisioner-ns +- target: + kind: Secret + name: object-storage-provisioner + patch: |- + - op: replace + path: /metadata + value: + name: object-storage-provisioner + labels: + app: object-storage-provisioner + namespace: objectstorage-provisioner-ns From 87fea9a89efaac2a3abbdc6caa6b39ef03d21268 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 17:58:06 +0000 Subject: [PATCH 134/299] deploy: add some common labels to all objects Closes: https://github.com/kubernetes-sigs/container-object-storage-interface-controller/issues/23 See: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels --- .../deploy/base/deployment.yaml | 14 +++++++++++-- .../deploy/base/rbac.yaml | 20 +++++++++++++++++++ .../deploy/base/sa.yaml | 5 +++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/deploy/base/deployment.yaml b/container-object-storage-interface-controller/deploy/base/deployment.yaml index c33295be..aac96e50 100644 --- a/container-object-storage-interface-controller/deploy/base/deployment.yaml +++ b/container-object-storage-interface-controller/deploy/base/deployment.yaml @@ -4,6 +4,11 @@ apiVersion: apps/v1 metadata: name: objectstorage-controller namespace: objectstorage-system + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller spec: replicas: 1 strategy: @@ -12,11 +17,16 @@ spec: maxSurge: 1 selector: matchLabels: - app: objectstorage-controller + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/name: container-object-storage-interface-controller template: metadata: labels: - app: objectstorage-controller + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller spec: serviceAccountName: objectstorage-controller-sa containers: diff --git a/container-object-storage-interface-controller/deploy/base/rbac.yaml b/container-object-storage-interface-controller/deploy/base/rbac.yaml index 1051b694..bed8acac 100644 --- a/container-object-storage-interface-controller/deploy/base/rbac.yaml +++ b/container-object-storage-interface-controller/deploy/base/rbac.yaml @@ -3,6 +3,11 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller-role + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller rules: - apiGroups: ["objectstorage.k8s.io"] resources: ["bucketrequests", "bucketaccessrequests"] @@ -21,6 +26,11 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: system:objectstorage-controller + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller subjects: - kind: ServiceAccount name: objectstorage-controller-sa @@ -35,6 +45,11 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller namespace: objectstorage-system + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] @@ -45,6 +60,11 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller namespace: objectstorage-system + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller subjects: - kind: ServiceAccount name: objectstorage-controller-sa diff --git a/container-object-storage-interface-controller/deploy/base/sa.yaml b/container-object-storage-interface-controller/deploy/base/sa.yaml index 802dbb8c..8146d502 100644 --- a/container-object-storage-interface-controller/deploy/base/sa.yaml +++ b/container-object-storage-interface-controller/deploy/base/sa.yaml @@ -4,3 +4,8 @@ kind: ServiceAccount metadata: name: objectstorage-controller-sa namespace: objectstorage-system + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller From 83f589a24294afbef236e70bbc918e18218bf8b2 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 18:30:29 +0000 Subject: [PATCH 135/299] deploy: restore namespace handling in `fullstack` overlay This patch removes hard-coded namespaces from the `base` layer, then creates the `objectstorage-system` and `objectstorage-provisioner-ns` Namespaces in the `fullstack` overlay, and uses them accordingly. Closes: https://github.com/kubernetes-sigs/container-object-storage-interface-controller/issues/22 --- .../deploy/base/deployment.yaml | 1 - .../deploy/base/kustomization.yaml | 1 - .../deploy/base/rbac.yaml | 4 --- .../deploy/base/sa.yaml | 1 - .../fullstack/controller/kustomization.yaml | 12 +++++++ .../{base => fullstack/controller}/ns.yaml | 0 .../deploy/fullstack/kustomization.yaml | 32 ++----------------- .../fullstack/provisioner/kustomization.yaml | 11 +++++++ .../deploy/fullstack/provisioner/ns.yaml | 5 +++ 9 files changed, 30 insertions(+), 37 deletions(-) create mode 100644 container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml rename container-object-storage-interface-controller/deploy/{base => fullstack/controller}/ns.yaml (100%) create mode 100644 container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml create mode 100644 container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml diff --git a/container-object-storage-interface-controller/deploy/base/deployment.yaml b/container-object-storage-interface-controller/deploy/base/deployment.yaml index aac96e50..30c09225 100644 --- a/container-object-storage-interface-controller/deploy/base/deployment.yaml +++ b/container-object-storage-interface-controller/deploy/base/deployment.yaml @@ -3,7 +3,6 @@ kind: Deployment apiVersion: apps/v1 metadata: name: objectstorage-controller - namespace: objectstorage-system labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml index 37a1da29..1d7e8e55 100644 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -11,7 +11,6 @@ resources: - https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketrequests.yaml - https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_buckets.yaml # Controller -- ns.yaml - sa.yaml - rbac.yaml - deployment.yaml diff --git a/container-object-storage-interface-controller/deploy/base/rbac.yaml b/container-object-storage-interface-controller/deploy/base/rbac.yaml index bed8acac..fc60d1bd 100644 --- a/container-object-storage-interface-controller/deploy/base/rbac.yaml +++ b/container-object-storage-interface-controller/deploy/base/rbac.yaml @@ -34,7 +34,6 @@ metadata: subjects: - kind: ServiceAccount name: objectstorage-controller-sa - namespace: objectstorage-system roleRef: kind: ClusterRole name: objectstorage-controller-role @@ -44,7 +43,6 @@ kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller - namespace: objectstorage-system labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -59,7 +57,6 @@ kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller - namespace: objectstorage-system labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -68,7 +65,6 @@ metadata: subjects: - kind: ServiceAccount name: objectstorage-controller-sa - namespace: objectstorage-system roleRef: kind: Role name: objectstorage-controller diff --git a/container-object-storage-interface-controller/deploy/base/sa.yaml b/container-object-storage-interface-controller/deploy/base/sa.yaml index 8146d502..f6cf10db 100644 --- a/container-object-storage-interface-controller/deploy/base/sa.yaml +++ b/container-object-storage-interface-controller/deploy/base/sa.yaml @@ -3,7 +3,6 @@ apiVersion: v1 kind: ServiceAccount metadata: name: objectstorage-controller-sa - namespace: objectstorage-system labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller diff --git a/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml new file mode 100644 index 00000000..9a103319 --- /dev/null +++ b/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: objectstorage-system + +bases: +- ../../base/ + +resources: +# Namespace +- ns.yaml diff --git a/container-object-storage-interface-controller/deploy/base/ns.yaml b/container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml similarity index 100% rename from container-object-storage-interface-controller/deploy/base/ns.yaml rename to container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml diff --git a/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml index 8804e9db..787fc8da 100644 --- a/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml @@ -3,33 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: -- ../base/ - -resources: -# Sidecar -- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml - -patches: -# Sidecar -- target: - kind: Deployment - name: object-storage-provisioner - patch: |- - - op: replace - path: /metadata - value: - name: object-storage-provisioner - labels: - app: object-storage-provisioner - namespace: objectstorage-provisioner-ns -- target: - kind: Secret - name: object-storage-provisioner - patch: |- - - op: replace - path: /metadata - value: - name: object-storage-provisioner - labels: - app: object-storage-provisioner - namespace: objectstorage-provisioner-ns +- ./controller +- ./provisioner diff --git a/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml new file mode 100644 index 00000000..81f1f2eb --- /dev/null +++ b/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: objectstorage-provisioner-ns + +resources: +# Namespace +- ns.yaml +# Sidecar +- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml diff --git a/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml b/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml new file mode 100644 index 00000000..04eb2ff2 --- /dev/null +++ b/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: objectstorage-provisioner-ns From 1b4c259a0c85a2ef41bf525e68190c24fcadeb1c Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 23:42:24 +0000 Subject: [PATCH 136/299] deploy: use `crds` Kustomization from the API repo Instead of listing all CRD manifests and patching in the required `api-approved` label in a Kustomization within this repository, use the new Kustomization layer from the API repository as a base. This simplifies the deployment machinery in this project. See: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/13 --- .../deploy/base/kustomization.yaml | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml index 1d7e8e55..100cd953 100644 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ b/container-object-storage-interface-controller/deploy/base/kustomization.yaml @@ -2,26 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: +bases: # CRDs -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccessclasses.yaml -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccesses.yaml -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketaccessrequests.yaml -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketclasses.yaml -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_bucketrequests.yaml -- https://raw.githubusercontent.com/kubernetes-sigs/container-object-storage-interface-api/master/crds/objectstorage.k8s.io_buckets.yaml +- github.com/kubernetes-sigs/container-object-storage-interface-api/crds + +resources: # Controller - sa.yaml - rbac.yaml - deployment.yaml - -patches: -# CRDs -- target: - kind: CustomResourceDefinition - patch: |- - - op: add - path: /metadata/annotations - value: - controller-gen.kubebuilder.io/version: (devel) - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/2 From aaad0b11744b259da0ed5da8919c34c524d95ee0 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Fri, 18 Dec 2020 11:01:19 -0800 Subject: [PATCH 137/299] Fix make and make test --- .../.gitignore | 7 ++ .../Makefile | 28 ++++++++ .../go.mod | 6 +- .../go.sum | 72 +++++++++++-------- 4 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/.gitignore create mode 100644 container-object-storage-interface-provisioner-sidecar/Makefile diff --git a/container-object-storage-interface-provisioner-sidecar/.gitignore b/container-object-storage-interface-provisioner-sidecar/.gitignore new file mode 100644 index 00000000..c5f97758 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/.gitignore @@ -0,0 +1,7 @@ +*.tmp +.DS_Store +.build +*.swp +travis.yml +release-tools +bin diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile new file mode 100644 index 00000000..123b1cfa --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -0,0 +1,28 @@ +# Copyright 2020 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +all: reltools build +.PHONY: reltools +reltools: release-tools/build.make +release-tools/build.make: + $(eval CURDIR := $(shell pwd)) + $(eval TMP := $(shell mktemp -d)) + $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) + $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) + $(shell rm -rf ${TMP}) + ln -s release-tools/travis.yml travis.yml + +#CMDS=provisioner-sidecar + +include release-tools/build.make diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index c4ad3ff4..4eedc945 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -1,10 +1,12 @@ module github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar -go 1.14 +go 1.15 require ( + github.com/kubernetes-csi/csi-lib-utils v0.9.0 github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 - github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687 + github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 + golang.org/x/net v0.0.0-20200707034311-ab3426394381 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 google.golang.org/grpc v1.34.0 k8s.io/api v0.19.4 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 0cc55e3a..e5d2ad76 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -23,6 +23,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -35,16 +36,20 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -52,6 +57,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -97,7 +103,9 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -164,8 +172,6 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -182,8 +188,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -192,8 +196,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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= @@ -204,6 +206,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -244,16 +247,21 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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/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 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI= +github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M= github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 h1:kBd9bCHv429J7Y8Mp2w1Xg3QtDiRAhittzYC/45/G2E= github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687 h1:8M3yKR8iGDCVBIX811qYTwDonVU9vad/xHxVSk/vPzo= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201208142312-59e00cb00687/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 h1:8uv9nGDukcMLYeg/m9YtTyr2IzXZd5WwUVDBRuJy2Vw= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -267,9 +275,11 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 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/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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= @@ -280,16 +290,19 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= @@ -299,24 +312,29 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= @@ -340,8 +358,8 @@ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -420,8 +438,6 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -459,13 +475,12 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -473,8 +488,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -498,6 +511,7 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -507,8 +521,8 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -519,6 +533,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -539,6 +554,7 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= @@ -556,6 +572,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -565,41 +582,40 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= -k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= -k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= -k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= -k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= -k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= -k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -610,14 +626,10 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= @@ -630,8 +642,6 @@ sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= 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= From f93cc49d9ce4248ebd1f008d9547a3bc48c1b92d Mon Sep 17 00:00:00 2001 From: wlan0 Date: Fri, 18 Dec 2020 11:46:14 -0800 Subject: [PATCH 138/299] pass rsp by-ref instead of by-value --- .../pkg/controller/bucketaccess/bucket_access_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index 7122d1f7..206faeef 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -149,7 +149,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc // Only update the principal in the BucketAccess if it wasn't set because // that means that the provisioner created one if len(obj.Spec.Principal) == 0 { - err = bal.updatePrincipal(ctx, obj.Name, *rsp) + err = bal.updatePrincipal(ctx, obj.Name, rsp) if err != nil { return err } @@ -260,7 +260,7 @@ func (bal *bucketAccessListener) updateStatus(ctx context.Context, name, msg str return err } -func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp osspec.ProvisionerGrantBucketAccessResponse) error { +func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp *osspec.ProvisionerGrantBucketAccessResponse) error { err := retry.RetryOnConflict(retry.DefaultRetry, func() error { bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{}) if err != nil { From ccde9dfec9788b4059311a16be0a3959592e8cc7 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Fri, 18 Dec 2020 15:31:01 -0500 Subject: [PATCH 139/299] Fixes to bucket controller and tests --- .../go.mod | 2 +- .../go.sum | 5 +- .../bucketaccess/bucket_access_controller.go | 21 +++--- .../bucket_access_controller_test.go | 71 ++++++++++++++++++- 4 files changed, 86 insertions(+), 13 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 4eedc945..243d18ab 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/kubernetes-csi/csi-lib-utils v0.9.0 - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28 github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 golang.org/x/net v0.0.0-20200707034311-ab3426394381 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index e5d2ad76..321a71f8 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -258,8 +258,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI= github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903 h1:kBd9bCHv429J7Y8Mp2w1Xg3QtDiRAhittzYC/45/G2E= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201204201926-43539346a903/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28 h1:ZCH6aKd+cWLi66i3tPV6f0dIuFG5Lk9XOxWacnsR8mg= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 h1:8uv9nGDukcMLYeg/m9YtTyr2IzXZd5WwUVDBRuJy2Vw= github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= @@ -589,6 +589,7 @@ 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index 206faeef..d1a3f795 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -22,7 +22,7 @@ import ( "strings" "time" - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -116,7 +116,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc req := osspec.ProvisionerGrantBucketAccessRequest{ Principal: obj.Spec.Principal, AccessPolicy: obj.Spec.PolicyActionsConfigMapData, - BucketContext: map[string]string{}, + BucketContext: obj.Spec.Parameters, } switch bucket.Spec.Protocol.Name { @@ -148,7 +148,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc // Only update the principal in the BucketAccess if it wasn't set because // that means that the provisioner created one - if len(obj.Spec.Principal) == 0 { + if len(obj.Spec.Principal) == 0 && obj.Spec.ServiceAccount == nil { err = bal.updatePrincipal(ctx, obj.Name, rsp) if err != nil { return err @@ -158,8 +158,8 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc // Only create the secret with credentials if serviveAccount isn't set. // If serviceAccount is set then authorization happens out of band in the // cloud provider - if len(obj.Spec.ServiceAccount) == 0 { - secret := v1.Secret{ + if obj.Spec.ServiceAccount == nil { + secret := corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: generateSecretName(obj.UID), }, @@ -167,13 +167,16 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc "CredentialsFilePath": rsp.CredentialsFilePath, "CredentialsFileContents": rsp.CredentialsFileContents, }, - Type: v1.SecretTypeOpaque, + Type: corev1.SecretTypeOpaque, } + // It's unlikely but should probably handle retries on rare case of collision _, err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Create(ctx, &secret, metav1.CreateOptions{}) if err != nil { return err } + + // TODO update the mintedSecretName in the BA } // update bucket access status to granted @@ -203,7 +206,7 @@ func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.Bucke req := osspec.ProvisionerRevokeBucketAccessRequest{ Principal: obj.Spec.Principal, - BucketContext: map[string]string{}, + BucketContext: obj.Spec.Parameters, } switch bucket.Spec.Protocol.Name { @@ -234,7 +237,9 @@ func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.Bucke klog.V(1).Infof("provisioner returned revoke bucket access response %v", rsp) // Delete the secret - if len(obj.Spec.ServiceAccount) == 0 { + if obj.Spec.ServiceAccount == nil { + // TODO get the minted secret name from the BA + // It's unlikely but should probably handle retries on rare case of collision err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Delete(ctx, generateSecretName(obj.UID), metav1.DeleteOptions{}) if err != nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go index 65489b2a..41884105 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -28,6 +28,7 @@ import ( osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -118,6 +119,8 @@ func TestAdd(t *testing.T) { generatedPrincipal := "driverPrincipal" sa := "serviceAccount" mpc := struct{ fakespec.MockProvisionerClient }{} + extraParamName := "ParamName" + extraParamValue := "ParamValue" testCases := []struct { name string @@ -126,6 +129,7 @@ func TestAdd(t *testing.T) { grantFunc func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) principal string serviceAccount string + params map[string]string }{ { name: "S3", @@ -158,6 +162,9 @@ func TestAdd(t *testing.T) { if in.BucketContext["Endpoint"] != endpoint { t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, CredentialsFileContents: credsContents, @@ -166,6 +173,9 @@ func TestAdd(t *testing.T) { }, principal: principal, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "GCS", @@ -194,6 +204,9 @@ func TestAdd(t *testing.T) { if in.BucketContext["ProjectID"] != projID { t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, CredentialsFileContents: credsContents, @@ -202,6 +215,9 @@ func TestAdd(t *testing.T) { }, principal: principal, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "AzureBlob", @@ -222,6 +238,9 @@ func TestAdd(t *testing.T) { if in.BucketContext["StorageAccount"] != account { t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, CredentialsFileContents: credsContents, @@ -230,6 +249,9 @@ func TestAdd(t *testing.T) { }, principal: principal, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "No Principal", @@ -252,6 +274,9 @@ func TestAdd(t *testing.T) { }, principal: "", serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "ServiceAccount exists", @@ -274,6 +299,9 @@ func TestAdd(t *testing.T) { }, principal: principal, serviceAccount: sa, + params: map[string]string{ + extraParamName: extraParamValue, + }, }, } @@ -297,10 +325,16 @@ func TestAdd(t *testing.T) { BucketInstanceName: instanceName, Provisioner: provisioner, Principal: tc.principal, - ServiceAccount: tc.serviceAccount, + Parameters: tc.params, }, } + if len(tc.serviceAccount) > 0 { + ba.Spec.ServiceAccount = &corev1.ObjectReference{ + Name: tc.serviceAccount, + } + } + ctx := context.TODO() tc.setProtocol(&b) client := fakebucketclientset.NewSimpleClientset(&ba, &b) @@ -383,6 +417,8 @@ func TestDelete(t *testing.T) { endpoint := "endpoint1" instanceName := "instance" mpc := struct{ fakespec.MockProvisionerClient }{} + extraParamName := "ParamName" + extraParamValue := "ParamValue" testCases := []struct { name string @@ -390,6 +426,7 @@ func TestDelete(t *testing.T) { protocolName v1alpha1.ProtocolName revokeFunc func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) serviceAccount string + params map[string]string }{ { name: "S3", @@ -422,9 +459,15 @@ func TestDelete(t *testing.T) { if in.BucketContext["Endpoint"] != endpoint { t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "GCS", @@ -453,9 +496,15 @@ func TestDelete(t *testing.T) { if in.BucketContext["ProjectID"] != projID { t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "AzureBlob", @@ -476,9 +525,15 @@ func TestDelete(t *testing.T) { if in.BucketContext["StorageAccount"] != account { t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, serviceAccount: "", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, { name: "service account exists", @@ -511,9 +566,15 @@ func TestDelete(t *testing.T) { if in.BucketContext["Endpoint"] != endpoint { t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, serviceAccount: "serviceAccount", + params: map[string]string{ + extraParamName: extraParamValue, + }, }, } @@ -537,12 +598,18 @@ func TestDelete(t *testing.T) { BucketInstanceName: instanceName, Provisioner: provisioner, Principal: principal, - ServiceAccount: tc.serviceAccount, + Parameters: tc.params, }, Status: v1alpha1.BucketAccessStatus{ AccessGranted: true, }, } + + if len(tc.serviceAccount) > 0 { + ba.Spec.ServiceAccount = &corev1.ObjectReference{ + Name: tc.serviceAccount, + } + } secretName := generateSecretName(ba.UID) secret := v1.Secret{ ObjectMeta: metav1.ObjectMeta{ From 0ce8819c03fae3873f80c2cbdc8240afcf19df5a Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Tue, 8 Dec 2020 19:39:46 -0500 Subject: [PATCH 140/299] Added bucket controller --- .../controller/bucket/bucket_controller.go | 200 ++++++++ .../bucket/bucket_controller_test.go | 481 ++++++++++++++++++ 2 files changed, 681 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go new file mode 100644 index 00000000..943c4dac --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -0,0 +1,200 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bucket + +import ( + "context" + "fmt" + "strings" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" + "k8s.io/client-go/util/workqueue" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" + "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + + osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + + "k8s.io/klog" + + "golang.org/x/time/rate" +) + +// bucketListener manages Bucket objects +type bucketListener struct { + kubeClient kubeclientset.Interface + bucketClient bucketclientset.Interface + provisionerClient osspec.ProvisionerClient + + // The name of the provisioner for which this controller dynamically + // provisions buckets. + provisionerName string + kubeVersion *utilversion.Version +} + +// NewBucketController returns a controller that manages Bucket objects +func NewBucketController(provisionerName string, client osspec.ProvisionerClient) (*controller.ObjectStorageController, error) { + rateLimit := workqueue.NewMaxOfRateLimiter( + workqueue.NewItemExponentialFailureRateLimiter(5*time.Second, 60*time.Minute), + &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ) + + identity := fmt.Sprintf("object-storage-sidecar-%s", provisionerName) + bc, err := controller.NewObjectStorageController(identity, "bucket-controller", 5, rateLimit) + if err != nil { + return nil, err + } + + bl := bucketListener{ + provisionerName: provisionerName, + provisionerClient: client, + } + bc.AddBucketListener(&bl) + + return bc, nil +} + +// InitializeKubeClient initializes the kubernetes client +func (bl *bucketListener) InitializeKubeClient(k kubeclientset.Interface) { + bl.kubeClient = k + + serverVersion, err := k.Discovery().ServerVersion() + if err != nil { + klog.Errorf("unable to get server version: %v", err) + } else { + bl.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + } +} + +// InitializeBucketClient initializes the object storage bucket client +func (bl *bucketListener) InitializeBucketClient(bc bucketclientset.Interface) { + bl.bucketClient = bc +} + +// Add will call the provisioner and add a bucket +func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { + klog.V(1).Infof("bucketListener: add called for bucket %s", obj.Name) + + // Verify this bucket is for this provisioner + if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { + return nil + } + + req := osspec.ProvisionerCreateBucketRequest{ + BucketName: obj.Name, + BucketContext: obj.Spec.Parameters, + } + + req.BucketContext["ProtocolVersion"] = obj.Spec.Protocol.Version + + if obj.Spec.AnonymousAccessMode.Private { + req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_PRIVATE + } else if obj.Spec.AnonymousAccessMode.PublicReadOnly { + req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_READ_ONLY + } else if obj.Spec.AnonymousAccessMode.PublicReadWrite { + req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_WRITE_ONLY + } else if obj.Spec.AnonymousAccessMode.PublicWriteOnly { + req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_READ_WRITE + } + + // TODO set grpc timeout + rsp, err := bl.provisionerClient.ProvisionerCreateBucket(ctx, &req) + if err != nil { + klog.Errorf("error calling ProvisionerCreateBucket: %v", err) + return err + } + klog.V(1).Infof("provisioner returned create bucket response %v", rsp) + + // TODO update the bucket protocol in the bucket spec + + // update bucket availability to true + return bl.updateStatus(ctx, obj.Name, "Bucket Provisioned", true) +} + +// Update does nothing +func (bl *bucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { + klog.V(1).Infof("bucketListener: update called for bucket %s", old.Name) + return nil +} + +// Delete will call the provisioner and delete a bucket +func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) error { + klog.V(1).Infof("bucketListener: delete called for bucket %s", obj.Name) + + // Verify this bucket is for this provisioner + if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { + return nil + } + + req := osspec.ProvisionerDeleteBucketRequest{ + BucketContext: obj.Spec.Parameters, + } + + switch obj.Spec.Protocol.Name { + case v1alpha1.ProtocolNameS3: + req.BucketName = obj.Spec.Protocol.S3.BucketName + req.BucketContext["Region"] = obj.Spec.Protocol.S3.Region + req.BucketContext["SignatureVersion"] = string(obj.Spec.Protocol.S3.SignatureVersion) + req.BucketContext["Endpoint"] = obj.Spec.Protocol.S3.Endpoint + case v1alpha1.ProtocolNameAzure: + req.BucketName = obj.Spec.Protocol.AzureBlob.ContainerName + req.BucketContext["StorageAccount"] = obj.Spec.Protocol.AzureBlob.StorageAccount + case v1alpha1.ProtocolNameGCS: + req.BucketName = obj.Spec.Protocol.GCS.BucketName + req.BucketContext["ServiceAccount"] = obj.Spec.Protocol.GCS.ServiceAccount + req.BucketContext["PrivateKeyName"] = obj.Spec.Protocol.GCS.PrivateKeyName + req.BucketContext["ProjectID"] = obj.Spec.Protocol.GCS.ProjectID + default: + return fmt.Errorf("unknown protocol: %s", obj.Spec.Protocol.Name) + } + + req.BucketContext["ProtocolVersion"] = obj.Spec.Protocol.Version + + // TODO set grpc timeout + rsp, err := bl.provisionerClient.ProvisionerDeleteBucket(ctx, &req) + if err != nil { + klog.Errorf("error calling ProvisionerDeleteBucket: %v", err) + obj.Status.Message = "Bucket Deleting" + obj.Status.BucketAvailable = false + _, err = bl.bucketClient.ObjectstorageV1alpha1().Buckets().UpdateStatus(ctx, obj, metav1.UpdateOptions{}) + return err + } + klog.V(1).Infof("provisioner returned delete bucket response %v", rsp) + + // update bucket availability to false + return bl.updateStatus(ctx, obj.Name, "Bucket Deleted", false) +} + +func (bl *bucketListener) updateStatus(ctx context.Context, name, msg string, state bool) error { + err := retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucket, err := bl.bucketClient.ObjectstorageV1alpha1().Buckets().Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return err + } + bucket.Status.Message = msg + bucket.Status.BucketAvailable = state + _, err = bl.bucketClient.ObjectstorageV1alpha1().Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}) + return err + }) + return err +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go new file mode 100644 index 00000000..219ed1bb --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go @@ -0,0 +1,481 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bucket + +import ( + "context" + "reflect" + "testing" + + "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + + fakebucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + + osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" + + corev1 "k8s.io/api/core/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/version" + + fakediscovery "k8s.io/client-go/discovery/fake" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" + + "google.golang.org/grpc" +) + +func TestInitializeKubeClient(t *testing.T) { + client := fakekubeclientset.NewSimpleClientset() + fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) + if !ok { + t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") + } + + fakeVersion := &version.Info{ + GitVersion: "v1.0.0", + } + fakeDiscovery.FakedServerVersion = fakeVersion + + bl := bucketListener{} + bl.InitializeKubeClient(client) + + if bl.kubeClient == nil { + t.Errorf("kubeClient was nil") + } + + expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) + if !reflect.DeepEqual(expected, bl.kubeVersion) { + t.Errorf("expected %+v, but got %+v", expected, bl.kubeVersion) + } +} + +func TestInitializeBucketClient(t *testing.T) { + client := fakebucketclientset.NewSimpleClientset() + + bl := bucketListener{} + bl.InitializeBucketClient(client) + + if bl.bucketClient == nil { + t.Errorf("bucketClient was nil") + } +} + +func TestAddWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.MockProvisionerClient }{} + mpc.CreateBucket = func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bl := bucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bl.Add(ctx, &b) + if err != nil { + t.Errorf("error returned: %+v", err) + } +} + +func TestAddValidProtocols(t *testing.T) { + provisioner := "provisioner1" + region := "region1" + bucketName := "bucket1" + protocolVersion := "proto1" + sigVersion := v1alpha1.S3SignatureVersionV2 + account := "account1" + keyName := "keyName1" + projID := "id1" + anonAccess := "BUCKET_PRIVATE" + mpc := struct{ fakespec.MockProvisionerClient }{} + + testCases := []struct { + name string + protocolName v1alpha1.ProtocolName + createFunc func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) + params map[string]string + }{ + { + name: "S3", + protocolName: v1alpha1.ProtocolNameS3, + createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + return &osspec.ProvisionerCreateBucketResponse{}, nil + }, + params: map[string]string{ + "Region": region, + "SignatureVersion": string(sigVersion), + }, + }, + { + name: "GCS", + protocolName: v1alpha1.ProtocolNameGCS, + createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["ServiceAccount"] != account { + t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) + } + if in.BucketContext["PrivateKeyName"] != keyName { + t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) + } + if in.BucketContext["ProjectID"] != projID { + t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerCreateBucketResponse{}, nil + }, + params: map[string]string{ + "ServiceAccount": account, + "PrivateKeyName": keyName, + "ProjectID": projID, + }, + }, + { + name: "AzureBlob", + protocolName: v1alpha1.ProtocolNameAzure, + createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["StorageAccount"] != account { + t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerCreateBucketResponse{}, nil + }, + params: map[string]string{ + "StorageAccount": account, + }, + }, + { + name: "AnonymousAccessMode", + protocolName: v1alpha1.ProtocolNameAzure, + createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["StorageAccount"] != account { + t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + } + aMode := osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode(osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode_value[anonAccess]) + if in.AnonymousBucketAccessMode != aMode { + t.Errorf("expected %s, got %s", aMode, in.AnonymousBucketAccessMode) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerCreateBucketResponse{}, nil + }, + params: map[string]string{ + "StorageAccount": account, + "AnonymousAccessMode": anonAccess, + }, + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketName, + }, + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{ + RequestedProtocol: v1alpha1.RequestedProtocol{ + Name: tc.protocolName, + Version: protocolVersion, + }, + }, + Parameters: tc.params, + }, + } + + ctx := context.TODO() + client := fakebucketclientset.NewSimpleClientset(&b) + kubeClient := fakekubeclientset.NewSimpleClientset() + mpc.CreateBucket = tc.createFunc + bl := bucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketClient: client, + kubeClient: kubeClient, + } + + t.Logf("Testing protocol %s", tc.name) + err := bl.Add(ctx, &b) + if err != nil { + t.Errorf("add returned: %+v", err) + } + + updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) + if updatedB.Status.BucketAvailable != true { + t.Errorf("expected %t, got %t", true, b.Status.BucketAvailable) + } + } +} + +func TestDeleteWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.MockProvisionerClient }{} + mpc.DeleteBucket = func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bl := bucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bl.Delete(ctx, &b) + if err != nil { + t.Errorf("error returned: %+v", err) + } +} + +func TestDeleteValidProtocols(t *testing.T) { + provisioner := "provisioner1" + region := "region1" + bucketName := "bucket1" + protocolVersion := "proto1" + sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) + account := "account1" + keyName := "keyName1" + projID := "id1" + endpoint := "endpoint1" + mpc := struct{ fakespec.MockProvisionerClient }{} + extraParamName := "ParamName" + extraParamValue := "ParamValue" + + testCases := []struct { + name string + setProtocol func(b *v1alpha1.Bucket) + protocolName v1alpha1.ProtocolName + deleteFunc func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) + params map[string]string + }{ + { + name: "S3", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerDeleteBucketResponse{}, nil + }, + params: map[string]string{ + extraParamName: extraParamValue, + }, + }, + { + name: "GCS", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ + ServiceAccount: account, + PrivateKeyName: keyName, + ProjectID: projID, + BucketName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameGCS, + deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["ServiceAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + } + if in.BucketContext["PrivateKeyName"] != keyName { + t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + } + if in.BucketContext["ProjectID"] != projID { + t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerDeleteBucketResponse{}, nil + }, + params: map[string]string{ + extraParamName: extraParamValue, + }, + }, + { + name: "AzureBlob", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ + StorageAccount: account, + ContainerName: bucketName, + } + }, + protocolName: v1alpha1.ProtocolNameAzure, + deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["StorageAccount"] != account { + t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + } + if in.BucketContext[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerDeleteBucketResponse{}, nil + }, + params: map[string]string{ + extraParamName: extraParamValue, + }, + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{ + RequestedProtocol: v1alpha1.RequestedProtocol{ + Name: tc.protocolName, + Version: protocolVersion, + }, + }, + Parameters: tc.params, + }, + Status: v1alpha1.BucketStatus{ + BucketAvailable: true, + }, + } + + ctx := context.TODO() + client := fakebucketclientset.NewSimpleClientset(&b) + mpc.DeleteBucket = tc.deleteFunc + bl := bucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketClient: client, + } + + tc.setProtocol(&b) + t.Logf("Testing protocol %s", tc.name) + err := bl.Delete(ctx, &b) + if err != nil { + t.Errorf("delete returned: %+v", err) + } + + updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) + if updatedB.Status.BucketAvailable != false { + t.Errorf("expected %t, got %t", false, b.Status.BucketAvailable) + } + } +} + +func TestDeleteInvalidProtocol(t *testing.T) { + const ( + protocolName v1alpha1.ProtocolName = "invalid" + ) + + bucketName := "bucket1" + provisioner := "provisioner1" + + bl := bucketListener{ + provisionerName: provisioner, + } + + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + BucketRequest: &corev1.ObjectReference{ + Name: bucketName, + }, + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{ + RequestedProtocol: v1alpha1.RequestedProtocol{ + Name: protocolName, + }, + }, + }, + } + + ctx := context.TODO() + err := bl.Delete(ctx, &b) + if err == nil { + t.Errorf("invalidProtocol: no error returned") + } +} From 657207994aa3ffaba421a94fe196c1de851a73f8 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Fri, 18 Dec 2020 20:09:46 -0500 Subject: [PATCH 141/299] Added binary source and build target --- .../Makefile | 3 +- .../app/objectstorage-sidecar.go | 106 ++++++++++++++++++ .../cmd/objectstorage-sidecar/main.go | 30 +++++ .../go.mod | 1 + .../go.sum | 2 + .../controller/bucket/bucket_controller.go | 2 +- .../bucketaccess/bucket_access_controller.go | 2 +- 7 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 123b1cfa..19748da1 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +CMDS=objectstorage-sidecar + all: reltools build .PHONY: reltools reltools: release-tools/build.make @@ -23,6 +25,5 @@ release-tools/build.make: $(shell rm -rf ${TMP}) ln -s release-tools/travis.yml travis.yml -#CMDS=provisioner-sidecar include release-tools/build.make diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go new file mode 100644 index 00000000..22460011 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -0,0 +1,106 @@ +package app + +import ( + "context" + "os" + "time" + + "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket" + "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess" + "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient" + + osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + + "github.com/spf13/cobra" + + "google.golang.org/grpc" + + "k8s.io/klog" +) + +const ( + // Interval of logging connection errors + connectionLoggingInterval = 10 * time.Second + defaultDriverAddress = "tcp://0.0.0.0:9000" +) + +// SidecarOptions defines the options +type SidecarOptions struct { + driverAddress string +} + +// NewSidecarOptions returns an initialized SidecarOptions instance +func NewSidecarOptions() *SidecarOptions { + return &SidecarOptions{driverAddress: defaultDriverAddress} +} + +// Run starts the sidecar with the configured options +func (so *SidecarOptions) Run() { + klog.V(1).Infof("attempting to open a gRPC connection with: %q", so.driverAddress) + grpcClient, err := grpcclient.NewGRPCClient(so.driverAddress, []grpc.DialOption{}, nil) + if err != nil { + klog.Errorf("error creating GRPC Client: %v", err) + os.Exit(1) + } + + grpcConn, err := grpcClient.ConnectWithLogging(connectionLoggingInterval) + if err != nil { + klog.Errorf("error connecting to COSI driver: %v", err) + os.Exit(1) + } + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + klog.V(1).Infof("creating provisioner client") + provisionerClient := osspec.NewProvisionerClient(grpcConn) + + klog.Infof("discovering driver name") + req := osspec.ProvisionerGetInfoRequest{} + rsp, err := provisionerClient.ProvisionerGetInfo(ctx, &req) + if err != nil { + klog.Errorf("error calling ProvisionerGetInfo: %v", err) + os.Exit(1) + } + + provisionerName := rsp.Name + // TODO: Register provisioner using internal type + klog.Info("This sidecar is working with the driver identified as: ", provisionerName) + + so.startControllers(ctx, provisionerName, provisionerClient) + <-ctx.Done() +} + +func (so *SidecarOptions) startControllers(ctx context.Context, name string, client osspec.ProvisionerClient) { + bucketController, err := bucket.NewBucketController(name, client) + if err != nil { + klog.Fatalf("Error creating bucket controller: %v", err) + } + + bucketAccessController, err := bucketaccess.NewBucketAccessController(name, client) + if err != nil { + klog.Fatalf("Error creating bucket access controller: %v", err) + } + + go bucketController.Run(ctx) + go bucketAccessController.Run(ctx) +} + +// NewControllerManagerCommand creates a *cobra.Command object with default parameters +func NewControllerManagerCommand() *cobra.Command { + opts := NewSidecarOptions() + + cmd := &cobra.Command{ + Use: "objectstorage-sidecar", + DisableFlagsInUseLine: true, + Short: "", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + opts.Run() + }, + } + + cmd.Flags().StringVarP(&opts.driverAddress, "connect-address", "c", opts.driverAddress, "The address that the sidecar should connect to") + + return cmd +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go new file mode 100644 index 00000000..f3e70472 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go @@ -0,0 +1,30 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "os" + + "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app" +) + +func main() { + command := app.NewControllerManagerCommand() + if err := command.Execute(); err != nil { + os.Exit(1) + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 243d18ab..f057e324 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -6,6 +6,7 @@ require ( github.com/kubernetes-csi/csi-lib-utils v0.9.0 github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28 github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 + github.com/spf13/cobra v0.0.5 golang.org/x/net v0.0.0-20200707034311-ab3426394381 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 google.golang.org/grpc v1.34.0 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 321a71f8..e322628e 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -233,6 +233,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -342,6 +343,7 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go index 943c4dac..21ded69c 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -59,7 +59,7 @@ func NewBucketController(provisionerName string, client osspec.ProvisionerClient &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, ) - identity := fmt.Sprintf("object-storage-sidecar-%s", provisionerName) + identity := fmt.Sprintf("objectstorage-sidecar-%s", provisionerName) bc, err := controller.NewObjectStorageController(identity, "bucket-controller", 5, rateLimit) if err != nil { return nil, err diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index d1a3f795..885d0927 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -66,7 +66,7 @@ func NewBucketAccessController(provisionerName string, client osspec.Provisioner &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, ) - identity := fmt.Sprintf("object-storage-sidecar-%s", provisionerName) + identity := fmt.Sprintf("objectstorage-sidecar-%s", provisionerName) bc, err := controller.NewObjectStorageController(identity, "bucket-access-controller", 5, rateLimit) if err != nil { return nil, err From 88ca9caee2c7c2dfdf0b084aad38f2cdb05c5a51 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Tue, 5 Jan 2021 11:12:52 -0800 Subject: [PATCH 142/299] Fix the build files so that prow job can run successfully --- container-object-storage-interface-controller/Dockerfile | 4 ++-- .../deploy/base/rbac.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/Dockerfile b/container-object-storage-interface-controller/Dockerfile index c080f91a..3d388720 100644 --- a/container-object-storage-interface-controller/Dockerfile +++ b/container-object-storage-interface-controller/Dockerfile @@ -2,5 +2,5 @@ FROM gcr.io/distroless/static:latest LABEL maintainers="Kubernetes Authors" LABEL description="COSI Controller" -COPY ./bin/cosi-controller-manager cosi-controller-manager -ENTRYPOINT ["/cosi-controller-manager"] +COPY ./bin/controller-manager controller-manager +ENTRYPOINT ["/controller-manager"] diff --git a/container-object-storage-interface-controller/deploy/base/rbac.yaml b/container-object-storage-interface-controller/deploy/base/rbac.yaml index fc60d1bd..7ebebfe4 100644 --- a/container-object-storage-interface-controller/deploy/base/rbac.yaml +++ b/container-object-storage-interface-controller/deploy/base/rbac.yaml @@ -3,6 +3,7 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller-role + namespace: default labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -25,7 +26,8 @@ rules: kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: system:objectstorage-controller + name: objectstorage-controller + namespace: default labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -34,6 +36,7 @@ metadata: subjects: - kind: ServiceAccount name: objectstorage-controller-sa + namespace: default roleRef: kind: ClusterRole name: objectstorage-controller-role @@ -43,6 +46,7 @@ kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller + namespace: default labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -57,6 +61,7 @@ kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-controller + namespace: default labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller @@ -65,6 +70,7 @@ metadata: subjects: - kind: ServiceAccount name: objectstorage-controller-sa + namespace: default roleRef: kind: Role name: objectstorage-controller From d10a68fa03c432406b18c1001a8cb6e15466ba80 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Wed, 6 Jan 2021 18:10:30 -0500 Subject: [PATCH 143/299] Added Dockerfile for sidecar --- .../Dockerfile | 6 ++++++ .../cmd/objectstorage-sidecar/app/objectstorage-sidecar.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/Dockerfile diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile new file mode 100644 index 00000000..78f5ebc0 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:latest +LABEL maintainers="Kubernetes Authors" +LABEL description="Object Storage Sidecar" + +COPY ./bin/objectstorage-sidecar objectstorage-sidecar +ENTRYPOINT ["/objectstorage-sidecar"] diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index 22460011..9420843d 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -24,7 +24,7 @@ const ( defaultDriverAddress = "tcp://0.0.0.0:9000" ) -// SidecarOptions defines the options +// SidecarOptions defines the options for running the sidecar type SidecarOptions struct { driverAddress string } From fdf735b04b9140c9462b6d8ba2ab4878e634806d Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Mon, 11 Jan 2021 15:20:51 -0500 Subject: [PATCH 144/299] added kustomize template & k8s resources for provisioner --- .../kustomization.yaml | 22 +++++++ .../resources/deployment.yaml | 62 +++++++++++++++++++ .../resources/ns.yaml | 10 +++ .../resources/rbac.yaml | 37 +++++++++++ .../resources/sa.yaml | 11 ++++ .../resources/secret.yaml | 19 ++++++ 6 files changed, 161 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/kustomization.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/ns.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/sa.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/secret.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml new file mode 100644 index 00000000..cbf96c30 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: objectstorage-provisioner-ns + +commonAnnotations: + cosi.storage.k8s.io/authors: "Kubernetes Authors" + cosi.storage.k8s.io/license: "Apache V2" + cosi.storage.k8s.io/support: "https://github.com/kubernetes-sigs/container-object-storage-api" + +commonLabels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner + +resources: +- resources/ns.yaml +- resources/sa.yaml +- resources/rbac.yaml +- resources/secret.yaml +- resources/deployment.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml new file mode 100644 index 00000000..b5eae6e7 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -0,0 +1,62 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: objectstorage-provisioner + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner +spec: + replicas: 1 + minReadySeconds: 30 + progressDeadlineSeconds: 600 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + selector: + matchLabels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/name: container-object-storage-interface-provisioner + template: + metadata: + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/name: container-object-storage-interface-provisioner + app.kubernetes.io/version: main + spec: + serviceAccountName: objectstorage-provisioner-sa + containers: + - name: objectstorage-sample-driver + image: quay.io/containerobjectstorage/objectstorage-sample-driver:latest + resources: + limits: + cpu: 1 + memory: 1Gi + requests: + cpu: 100m + memory: 100Mi + envFrom: + - secretRef: + name: objectstorage-provisioner + - name: objectstorage-provisioner-sidecar + image: quay.io/containerobjectstorage/objectstorage-provisioner-sidecar:latest + resources: + limits: + cpu: 1 + memory: 1Gi + requests: + cpu: 100m + memory: 100Mi + env: + - name: CONNECT_ADDRESS + valueFrom: + secretKeyRef: + name: objectstorage-provisioner + key: LISTEN_ADDRESS diff --git a/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml b/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml new file mode 100644 index 00000000..0b56bf7a --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: objectstorage-provisioner-ns + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml new file mode 100644 index 00000000..f9335105 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml @@ -0,0 +1,37 @@ +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: objectstorage-provisioner-role + namespace: objectstorage-provisioner-ns + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner +rules: +- apiGroups: ["objectstorage.k8s.io"] + resources: ["buckets", "bucketaccess"] + verbs: ["get", "list", "watch", "update", "create", "delete"] +- apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: objectstorage-provisioner-role-binding + namespace: objectstorage-provisioner-ns + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner +subjects: + - kind: ServiceAccount + name: objectstorage-provisioner-sa + namespace: objectstorage-provisioner-ns +roleRef: + kind: ClusterRole + name: objectstorage-provisioner-role + apiGroup: rbac.authorization.k8s.io diff --git a/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml b/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml new file mode 100644 index 00000000..d3798f5f --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: objectstorage-provisioner-sa + namespace: objectstorage-provisioner-ns + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml new file mode 100644 index 00000000..92479f5e --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: objectstorage-provisioner + namespace: objectstorage-provisioner-ns + labels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: provisioner + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-provisioner +type: Opaque +stringData: + LISTEN_ADDRESS: 0.0.0.0:9000 +data: + # set to space + S3_ENDPOINT: IA== + ACCESS_KEY: IA== + SECRET_KEY: IA== From e0d9d97f82254983d58a2d0972133e53ce16ba06 Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Mon, 11 Jan 2021 19:12:13 -0500 Subject: [PATCH 145/299] Fix context definition --- .../cmd/objectstorage-sidecar/app/objectstorage-sidecar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index 9420843d..23fcd477 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -49,7 +49,7 @@ func (so *SidecarOptions) Run() { os.Exit(1) } - ctx, cancel := context.WithTimeout(context.Background(), time.Second) + ctx, cancel := context.WithCancel(context.Background()) defer cancel() klog.V(1).Infof("creating provisioner client") From e728f50bcf5872118e7d66649abf3f2646fe3d28 Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Tue, 12 Jan 2021 15:49:28 -0500 Subject: [PATCH 146/299] Refactor Kustomize templates This PR removes the fullstack kustomize template and simplifies the base deploy of controller. Kustomize will now only deploy controller resources. --- .../deploy/base/kustomization.yaml | 13 ------------- .../deploy/fullstack/controller/kustomization.yaml | 12 ------------ .../deploy/fullstack/controller/ns.yaml | 5 ----- .../deploy/fullstack/kustomization.yaml | 7 ------- .../fullstack/provisioner/kustomization.yaml | 11 ----------- .../deploy/fullstack/provisioner/ns.yaml | 5 ----- .../kustomization.yaml | 14 ++++++++++++++ .../{deploy/base => resources}/deployment.yaml | 1 + .../{deploy/base => resources}/rbac.yaml | 0 .../{deploy/base => resources}/sa.yaml | 0 10 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 container-object-storage-interface-controller/deploy/base/kustomization.yaml delete mode 100644 container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml delete mode 100644 container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml delete mode 100644 container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml delete mode 100644 container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml delete mode 100644 container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml create mode 100644 container-object-storage-interface-controller/kustomization.yaml rename container-object-storage-interface-controller/{deploy/base => resources}/deployment.yaml (96%) rename container-object-storage-interface-controller/{deploy/base => resources}/rbac.yaml (100%) rename container-object-storage-interface-controller/{deploy/base => resources}/sa.yaml (100%) diff --git a/container-object-storage-interface-controller/deploy/base/kustomization.yaml b/container-object-storage-interface-controller/deploy/base/kustomization.yaml deleted file mode 100644 index 100cd953..00000000 --- a/container-object-storage-interface-controller/deploy/base/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -# CRDs -- github.com/kubernetes-sigs/container-object-storage-interface-api/crds - -resources: -# Controller -- sa.yaml -- rbac.yaml -- deployment.yaml diff --git a/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml deleted file mode 100644 index 9a103319..00000000 --- a/container-object-storage-interface-controller/deploy/fullstack/controller/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: objectstorage-system - -bases: -- ../../base/ - -resources: -# Namespace -- ns.yaml diff --git a/container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml b/container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml deleted file mode 100644 index c31ae9c4..00000000 --- a/container-object-storage-interface-controller/deploy/fullstack/controller/ns.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: objectstorage-system diff --git a/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml deleted file mode 100644 index 787fc8da..00000000 --- a/container-object-storage-interface-controller/deploy/fullstack/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- ./controller -- ./provisioner diff --git a/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml b/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml deleted file mode 100644 index 81f1f2eb..00000000 --- a/container-object-storage-interface-controller/deploy/fullstack/provisioner/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: objectstorage-provisioner-ns - -resources: -# Namespace -- ns.yaml -# Sidecar -- https://raw.githubusercontent.com/container-object-storage-interface/cosi-provisioner-sidecar/master/examples/object-storage-sidecar.yaml diff --git a/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml b/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml deleted file mode 100644 index 04eb2ff2..00000000 --- a/container-object-storage-interface-controller/deploy/fullstack/provisioner/ns.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: objectstorage-provisioner-ns diff --git a/container-object-storage-interface-controller/kustomization.yaml b/container-object-storage-interface-controller/kustomization.yaml new file mode 100644 index 00000000..1cb50a7a --- /dev/null +++ b/container-object-storage-interface-controller/kustomization.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonLabels: + app.kubernetes.io/part-of: container-object-storage-interface + app.kubernetes.io/component: controller + app.kubernetes.io/version: main + app.kubernetes.io/name: container-object-storage-interface-controller + +resources: +- resources/sa.yaml +- resources/rbac.yaml +- resources/deployment.yaml diff --git a/container-object-storage-interface-controller/deploy/base/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml similarity index 96% rename from container-object-storage-interface-controller/deploy/base/deployment.yaml rename to container-object-storage-interface-controller/resources/deployment.yaml index 30c09225..ac8fc2a7 100644 --- a/container-object-storage-interface-controller/deploy/base/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -18,6 +18,7 @@ spec: matchLabels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: controller + app.kubernetes.io/version: main app.kubernetes.io/name: container-object-storage-interface-controller template: metadata: diff --git a/container-object-storage-interface-controller/deploy/base/rbac.yaml b/container-object-storage-interface-controller/resources/rbac.yaml similarity index 100% rename from container-object-storage-interface-controller/deploy/base/rbac.yaml rename to container-object-storage-interface-controller/resources/rbac.yaml diff --git a/container-object-storage-interface-controller/deploy/base/sa.yaml b/container-object-storage-interface-controller/resources/sa.yaml similarity index 100% rename from container-object-storage-interface-controller/deploy/base/sa.yaml rename to container-object-storage-interface-controller/resources/sa.yaml From f665a91251b9847c82c7e732e91043247ace1a95 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 12 Jan 2021 12:53:03 -0800 Subject: [PATCH 147/299] fix sidecar image name --- .../resources/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index b5eae6e7..06d15184 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -46,7 +46,7 @@ spec: - secretRef: name: objectstorage-provisioner - name: objectstorage-provisioner-sidecar - image: quay.io/containerobjectstorage/objectstorage-provisioner-sidecar:latest + image: quay.io/containerobjectstorage/objectstorage-sidecar:latest resources: limits: cpu: 1 From 42d07baee7a6ae3c38691df0425be7ff698888ac Mon Sep 17 00:00:00 2001 From: Sajan Jaiswal Date: Tue, 12 Jan 2021 13:30:32 -0800 Subject: [PATCH 148/299] add sample driver --- .../cmd/sample-driver/driver-server.go | 142 ++++++++++++++++++ .../cmd/sample-driver/sample-driver.go | 127 ++++++++++++++++ 2 files changed, 269 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go new file mode 100644 index 00000000..5cbb8c86 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go @@ -0,0 +1,142 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + + "github.com/minio/minio-go" + "github.com/minio/minio/pkg/auth" + "github.com/minio/minio/pkg/bucket/policy" + "github.com/minio/minio/pkg/bucket/policy/condition" + iampolicy "github.com/minio/minio/pkg/iam/policy" + "github.com/minio/minio/pkg/madmin" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "k8s.io/klog" + + cosi "github.com/kubernetes-sigs/container-object-storage-interface-spec" +) + +var ( + PROVISIONER_NAME = "sample-provisioner.objectstorage.k8s.io" + VERSION = "dev" +) + +type DriverServer struct { + Name, Version string + S3Client *minio.Client + S3AdminClient *madmin.AdminClient +} + +func (ds *DriverServer) ProvisionerGetInfo(context.Context, *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { + rsp := &cosi.ProvisionerGetInfoResponse{} + rsp.Name = fmt.Sprintf("%s-%s", ds.Name, ds.Version) + return rsp, nil +} + +func (ds DriverServer) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { + klog.Infof("Using minio to create Backend Bucket") + + if ds.Name == "" { + return nil, status.Error(codes.Unavailable, "Driver name not configured") + } + + if ds.Version == "" { + return nil, status.Error(codes.Unavailable, "Driver is missing version") + } + + err := ds.S3Client.MakeBucket(req.BucketName, "") + if err != nil { + // Check to see if the bucket already exists + exists, errBucketExists := ds.S3Client.BucketExists(req.BucketName) + if errBucketExists == nil && exists { + klog.Info("Backend Bucket already exists", req.BucketName) + return &cosi.ProvisionerCreateBucketResponse{}, nil + } else { + klog.Error(err) + return &cosi.ProvisionerCreateBucketResponse{}, err + } + } + klog.Info("Successfully created Backend Bucket", req.BucketName) + + return &cosi.ProvisionerCreateBucketResponse{}, nil +} + +func (ds *DriverServer) ProvisionerDeleteBucket(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { + + if err := ds.S3Client.RemoveBucket(req.BucketName); err != nil { + klog.Info("failed to delete bucket", req.BucketName) + return nil, err + + } + return &cosi.ProvisionerDeleteBucketResponse{}, nil +} + +func (ds *DriverServer) ProvisionerGrantBucketAccess(ctx context.Context, req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + + creds, err := auth.GetNewCredentials() + if err != nil { + klog.Error("failed to generate new credentails") + return nil, err + } + + if err := ds.S3AdminClient.AddUser(context.Background(), creds.AccessKey, creds.SecretKey); err != nil { + klog.Error("failed to create user", err) + return nil, err + } + + // Create policy + p := iampolicy.Policy{ + Version: iampolicy.DefaultVersion, + Statements: []iampolicy.Statement{ + iampolicy.NewStatement( + policy.Allow, + iampolicy.NewActionSet("s3:*"), + iampolicy.NewResourceSet(iampolicy.NewResource(req.GetBucketName()+"/*", "")), + condition.NewFunctions(), + )}, + } + + if err := ds.S3AdminClient.AddCannedPolicy(context.Background(), "s3:*", &p); err != nil { + klog.Error("failed to add canned policy", err) + return nil, err + } + + if err := ds.S3AdminClient.SetPolicy(context.Background(), "s3:*", creds.AccessKey, false); err != nil { + klog.Error("failed to set policy", err) + return nil, err + } + + return &cosi.ProvisionerGrantBucketAccessResponse{ + Principal: req.Principal, + CredentialsFileContents: fmt.Sprintf("[default]\naws_access_key %s\naws_secret_key %s", creds.AccessKey, creds.SecretKey), + CredentialsFilePath: ".aws/credentials", + }, nil +} + +func (ds *DriverServer) ProvisionerRevokeBucketAccess(ctx context.Context, req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { + + // revokes user access to bucket + if err := ds.S3AdminClient.RemoveUser(ctx, req.GetPrincipal()); err != nil { + klog.Error("falied to Revoke Bucket Access") + return nil, err + } + return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go new file mode 100644 index 00000000..1dea7769 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go @@ -0,0 +1,127 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "context" + "flag" + "fmt" + "os" + "os/signal" + "strings" + "syscall" + + "github.com/minio/minio-go" + "github.com/minio/minio/pkg/madmin" + "github.com/spf13/cobra" + "github.com/spf13/viper" + "k8s.io/klog" + + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver" + +) + +var ( + cosiAddress = "tcp://0.0.0.0:9000" + s3Endpoint = "tcp://0.0.0.0:9000" + accessKey = "AKIAIOSFODNN7EXAMPLE" + secretKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" + ctx context.Context +) + +var cmd = &cobra.Command{ + Use: os.Args[0], + Short: "sample provisoner for provisioning bucket instance to the backend bucket", + SilenceErrors: true, + SilenceUsage: true, + RunE: func(c *cobra.Command, args []string) error { + return run(args, cosiAddress) + }, + DisableFlagsInUseLine: true, + Version: VERSION, +} + +func init() { + viper.AutomaticEnv() + + cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine) + flag.Set("logtostderr", "true") + + strFlag := func(c *cobra.Command, ptr *string, name string, short string, dfault string, desc string) { + c.PersistentFlags(). + StringVarP(ptr, name, short, dfault, desc) + } + strFlag(cmd, &cosiAddress, "listen-address", "", cosiAddress, "The address for the driver to listen on") + strFlag(cmd, &s3Endpoint, "s3-endpoint", "", "", "S3-endpont") + strFlag(cmd, &accessKey, "access-key", "", "", "S3-AccessKey") + strFlag(cmd, &secretKey, "secret-key", "", "", "S3-SecretKey") + hideFlag := func(name string) { + cmd.PersistentFlags().MarkHidden(name) + } + hideFlag("alsologtostderr") + hideFlag("log_backtrace_at") + hideFlag("log_dir") + hideFlag("logtostderr") + hideFlag("master") + hideFlag("stderrthreshold") + hideFlag("vmodule") + + // Substitute _ for - + replacer := strings.NewReplacer("-", "_") + viper.SetEnvKeyReplacer(replacer) + + // suppress the incorrect prefix in glog output + flag.CommandLine.Parse([]string{}) + viper.BindPFlags(cmd.PersistentFlags()) + + var cancel context.CancelFunc + + ctx, cancel = context.WithCancel(context.Background()) + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGSEGV) + + go func() { + s := <-sigs + cancel() + klog.Error(fmt.Sprintf("%s %s", s.String(), "Signal received. Exiting")) + }() + +} + +func main() { + if err := cmd.Execute(); err != nil { + klog.Fatal(err.Error()) + + } +} + +func run(args []string, endpoint string) error { + // Initialize minio client object. + minioClient, err := minio.New(s3Endpoint, accessKey, secretKey, false) + if err != nil { + klog.Fatalln(err) + } + minioAdminClient, err := madmin.New(s3Endpoint, accessKey, secretKey, false) + if err != nil { + klog.Fatalln(err) + } + cds := DriverServer{Name: PROVISIONER_NAME, Version: VERSION, S3Client: minioClient, S3AdminClient: minioAdminClient} + s := grpcserver.NewNonBlockingGRPCServer() + s.Start(endpoint, &cds) + s.Wait() + return nil +} From f99bf37da23304bf2797e9f83687541f45ca3361 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 12 Jan 2021 13:32:13 -0800 Subject: [PATCH 149/299] fix go module and import paths --- .../Dockerfile.sample-driver | 6 + .../Makefile | 2 +- .../README.md | 2 +- .../app/objectstorage-sidecar.go | 6 +- .../cmd/objectstorage-sidecar/main.go | 2 +- .../cmd/sample-driver/sample-driver.go | 1 - .../go.mod | 12 +- .../go.sum | 435 +++++++++++++++++- 8 files changed, 451 insertions(+), 15 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver b/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver new file mode 100644 index 00000000..0a8ee41e --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:latest +LABEL maintainers="Kubernetes Authors" +LABEL description="Object Storage Sidecar Sample Driver" + +COPY ./bin/sample-driver /sample-driver +ENTRYPOINT ["/sample-driver"] diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 19748da1..9a6bd2ca 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -CMDS=objectstorage-sidecar +CMDS=objectstorage-sidecar sample-driver all: reltools build .PHONY: reltools diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index a7ae792b..8b4f2ac9 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -4,7 +4,7 @@ COSI repos and images: [API](https://github.com/kubernetes-sigs/container-object-storage-interface-api) \ [Controller](https://github.com/kubernetes-sigs/container-object-storage-interface-controller)
  - [images: cosi-controller](https://quay.io/repository/containerobjectstorage/objectstorage-controller?tab=tags) \ - [Provisioner Sidecar](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar)
+ [Provisioner Sidecar](https://sigs.k8s.io/container-object-storage-interface-provisioner-sidecar)
  - images: cosi-provisioner \ [CSI Adapter](https://github.com/kubernetes-sigs/container-object-storage-interface-csi-adapter)
  - images: cosi-node-adapter diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index 23fcd477..3e44ff74 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -5,9 +5,9 @@ import ( "os" "time" - "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket" - "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess" - "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient" osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go index f3e70472..a2317e33 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go @@ -19,7 +19,7 @@ package main import ( "os" - "github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app" ) func main() { diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go index 1dea7769..b7e37651 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go @@ -32,7 +32,6 @@ import ( "k8s.io/klog" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver" - ) var ( diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index f057e324..106dc385 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -1,13 +1,17 @@ -module github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar +module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.15 require ( + github.com/go-ini/ini v1.62.0 // indirect github.com/kubernetes-csi/csi-lib-utils v0.9.0 - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28 - github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 + github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 + github.com/minio/minio v0.0.0-20210112204746-e09196d62633 + github.com/minio/minio-go v6.0.14+incompatible github.com/spf13/cobra v0.0.5 - golang.org/x/net v0.0.0-20200707034311-ab3426394381 + github.com/spf13/viper v1.3.2 + golang.org/x/net v0.0.0-20201216054612-986b41b23924 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 google.golang.org/grpc v1.34.0 k8s.io/api v0.19.4 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index e322628e..dc58ca42 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -1,6 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -11,21 +12,32 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.10.0/go.mod h1:ep1edmW+kNQx4UfWM9heESNmQdijykocJ0YOxmMX8SE= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.1/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -34,30 +46,62 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.27.2/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/participle v0.2.1/go.mod h1:SW6HZGeZgSIpcUWX3fXpfZhuaWHnmoD5KCVaqSaNTkk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +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= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= +github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= +github.com/coredns/coredns v1.4.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -68,22 +112,38 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d h1:QK8IYltsNy+5QZcDFbVkyInrs98/wHy1tfUTGG91sps= +github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d/go.mod h1:apXo4PA/BgBPrt66j0N45O2stlBTRowdip2igwcUWVc= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.3.0/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -94,6 +154,14 @@ github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +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/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= 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= @@ -102,14 +170,21 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU= +github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -160,8 +235,13 @@ github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72P github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -176,6 +256,7 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -188,6 +269,11 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -196,6 +282,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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= @@ -216,53 +304,131 @@ github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1a github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= +github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= 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= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/readahead v1.3.1/go.mod h1:AH9juHzNH7xqdqFHrMRSHeH2Ps+vFf+kblDqzPFiLJg= +github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo= 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/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 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI= github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28 h1:ZCH6aKd+cWLi66i3tPV6f0dIuFG5Lk9XOxWacnsR8mg= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201217233824-6b4158ff7e28/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3 h1:8uv9nGDukcMLYeg/m9YtTyr2IzXZd5WwUVDBRuJy2Vw= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20201217184109-8cbf84dde8d3/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 h1:SVbl8M9RAoLUqJ83eLxDWVyMHz09CZ+dkUjkR7kG9eo= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 h1:+i43Z3yKW7htLAATafmbZ7ULFwwT+8vwB7NMxZ1X3Ww= +github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -272,14 +438,54 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/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/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= +github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= +github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= +github.com/minio/minio v0.0.0-20210112204746-e09196d62633 h1:N90Nw/JSwaKOg4sHN6AhMkg6/91axNFOao4/K8JJ3K8= +github.com/minio/minio v0.0.0-20210112204746-e09196d62633/go.mod h1:mD4TRSEetR2LyRBs9oKqi5ynFQDyW49vPPLCdP///EY= +github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= +github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= +github.com/minio/minio-go/v7 v7.0.7-0.20210105224719-8dddba43079f h1:XMEV9mP1TMX/lPvhnEH5vAr4AKfF+A9vycTninVcgOA= +github.com/minio/minio-go/v7 v7.0.7-0.20210105224719-8dddba43079f/go.mod h1:pEZBUa+L2m9oECoIA6IcSK8bv/qggtQVLovjeKK5jYc= +github.com/minio/selfupdate v0.3.1/go.mod h1:b8ThJzzH7u2MkF6PcIra7KaXO9Khf6alWPvMSyTDCFM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/simdjson-go v0.1.5/go.mod h1:oKURrZZEBtqObgJrSjN1Ln2n9MJj2icuBTkeJzZnvSI= +github.com/minio/sio v0.2.1/go.mod h1:8b0yPp2avGThviy/+OCJBI6OMpvxoUuiLvE6F1lebhw= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +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/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104/go.mod h1:wqKykBG2QzQDJEzvRkcS8x6MiSJkF52hXZsXcjaB3ls= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -287,56 +493,145 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ 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/montanaflynn/stats v0.5.0 h1:2EkzeTSqBB4V4bJwWrt5gIIrZmpJBcoIRGS2kWLgzmk= +github.com/montanaflynn/stats v0.5.0/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.1.9/go.mod h1:9qVyoewoYXzG1ME9ox0HwkkzyYvnlBDugfR4Gg/8uHU= +github.com/nats-io/nats-streaming-server v0.19.0/go.mod h1:oqrRqpMg84aiPDyroTornjVWNYJKh+6ozh2Mgt8dslE= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.10.0/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nats-io/stan.go v0.7.0/go.mod h1:Ci6mUIpGQTjl++MqK2XzkWI/0vF+Bl72uScx7ejSYmU= +github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4= +github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +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/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/samuel/go-zookeeper v0.0.0-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/secure-io/sio-go v0.3.0 h1:QKGb6rGJeiExac9wSWxnWPYo8O8OFN7lxXQvHshX6vo= +github.com/secure-io/sio-go v0.3.0/go.mod h1:D3KmXgKETffyYxBdFRN+Hpd2WzhzqS0EQwT3XWsAcBU= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto= +github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= +github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= +github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= 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/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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= @@ -354,6 +649,10 @@ 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.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +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/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -362,39 +661,75 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.0.0-20201125193152-8a03d2e9614b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= 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= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -408,20 +743,26 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -434,12 +775,22 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/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-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/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-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= +golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -451,42 +802,71 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -497,6 +877,7 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -506,6 +887,8 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -519,19 +902,32 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +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= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -539,18 +935,27 @@ google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpC google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -572,20 +977,36 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +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.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 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= @@ -595,8 +1016,12 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -638,6 +1063,7 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= @@ -648,3 +1074,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK 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= From de8a4001f1b0847e78814b4bb750b8f41c054ada Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 12 Jan 2021 15:51:32 -0800 Subject: [PATCH 150/299] fix race condition while creating buckets --- .../go.mod | 20 +++++++ .../go.sum | 58 +++++++++++++++++++ .../pkg/bucketrequest/bucketrequest.go | 34 ++++++----- .../pkg/bucketrequest/bucketrequest_test.go | 2 + 4 files changed, 100 insertions(+), 14 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index f1959337..d4d0ac5f 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -4,13 +4,33 @@ go 1.15 require ( github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b + github.com/golang/protobuf v1.4.3 // indirect + github.com/google/go-cmp v0.5.2 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect + github.com/kr/text v0.2.0 // indirect github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 + github.com/mailru/easyjson v0.7.6 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/smartystreets/assertions v1.1.1 // indirect github.com/spf13/cobra v1.1.1 github.com/spf13/viper v1.7.1 + github.com/stretchr/testify v1.6.1 // indirect + golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect + golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/text v0.3.4 // indirect golang.org/x/time v0.0.0-20191024005414-555d28b269f0 + golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e // indirect + gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect + gopkg.in/ini.v1 v1.57.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect k8s.io/api v0.19.4 k8s.io/apiextensions-apiserver v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 + k8s.io/klog/v2 v2.4.0 // indirect + k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 6d6c49cb..df32efaa 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -77,6 +77,7 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -197,6 +198,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -204,6 +207,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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= @@ -215,6 +220,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= 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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -225,6 +232,8 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f h1:4Gslotqbs16iAg+1KR/XdabIfq8TlAWHdwS5QJFksLc= +github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -267,6 +276,8 @@ github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -290,6 +301,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 h1:1Zmlu1GKd1iIv9fdc1mkaTuUtoNqet4NLYLE/8p9ylw= github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -302,6 +315,8 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -331,6 +346,8 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -360,6 +377,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -393,6 +412,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= +github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -426,6 +447,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -438,6 +461,7 @@ github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -468,6 +492,8 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -521,17 +547,23 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/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-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= +golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -557,6 +589,7 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -568,12 +601,20 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -610,10 +651,14 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e h1:Z2uDrs8MyXUWJbwGc4V+nGjV4Ygo+oubBbWSVQw21/I= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -661,6 +706,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= @@ -669,6 +716,8 @@ 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 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -684,6 +733,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -727,12 +779,16 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= @@ -748,6 +804,8 @@ sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= 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= diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index ab126302..f14898ec 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -2,18 +2,18 @@ package bucketrequest import ( "context" - "fmt" "strings" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" "github.com/golang/glog" ) @@ -80,27 +80,33 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont // Most code here is identical to that found in controller.go of kube's controller... bucketClassName := b.GetBucketClass(bucketRequest) - // A previous doProvisionBucketRequest may just have finished while we were waiting for - // the locks. Check that bucket (with deterministic name) hasn't been provisioned - // yet. - bucket := b.FindBucket(ctx, bucketRequest) - if bucket != nil { - // bucket has been already provisioned, nothing to do. - glog.Info("Bucket already exists", bucket.Name) - return util.ErrBucketAlreadyExists - } - bucketClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if bucketClass == nil { // bucketclass does not exist in order to create a bucket return util.ErrInvalidBucketClass } - glog.Infof("Creating Bucket for BucketRequest %v", bucketRequest.Name) + name := bucketRequest.Spec.BucketPrefix + if name != "" { + name = name + "-" + } + name = name + string(bucketRequest.GetUID()) + + bucket, err := b.bucketClient.ObjectstorageV1alpha1().Buckets().Get(context.Background(), name, metav1.GetOptions{}) + if err != nil { + // anything other than 404 + if !errors.IsNotFound(err) { + glog.Errorf("error fetching bucket: %v", err) + return err + } + } else { // if bucket found + return nil + } // create bucket bucket = &v1alpha1.Bucket{} - bucket.Name = fmt.Sprintf("%s%s", bucketRequest.Spec.BucketPrefix, util.GetUUID()) + + bucket.Name = name bucket.Spec.Provisioner = bucketClass.Provisioner bucket.Spec.RetentionPolicy = bucketClass.RetentionPolicy bucket.Spec.AnonymousAccessMode = bucketClass.AnonymousAccessMode diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index 87057e55..0914aba8 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -40,6 +40,7 @@ var bucketRequest1 = types.BucketRequest{ ObjectMeta: metav1.ObjectMeta{ Name: "bucketrequest1", Namespace: "default", + UID: "12345-67890", }, Spec: types.BucketRequestSpec{ BucketPrefix: "cosi", @@ -59,6 +60,7 @@ var bucketRequest2 = types.BucketRequest{ ObjectMeta: metav1.ObjectMeta{ Name: "bucketrequest2", Namespace: "default", + UID: "abcde-fghijk", }, Spec: types.BucketRequestSpec{ BucketPrefix: "cosi", From 74c54f6f8781b555b5eb49f702adbc4b873372ce Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Tue, 12 Jan 2021 19:47:09 -0500 Subject: [PATCH 151/299] Fix handling of nil parameters in B and BA --- .../controller/bucket/bucket_controller.go | 12 ++- .../bucket/bucket_controller_test.go | 53 ++++++++++++- .../bucketaccess/bucket_access_controller.go | 12 ++- .../bucket_access_controller_test.go | 79 +++++++++++++++++++ 4 files changed, 150 insertions(+), 6 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go index 21ded69c..a55328ca 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -102,7 +102,7 @@ func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { req := osspec.ProvisionerCreateBucketRequest{ BucketName: obj.Name, - BucketContext: obj.Spec.Parameters, + BucketContext: bl.getParams(obj), } req.BucketContext["ProtocolVersion"] = obj.Spec.Protocol.Version @@ -147,7 +147,7 @@ func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) erro } req := osspec.ProvisionerDeleteBucketRequest{ - BucketContext: obj.Spec.Parameters, + BucketContext: bl.getParams(obj), } switch obj.Spec.Protocol.Name { @@ -198,3 +198,11 @@ func (bl *bucketListener) updateStatus(ctx context.Context, name, msg string, st }) return err } + +func (bl *bucketListener) getParams(obj *v1alpha1.Bucket) map[string]string { + params := map[string]string{} + if obj.Spec.Parameters != nil { + params = obj.Spec.Parameters + } + return params +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go index 219ed1bb..5df8ca48 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go @@ -212,6 +212,20 @@ func TestAddValidProtocols(t *testing.T) { "AnonymousAccessMode": anonAccess, }, }, + { + name: "Empty parameters", + protocolName: v1alpha1.ProtocolNameS3, + createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerCreateBucketResponse{}, nil + }, + params: nil, + }, } for _, tc := range testCases { @@ -242,7 +256,7 @@ func TestAddValidProtocols(t *testing.T) { kubeClient: kubeClient, } - t.Logf("Testing protocol %s", tc.name) + t.Logf(tc.name) err := bl.Add(ctx, &b) if err != nil { t.Errorf("add returned: %+v", err) @@ -405,6 +419,41 @@ func TestDeleteValidProtocols(t *testing.T) { extraParamName: extraParamValue, }, }, + { + name: "Empty parameters", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + if in.BucketContext["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + } + return &osspec.ProvisionerDeleteBucketResponse{}, nil + }, + params: nil, + }, } for _, tc := range testCases { @@ -434,7 +483,7 @@ func TestDeleteValidProtocols(t *testing.T) { } tc.setProtocol(&b) - t.Logf("Testing protocol %s", tc.name) + t.Logf(tc.name) err := bl.Delete(ctx, &b) if err != nil { t.Errorf("delete returned: %+v", err) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index 885d0927..f0375d31 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -116,7 +116,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc req := osspec.ProvisionerGrantBucketAccessRequest{ Principal: obj.Spec.Principal, AccessPolicy: obj.Spec.PolicyActionsConfigMapData, - BucketContext: obj.Spec.Parameters, + BucketContext: bal.getParams(obj), } switch bucket.Spec.Protocol.Name { @@ -206,7 +206,7 @@ func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.Bucke req := osspec.ProvisionerRevokeBucketAccessRequest{ Principal: obj.Spec.Principal, - BucketContext: obj.Spec.Parameters, + BucketContext: bal.getParams(obj), } switch bucket.Spec.Protocol.Name { @@ -277,3 +277,11 @@ func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name strin }) return err } + +func (bal *bucketAccessListener) getParams(obj *v1alpha1.BucketAccess) map[string]string { + params := map[string]string{} + if obj.Spec.Parameters != nil { + params = obj.Spec.Parameters + } + return params +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go index 41884105..0bb98706 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -303,6 +303,47 @@ func TestAdd(t *testing.T) { extraParamName: extraParamValue, }, }, + { + name: "Empty parameters", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["Version"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + return &osspec.ProvisionerGrantBucketAccessResponse{ + Principal: principal, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + principal: principal, + serviceAccount: "", + params: nil, + }, } for _, tc := range testCases { @@ -347,6 +388,7 @@ func TestAdd(t *testing.T) { kubeClient: kubeClient, } + t.Logf(tc.name) err := bal.Add(ctx, &ba) if err != nil { t.Errorf("add returned: %+v", err) @@ -576,6 +618,42 @@ func TestDelete(t *testing.T) { extraParamName: extraParamValue, }, }, + { + name: "Empty parameters", + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ + Region: region, + Version: protocolVersion, + SignatureVersion: sigVersion, + BucketName: bucketName, + Endpoint: endpoint, + } + }, + protocolName: v1alpha1.ProtocolNameS3, + revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + if in.BucketName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.BucketName) + } + if in.BucketContext["Region"] != region { + t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + } + if in.Principal != principal { + t.Errorf("expected %s, got %s", principal, in.Principal) + } + if in.BucketContext["Version"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + } + if in.BucketContext["SignatureVersion"] != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + } + if in.BucketContext["Endpoint"] != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + } + return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil + }, + serviceAccount: "", + params: nil, + }, } for _, tc := range testCases { @@ -619,6 +697,7 @@ func TestDelete(t *testing.T) { Type: v1.SecretTypeOpaque, } + t.Logf(tc.name) ctx := context.TODO() tc.setProtocol(&b) client := fakebucketclientset.NewSimpleClientset(&ba, &b) From fca85907681039845c280ea5227df76f4f341aed Mon Sep 17 00:00:00 2001 From: Rob Rati Date: Tue, 12 Jan 2021 18:36:47 -0500 Subject: [PATCH 152/299] Remove log levels and use klog v2 --- .../app/objectstorage-sidecar.go | 6 +++--- .../cmd/sample-driver/driver-server.go | 3 ++- .../cmd/sample-driver/sample-driver.go | 3 ++- .../go.mod | 2 +- .../pkg/controller/bucket/bucket_controller.go | 10 +++++----- .../bucketaccess/bucket_access_controller.go | 12 ++++++------ .../pkg/grpcclient/client.go | 10 +++++----- .../pkg/grpcserver/server.go | 2 +- 8 files changed, 25 insertions(+), 23 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index 3e44ff74..b3024d62 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -15,7 +15,7 @@ import ( "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -36,7 +36,7 @@ func NewSidecarOptions() *SidecarOptions { // Run starts the sidecar with the configured options func (so *SidecarOptions) Run() { - klog.V(1).Infof("attempting to open a gRPC connection with: %q", so.driverAddress) + klog.Infof("attempting to open a gRPC connection with: %q", so.driverAddress) grpcClient, err := grpcclient.NewGRPCClient(so.driverAddress, []grpc.DialOption{}, nil) if err != nil { klog.Errorf("error creating GRPC Client: %v", err) @@ -52,7 +52,7 @@ func (so *SidecarOptions) Run() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - klog.V(1).Infof("creating provisioner client") + klog.Infof("creating provisioner client") provisionerClient := osspec.NewProvisionerClient(grpcConn) klog.Infof("discovering driver name") diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go index 5cbb8c86..12ca7d6f 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go @@ -29,7 +29,8 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "k8s.io/klog" + + "k8s.io/klog/v2" cosi "github.com/kubernetes-sigs/container-object-storage-interface-spec" ) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go index b7e37651..9aaab8b7 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go @@ -29,7 +29,8 @@ import ( "github.com/minio/minio/pkg/madmin" "github.com/spf13/cobra" "github.com/spf13/viper" - "k8s.io/klog" + + "k8s.io/klog/v2" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver" ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 106dc385..895e74fc 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -17,5 +17,5 @@ require ( k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 - k8s.io/klog v1.0.0 + k8s.io/klog/v2 v2.2.0 ) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go index 21ded69c..fe6c678a 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -35,7 +35,7 @@ import ( osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" - "k8s.io/klog" + "k8s.io/klog/v2" "golang.org/x/time/rate" ) @@ -93,7 +93,7 @@ func (bl *bucketListener) InitializeBucketClient(bc bucketclientset.Interface) { // Add will call the provisioner and add a bucket func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { - klog.V(1).Infof("bucketListener: add called for bucket %s", obj.Name) + klog.Infof("bucketListener: add called for bucket %s", obj.Name) // Verify this bucket is for this provisioner if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { @@ -133,13 +133,13 @@ func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { // Update does nothing func (bl *bucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { - klog.V(1).Infof("bucketListener: update called for bucket %s", old.Name) + klog.Infof("bucketListener: update called for bucket %s", old.Name) return nil } // Delete will call the provisioner and delete a bucket func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) error { - klog.V(1).Infof("bucketListener: delete called for bucket %s", obj.Name) + klog.Infof("bucketListener: delete called for bucket %s", obj.Name) // Verify this bucket is for this provisioner if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { @@ -179,7 +179,7 @@ func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) erro _, err = bl.bucketClient.ObjectstorageV1alpha1().Buckets().UpdateStatus(ctx, obj, metav1.UpdateOptions{}) return err } - klog.V(1).Infof("provisioner returned delete bucket response %v", rsp) + klog.Infof("provisioner returned delete bucket response %v", rsp) // update bucket availability to false return bl.updateStatus(ctx, obj.Name, "Bucket Deleted", false) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index 885d0927..a360b5dc 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -38,7 +38,7 @@ import ( osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" - "k8s.io/klog" + "k8s.io/klog/v2" "golang.org/x/time/rate" ) @@ -100,7 +100,7 @@ func (bal *bucketAccessListener) InitializeBucketClient(bc bucketclientset.Inter // Add will call the provisioner to grant permissions func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAccess) error { - klog.V(1).Infof("bucketAccessListener: add called for bucket access %s", obj.Name) + klog.Infof("bucketAccessListener: add called for bucket access %s", obj.Name) // Verify this bucket access is for this provisioner if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { @@ -144,7 +144,7 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc klog.Errorf("error calling ProvisionerGrantBucketAccess: %v", err) return err } - klog.V(1).Infof("provisioner returned grant bucket access response %v", rsp) + klog.Infof("provisioner returned grant bucket access response %v", rsp) // Only update the principal in the BucketAccess if it wasn't set because // that means that the provisioner created one @@ -185,13 +185,13 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc // Update does nothing func (bal *bucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { - klog.V(1).Infof("bucketAccessListener: update called for bucket %s", old.Name) + klog.Infof("bucketAccessListener: update called for bucket %s", old.Name) return nil } // Delete will call the provisioner to revoke permissions func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccess) error { - klog.V(1).Infof("bucketAccessListener: delete called for bucket access %s", obj.Name) + klog.Infof("bucketAccessListener: delete called for bucket access %s", obj.Name) // Verify this bucket access is for this provisioner if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { @@ -234,7 +234,7 @@ func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.Bucke klog.Errorf("error calling ProvisionerRevokeBucketAccess: %v", err) return err } - klog.V(1).Infof("provisioner returned revoke bucket access response %v", rsp) + klog.Infof("provisioner returned revoke bucket access response %v", rsp) // Delete the secret if obj.Spec.ServiceAccount == nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go index a8441ad2..25016a39 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go @@ -25,7 +25,7 @@ import ( "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" ) type options struct { @@ -102,11 +102,11 @@ func (c *GRPCClient) ConnectWithLogging(interval time.Duration) (*grpc.ClientCon klog.Infof("Connecting to %s", c.serverAddress) grpcLogFunc := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - klog.V(5).Infof("GRPC call: %s", method) - klog.V(5).Infof("GRPC request: %s", req) + klog.Infof("GRPC call: %s", method) + klog.Infof("GRPC request: %s", req) err := invoker(ctx, method, req, reply, cc, opts...) - klog.V(5).Infof("GRPC response: %s", reply) - klog.V(5).Infof("GRPC error: %v", err) + klog.Infof("GRPC response: %s", reply) + klog.Infof("GRPC error: %v", err) return err } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go index 896b1de2..10518738 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go @@ -29,7 +29,7 @@ import ( osi "github.com/kubernetes-sigs/container-object-storage-interface-spec" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Defines Non blocking GRPC server interfaces From 072911c36bbe2dbf6381cdfc0f6f04d52f4718c8 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 12 Jan 2021 21:24:07 -0800 Subject: [PATCH 153/299] fix rbac rules and check for errors getting bucketclass --- .../bucketaccessrequest.go | 73 ++++++++++++------- .../bucketaccessrequest_test.go | 3 + .../pkg/bucketrequest/bucketrequest.go | 13 ++-- .../pkg/util/util.go | 19 ++--- .../resources/deployment.yaml | 2 + .../resources/rbac.yaml | 10 ++- 6 files changed, 77 insertions(+), 43 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index 48cebc99..36ba7852 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -4,14 +4,15 @@ import ( "context" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" "github.com/golang/glog" ) @@ -41,9 +42,6 @@ func (b *bucketAccessRequestListener) Add(ctx context.Context, obj *v1alpha1.Buc if err != nil { // Provisioning is 100% finished / not in progress. switch err { - case util.ErrInvalidBucketAccessClass: - glog.V(1).Infof("BucketAccessClass specified does not exist while processing BucketAccessRequest %v.", bucketAccessRequest.Name) - err = nil case util.ErrBucketAccessAlreadyExists: glog.V(1).Infof("BucketAccess already exist for this BucketAccessRequest %v.", bucketAccessRequest.Name) err = nil @@ -73,26 +71,40 @@ func (b *bucketAccessRequestListener) Delete(ctx context.Context, obj *v1alpha1. // or a special error errBucketAccessAlreadyExists, errInvalidBucketAccessClass is returned when provisioning was impossible and // no further attempts to provision should be tried. func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketAccessRequest *v1alpha1.BucketAccessRequest) error { - bucketAccessClassName := bucketAccessRequest.Spec.BucketAccessClassName - - bucketaccess := b.FindBucketAccess(ctx, bucketAccessRequest) - if bucketaccess != nil { - // bucketaccess has provisioned, nothing to do. - return util.ErrBucketAccessAlreadyExists + baClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccesses() + bacClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() + brClient := b.bucketClient.ObjectstorageV1alpha1().BucketRequests + barClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests + coreClient := b.kubeClient.CoreV1() + + name := string(bucketAccessRequest.GetUID()) + _, err := baClient.Get(ctx, name, metav1.GetOptions{}) + if err != nil { + // anything other than 404 + if !errors.IsNotFound(err) { + glog.Errorf("error fetching bucketaccess: %v", err) + return err + } + } else { // if bucket found + return nil } - bucketAccessClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) - if bucketAccessClass == nil { + bucketAccessClassName := bucketAccessRequest.Spec.BucketAccessClassName + bucketAccessClass, err := bacClient.Get(ctx, bucketAccessClassName, metav1.GetOptions{}) + if err != nil { // bucket access class is invalid or not specified, cannot continue with provisioning. + glog.Errorf("error fetching bucketaccessclass [%v]: %v", bucketAccessClassName, err) return util.ErrInvalidBucketAccessClass } - bucketRequest, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketAccessRequest.Namespace).Get(ctx, bucketAccessRequest.Spec.BucketRequestName, metav1.GetOptions{}) - if bucketRequest == nil { - // bucket request does not exist, we have to reject this provision. - return util.ErrInvalidBucketRequest + brName := bucketAccessRequest.Spec.BucketRequestName + // TODO: catch this in a admission controller + if brName == "" { + return util.ErrInvalidBucketAccessRequest } + bucketRequest, err := brClient(bucketAccessRequest.Namespace).Get(ctx, brName, metav1.GetOptions{}) if err != nil { + glog.Errorf("error fetching bucket request [%v]: %v", brName, err) return err } @@ -100,23 +112,29 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return util.ErrWaitForBucketProvisioning } - sa, err := b.kubeClient.CoreV1().ServiceAccounts(bucketAccessRequest.Namespace).Get(ctx, bucketAccessRequest.Spec.ServiceAccountName, metav1.GetOptions{}) - if err != nil { - return err + saName := bucketAccessRequest.Spec.ServiceAccountName + sa := &v1.ServiceAccount{} + if saName != "" { + sa, err = coreClient.ServiceAccounts(bucketAccessRequest.Namespace).Get(ctx, saName, metav1.GetOptions{}) + if err != nil { + return err + } } - bucketaccess = &v1alpha1.BucketAccess{} - bucketaccess.Name = util.GetUUID() + bucketaccess := &v1alpha1.BucketAccess{} + bucketaccess.Name = name bucketaccess.Spec.BucketInstanceName = bucketRequest.Spec.BucketInstanceName bucketaccess.Spec.BucketAccessRequest = &v1.ObjectReference{ Name: bucketAccessRequest.Name, Namespace: bucketAccessRequest.Namespace, - UID: bucketAccessRequest.ObjectMeta.UID} + UID: bucketAccessRequest.ObjectMeta.UID, + } bucketaccess.Spec.ServiceAccount = &v1.ObjectReference{ Name: sa.Name, Namespace: sa.Namespace, - UID: sa.ObjectMeta.UID} + UID: sa.ObjectMeta.UID, + } // bucketaccess.Spec.MintedSecretName - set by the driver bucketaccess.Spec.PolicyActionsConfigMapData, err = util.ReadConfigData(b.kubeClient, bucketAccessClass.PolicyActionsConfigMap) if err != nil { @@ -126,14 +144,17 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketaccess.Spec.Provisioner = bucketAccessClass.Provisioner bucketaccess.Spec.Parameters = util.CopySS(bucketAccessClass.Parameters) - bucketaccess, err = b.bucketClient.ObjectstorageV1alpha1().BucketAccesses().Create(context.Background(), bucketaccess, metav1.CreateOptions{}) + bucketaccess, err = baClient.Create(context.Background(), bucketaccess, metav1.CreateOptions{}) if err != nil { + if errors.IsAlreadyExists(err) { + return nil + } return err } err = retry.RetryOnConflict(retry.DefaultRetry, func() error { bucketAccessRequest.Spec.BucketAccessName = bucketaccess.Name - _, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) + _, err := barClient(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) if err != nil { return err } diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go index 73834949..d9b77f12 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -68,6 +68,7 @@ var bucketRequest1 = types.BucketRequest{ ObjectMeta: metav1.ObjectMeta{ Name: "bucketrequest1", Namespace: "default", + UID: "br-12345", }, Spec: types.BucketRequestSpec{ BucketPrefix: "cosi", @@ -88,6 +89,7 @@ var bucketAccessRequest1 = types.BucketAccessRequest{ ObjectMeta: metav1.ObjectMeta{ Name: "bucketaccessrequest1", Namespace: "default", + UID: "bar-12345", }, Spec: types.BucketAccessRequestSpec{ ServiceAccountName: "sa1", @@ -104,6 +106,7 @@ var bucketAccessRequest2 = types.BucketAccessRequest{ ObjectMeta: metav1.ObjectMeta{ Name: "bucketaccessrequest2", Namespace: "default", + UID: "bar-67890", }, Spec: types.BucketAccessRequestSpec{ ServiceAccountName: "sa2", diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index f14898ec..12268455 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -37,7 +37,7 @@ func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interf // Add creates a bucket in response to a bucketrequest func (b *bucketRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketRequest) error { - glog.V(1).Infof("Add called for BucketRequest %s", obj.Name) + glog.V(3).Infof("Add called for BucketRequest %s", obj.Name) bucketRequest := obj err := b.provisionBucketRequestOperation(ctx, bucketRequest) if err != nil { @@ -61,13 +61,13 @@ func (b *bucketRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketReq // update processes any updates made to the bucket request func (b *bucketRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketRequest) error { - glog.V(1).Infof("Update called for BucketRequest %v", old.Name) + glog.V(3).Infof("Update called for BucketRequest %v", old.Name) return nil } // Delete processes a bucket for which bucket request is deleted func (b *bucketRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketRequest) error { - glog.V(1).Infof("Delete called for BucketRequest %v", obj.Name) + glog.V(3).Infof("Delete called for BucketRequest %v", obj.Name) return nil } @@ -81,8 +81,8 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucketClassName := b.GetBucketClass(bucketRequest) bucketClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) - if bucketClass == nil { - // bucketclass does not exist in order to create a bucket + if err != nil { + glog.Errorf("error getting bucketclass: [%v] %v", bucketClassName, err) return util.ErrInvalidBucketClass } @@ -123,6 +123,9 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket, err = b.bucketClient.ObjectstorageV1alpha1().Buckets().Create(context.Background(), bucket, metav1.CreateOptions{}) if err != nil { + if errors.IsAlreadyExists(err) { + return nil + } glog.V(5).Infof("Error occurred when creating Bucket %v", err) return err } diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index 14a8cede..28edfeac 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -37,15 +37,16 @@ import ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") - ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") - ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") - ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") - ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") - ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") - ErrBCUnavailable = errors.New("BucketClass is not available") - ErrNotImplemented = errors.New("Operation Not Implemented") - ErrNilConfigMap = errors.New("ConfigMap cannot be nil") + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") + ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") + ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") + ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") + ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") + ErrInvalidBucketAccessRequest = errors.New("Invalid bucket access request specified") + ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") + ErrBCUnavailable = errors.New("BucketClass is not available") + ErrNotImplemented = errors.New("Operation Not Implemented") + ErrNilConfigMap = errors.New("ConfigMap cannot be nil") ) func CopySS(m map[string]string) map[string]string { diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index ac8fc2a7..c48e7487 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -32,3 +32,5 @@ spec: containers: - name: objectstorage-controller image: quay.io/containerobjectstorage/objectstorage-controller:latest + args: + - "--v=5" diff --git a/container-object-storage-interface-controller/resources/rbac.yaml b/container-object-storage-interface-controller/resources/rbac.yaml index 7ebebfe4..9b554c3c 100644 --- a/container-object-storage-interface-controller/resources/rbac.yaml +++ b/container-object-storage-interface-controller/resources/rbac.yaml @@ -12,16 +12,20 @@ metadata: rules: - apiGroups: ["objectstorage.k8s.io"] resources: ["bucketrequests", "bucketaccessrequests"] - verbs: ["get", "list", "watch"] + verbs: ["get", "list", "watch", "update"] - apiGroups: ["objectstorage.k8s.io"] - resources: ["buckets", "bucketaccess"] + resources: ["buckets", "bucketaccesses"] verbs: ["get", "list", "watch", "update", "create", "delete"] - apiGroups: ["objectstorage.k8s.io"] - resources: ["bucketclass","bucketaccessclass"] + resources: ["bucketclasses","bucketaccessclasses"] verbs: ["get", "list"] - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] +- apiGroups: [""] + resources: ["configmaps", "serviceaccounts"] + verbs: ["list", "get"] + --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 From 38192567e51ec032dce61a363d17ff876d9680e1 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Wed, 13 Jan 2021 17:11:54 -0800 Subject: [PATCH 154/299] Added Dockerfile to build sidecar as well as sample driver --- .../{ => cmd/objectstorage-sidecar}/Dockerfile | 0 .../cmd/sample-driver/Dockerfile | 6 ++++++ 2 files changed, 6 insertions(+) rename container-object-storage-interface-provisioner-sidecar/{ => cmd/objectstorage-sidecar}/Dockerfile (100%) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/Dockerfile similarity index 100% rename from container-object-storage-interface-provisioner-sidecar/Dockerfile rename to container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/Dockerfile diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile new file mode 100644 index 00000000..1d8c977b --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:latest +LABEL maintainers="Kubernetes Authors" +LABEL description="Object Storage Sample Driver" + +COPY ./bin/sample-driver sample-driver +ENTRYPOINT ["/sample-driver"] From 00222787bbc755eb492c88db44d419aeb7f097b1 Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Tue, 19 Jan 2021 18:21:19 -0800 Subject: [PATCH 155/299] Fixing build for the api changes to Protocol --- .../go.mod | 2 +- .../go.sum | 4 ++-- .../bucketaccessrequest_test.go | 6 +----- .../pkg/bucketrequest/bucketrequest.go | 4 +--- .../pkg/bucketrequest/bucketrequest_test.go | 14 +++----------- 5 files changed, 8 insertions(+), 22 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index d4d0ac5f..b5bacae4 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -9,7 +9,7 @@ require ( github.com/google/uuid v1.1.2 // indirect github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect github.com/kr/text v0.2.0 // indirect - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 + github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243 github.com/mailru/easyjson v0.7.6 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index df32efaa..a5f29fe3 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -303,8 +303,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9 h1:1Zmlu1GKd1iIv9fdc1mkaTuUtoNqet4NLYLE/8p9ylw= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20201210173615-0c3244fa34b9/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243 h1:iOEsQYg/QXxzYP10JaLtoQWdlGG3OS/a3sOYsrDXwdE= +github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go index d9b77f12..3cbf2ee6 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -71,11 +71,7 @@ var bucketRequest1 = types.BucketRequest{ UID: "br-12345", }, Spec: types.BucketRequestSpec{ - BucketPrefix: "cosi", - Protocol: types.RequestedProtocol{ - Name: "s3", - Version: "", - }, + BucketPrefix: "cosi", BucketClassName: "classgold", BucketInstanceName: "cosi1234567890", }, diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index 12268455..b5e2099d 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -116,11 +116,9 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont Namespace: bucketRequest.Namespace, UID: bucketRequest.ObjectMeta.UID} bucket.Spec.AllowedNamespaces = util.CopyStrings(bucketClass.AllowedNamespaces) + bucket.Spec.Protocol = *bucketClass.Protocol.DeepCopy() bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) - // TODO have a switch statement to populate appropriate protocol based on BR.Protocol - bucket.Spec.Protocol.RequestedProtocol = bucketRequest.Spec.Protocol - bucket, err = b.bucketClient.ObjectstorageV1alpha1().Buckets().Create(context.Background(), bucket, metav1.CreateOptions{}) if err != nil { if errors.IsAlreadyExists(err) { diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index 0914aba8..8134e63a 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -28,7 +28,7 @@ var goldClass = types.BucketClass{ }, AllowedNamespaces: []string{"default", "cosins"}, Parameters: classGoldParameters, - Protocol: "s3", + Protocol: types.Protocol{Name: "s3"}, IsDefaultBucketClass: false, } @@ -43,11 +43,7 @@ var bucketRequest1 = types.BucketRequest{ UID: "12345-67890", }, Spec: types.BucketRequestSpec{ - BucketPrefix: "cosi", - Protocol: types.RequestedProtocol{ - Name: "s3", - Version: "", - }, + BucketPrefix: "cosi", BucketClassName: "classgold", }, } @@ -63,11 +59,7 @@ var bucketRequest2 = types.BucketRequest{ UID: "abcde-fghijk", }, Spec: types.BucketRequestSpec{ - BucketPrefix: "cosi", - Protocol: types.RequestedProtocol{ - Name: "s3", - Version: "", - }, + BucketPrefix: "cosi", BucketClassName: "classgold", }, } From ead13f9f7084ef948113ed4cac9affbe02dbc507 Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Mon, 8 Feb 2021 17:47:45 +0000 Subject: [PATCH 156/299] removed limits for containers passing flags on the sidecar and adding TCP on the LISTEN_ADDRESS missing rbac for provisioner sidecar --- .../resources/deployment.yaml | 19 +++++-------------- .../resources/rbac.yaml | 6 ++++++ .../resources/secret.yaml | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index 06d15184..e0946ee5 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -35,25 +35,16 @@ spec: containers: - name: objectstorage-sample-driver image: quay.io/containerobjectstorage/objectstorage-sample-driver:latest - resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 100m - memory: 100Mi + args: + - "--listen-address=$(LISTEN_ADDRESS)" + - "--s3-endpoint=$(S3_ENDPOINT)" + - "--access-key=$(ACCESS_KEY)" + - "--secret-key=$(SECRET_KEY)" envFrom: - secretRef: name: objectstorage-provisioner - name: objectstorage-provisioner-sidecar image: quay.io/containerobjectstorage/objectstorage-sidecar:latest - resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 100m - memory: 100Mi env: - name: CONNECT_ADDRESS valueFrom: diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml index f9335105..eb2be5c9 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml @@ -16,6 +16,12 @@ rules: - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] +- apiGroups: ["objectstorage.k8s.io"] + resources: ["bucketaccesses"] + verbs: ["get", "watch", "list", "delete", "update", "create"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml index 92479f5e..d020bab0 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml @@ -11,7 +11,7 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-provisioner type: Opaque stringData: - LISTEN_ADDRESS: 0.0.0.0:9000 + LISTEN_ADDRESS: tcp://0.0.0.0:9000 data: # set to space S3_ENDPOINT: IA== From 940e79247de1053184f2faa520db05d6545be217 Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Thu, 18 Feb 2021 15:13:44 +0000 Subject: [PATCH 157/299] first readme draft --- .../README.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index c8b6bfd8..7b13f414 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -1,6 +1,43 @@ # Container Object Storage Controller Container Object Storage Interface (COSI) controller responsible to manage lifecycle of COSI objects. +Specifically, this controller monitors the lifecycle of the user-facing CRDs: + +- BucketRequest - Represents a request to provision a Bucket +- BucketAccessRequest - Represents a request to access a Bucket + +and makes the necessary gRPC calls to the associated [provisioner](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar) + +## Developer Guide + +Before diving into the code of this repo, we suggest that you familiarize yourself with: + +- The Spec of CRDs in [objectstorage.k8s.io/v1alpha1/types.go](https://github.com/kubernetes-sigs/container-object-storage-interface-api/blob/master/apis/objectstorage.k8s.io/v1alpha1/types.go) +- The Spec of the COSI objects [sigs.k8s.io/container-object-storage-interface-spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec) + +A good starting point towards understanding the functionality of this repo would be to study the tests: + +- [BucketRequest Test](./pkg/bucketrequest/bucketrequest_test.go) +- [BucketAccessRequest Test](./pkg/bucketaccessrequest/bucketaccessrequest_test.go) + +### Build and Test + +In order to build and generate a Docker image execute: +```bash +make container +``` + +In order to run the tests execute: +```bash +make test +``` + +## References + +- [Documentation](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/index.md) +- [Deployment Guide](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/deployment-guide.md) +- [Weekly Meetings](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/meetings.md) +- [Roadmap](https://github.com/orgs/kubernetes-sigs/projects/8) ## Community, discussion, contribution, and support From 929955013a4b0f6a561282704b1700b4f351d903 Mon Sep 17 00:00:00 2001 From: "mengjiao.liu" Date: Tue, 23 Feb 2021 17:37:39 +0800 Subject: [PATCH 158/299] Add deployment documentation --- .../docs/deployment-guide.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 container-object-storage-interface-controller/docs/deployment-guide.md diff --git a/container-object-storage-interface-controller/docs/deployment-guide.md b/container-object-storage-interface-controller/docs/deployment-guide.md new file mode 100644 index 00000000..7373d6ab --- /dev/null +++ b/container-object-storage-interface-controller/docs/deployment-guide.md @@ -0,0 +1,21 @@ +# Deploying Container Object Storage Interface (COSI) Controller On Kubernetes + +This document describes steps for Kubernetes administrators to setup Container Object Storage Interface Controller (COSI) Controller onto a Kubernetes cluster. + +COSI controller can be setup using the [kustomization file](https://github.com/kubernetes-sigs/container-object-storage-interface-controller/blob/master/kustomization.yaml) from the [container-object-storage-interface-controller](https://github.com/kubernetes-sigs/container-object-storage-interface-controller) repository with following command: + +```sh +kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-controller +``` +The output should look like the following: +```sh +serviceaccount/objectstorage-controller-sa created +role.rbac.authorization.k8s.io/objectstorage-controller created +clusterrole.rbac.authorization.k8s.io/objectstorage-controller-role created +rolebinding.rbac.authorization.k8s.io/objectstorage-controller created +clusterrolebinding.rbac.authorization.k8s.io/objectstorage-controller created +deployment.apps/objectstorage-controller created +``` + +The controller will be deployed in the `default` namespace. + From 913efce146900c9211e44067ac8ff5e52d26ad1a Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Tue, 23 Feb 2021 15:02:54 +0000 Subject: [PATCH 159/299] fix for CRDs generation --- container-object-storage-interface-controller/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 7b13f414..d83e2bff 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -6,7 +6,10 @@ Specifically, this controller monitors the lifecycle of the user-facing CRDs: - BucketRequest - Represents a request to provision a Bucket - BucketAccessRequest - Represents a request to access a Bucket -and makes the necessary gRPC calls to the associated [provisioner](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar) +and generates the associated CRDs: + +- Bucket - Represents a Bucket or its equivalent in the storage backend +- BucketAccess - Represents a access token or service account in the storage backend ## Developer Guide From 2a695d3c39a47d15b4c3596841d258333a71bd49 Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Wed, 24 Feb 2021 10:13:31 -0500 Subject: [PATCH 160/299] remove hardcoded namesapces from resources --- .../resources/deployment.yaml | 3 +++ .../resources/rbac.yaml | 4 +--- .../resources/sa.yaml | 2 +- .../resources/secret.yaml | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index e0946ee5..6eac0fb7 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -23,6 +23,7 @@ spec: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: provisioner app.kubernetes.io/name: container-object-storage-interface-provisioner + app.kubernetes.io/version: main template: metadata: labels: @@ -45,6 +46,8 @@ spec: name: objectstorage-provisioner - name: objectstorage-provisioner-sidecar image: quay.io/containerobjectstorage/objectstorage-sidecar:latest + args: + - "--connect-address=$(CONNECT_ADDRESS)" env: - name: CONNECT_ADDRESS valueFrom: diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml index eb2be5c9..ffd0cff6 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml @@ -3,7 +3,6 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-provisioner-role - namespace: objectstorage-provisioner-ns labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: provisioner @@ -27,7 +26,6 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: objectstorage-provisioner-role-binding - namespace: objectstorage-provisioner-ns labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: provisioner @@ -36,7 +34,7 @@ metadata: subjects: - kind: ServiceAccount name: objectstorage-provisioner-sa - namespace: objectstorage-provisioner-ns + namespace: default # must set to default. see https://github.com/kubernetes-sigs/kustomize/issues/1377#issuecomment-694731163 roleRef: kind: ClusterRole name: objectstorage-provisioner-role diff --git a/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml b/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml index d3798f5f..c4304c69 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: objectstorage-provisioner-sa - namespace: objectstorage-provisioner-ns + namespace: default # must set to default. see https://github.com/kubernetes-sigs/kustomize/issues/1377#issuecomment-694731163 labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml index d020bab0..69085e50 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml @@ -3,7 +3,6 @@ apiVersion: v1 kind: Secret metadata: name: objectstorage-provisioner - namespace: objectstorage-provisioner-ns labels: app.kubernetes.io/part-of: container-object-storage-interface app.kubernetes.io/component: provisioner From 6a7936fad8a730923ec2e04dea5a455fc4033901 Mon Sep 17 00:00:00 2001 From: "mengjiao.liu" Date: Thu, 4 Mar 2021 15:07:49 +0800 Subject: [PATCH 161/299] Add Deployment documentation --- .../docs/deployment-guide.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/docs/deployment-guide.md diff --git a/container-object-storage-interface-provisioner-sidecar/docs/deployment-guide.md b/container-object-storage-interface-provisioner-sidecar/docs/deployment-guide.md new file mode 100644 index 00000000..03adc01c --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/docs/deployment-guide.md @@ -0,0 +1,21 @@ +# Deploying Container Object Storage Interface (COSI) Provisioner Sidecar On Kubernetes + +This document describes steps for Kubernetes administrators to setup Container Object Storage Interface (COSI) Provisioner Sidecar onto a Kubernetes cluster. + +COSI Provisioner Sidecar can be setup using the [kustomization file](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar/blob/master/kustomization.yaml) from the [container-object-storage-interface-provisioner-sidecar](https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar) repository with following command: + +```sh + kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar +``` +The output should look like the following: +```sh +namespace/objectstorage-provisioner-ns created +serviceaccount/objectstorage-provisioner-sa created +clusterrole.rbac.authorization.k8s.io/objectstorage-provisioner-role created +clusterrolebinding.rbac.authorization.k8s.io/objectstorage-provisioner-role-binding created +secret/objectstorage-provisioner created +deployment.apps/objectstorage-provisioner created +``` + +The Provisioner Sidecar will be deployed in the `default` namespace. + From 6083885e97d62737dc12599dee779b53016da857 Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Thu, 4 Mar 2021 10:14:50 +0000 Subject: [PATCH 162/299] imports should change to sigs.k8s.io/container-object-storage-interface-api --- .../cmd/controller-manager/controller-manager.go | 2 +- container-object-storage-interface-controller/go.mod | 2 +- container-object-storage-interface-controller/go.sum | 4 ++-- .../pkg/bucketaccessrequest/bucketaccessrequest.go | 6 +++--- .../pkg/bucketaccessrequest/bucketaccessrequest_test.go | 4 ++-- .../pkg/bucketrequest/bucketrequest.go | 6 +++--- .../pkg/bucketrequest/bucketrequest_test.go | 4 ++-- .../pkg/util/util.go | 8 ++++---- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index e2788c8c..b2508fa4 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -10,9 +10,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketaccessrequest" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketrequest" + bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" "github.com/golang/glog" ) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index b5bacae4..ef1e3da7 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -9,7 +9,6 @@ require ( github.com/google/uuid v1.1.2 // indirect github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect github.com/kr/text v0.2.0 // indirect - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243 github.com/mailru/easyjson v0.7.6 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -32,5 +31,6 @@ require ( k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.4.0 // indirect k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index a5f29fe3..634efa7a 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -303,8 +303,6 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243 h1:iOEsQYg/QXxzYP10JaLtoQWdlGG3OS/a3sOYsrDXwdE= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210120011359-1e91ae41e243/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -796,6 +794,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 h1:ZjGviVPvDVxOhCF7+dsbAk5GPfUpEnM0DtR5yH7S6ww= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9/go.mod h1:4V9ty4CWneFEQJbr+yQPjkCdUH3EKfjXM4AQXLY4Sa8= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index 36ba7852..b07d1917 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -9,10 +9,10 @@ import ( kubeclientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/retry" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" - bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" "github.com/golang/glog" ) diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go index 3cbf2ee6..212041bd 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -7,11 +7,11 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" "k8s.io/client-go/kubernetes/fake" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" + types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" ) var sa1 = v1.ServiceAccount{ diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index b5e2099d..0403024f 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -9,11 +9,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/retry" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" - bucketcontroller "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" "github.com/golang/glog" ) diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index 8134e63a..c4fae686 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -6,11 +6,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" "k8s.io/client-go/kubernetes/fake" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" + types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" ) var classGoldParameters = map[string]string{ diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index 28edfeac..2645d9a7 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -22,9 +22,9 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/util/workqueue" - types "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" - "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + "sigs.k8s.io/container-object-storage-interface-api/controller" "sigs.k8s.io/controller-tools/pkg/crd" crdmarkers "sigs.k8s.io/controller-tools/pkg/crd/markers" @@ -334,7 +334,7 @@ func RegisterCRDs(ctx context.Context, client apiextensions.CustomResourceDefini return err } - roots, err := loader.LoadRoots("github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1") + roots, err := loader.LoadRoots("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1") if err != nil { return err } From 2e207164b593073e83345eea0decc56809df5e29 Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Thu, 4 Mar 2021 13:46:58 +0000 Subject: [PATCH 163/299] Update README.md --- container-object-storage-interface-controller/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index d83e2bff..70b61855 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -1,6 +1,6 @@ # Container Object Storage Controller -Container Object Storage Interface (COSI) controller responsible to manage lifecycle of COSI objects. +Container Object Storage Interface (COSI) controller is responsible to manage lifecycle of COSI objects. Specifically, this controller monitors the lifecycle of the user-facing CRDs: - BucketRequest - Represents a request to provision a Bucket From e3feeb442461b9e507c7c44c27d2f063ce671d8b Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 4 Mar 2021 13:05:57 -0500 Subject: [PATCH 164/299] update dependencies to sigs.k8s.*, update mod versions --- .../.gitignore | 2 ++ .../Makefile | 2 +- .../README.md | 10 +++++----- .../app/objectstorage-sidecar.go | 2 +- .../cmd/sample-driver/driver-server.go | 2 +- .../go.mod | 6 +++--- .../go.sum | 19 +++++++++++++++---- .../controller/bucket/bucket_controller.go | 8 ++++---- .../bucket/bucket_controller_test.go | 8 ++++---- .../bucketaccess/bucket_access_controller.go | 8 ++++---- .../bucket_access_controller_test.go | 8 ++++---- .../pkg/grpcserver/server.go | 2 +- 12 files changed, 45 insertions(+), 32 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/.gitignore b/container-object-storage-interface-provisioner-sidecar/.gitignore index c5f97758..f37e3819 100644 --- a/container-object-storage-interface-provisioner-sidecar/.gitignore +++ b/container-object-storage-interface-provisioner-sidecar/.gitignore @@ -5,3 +5,5 @@ travis.yml release-tools bin +.idea +vendor \ No newline at end of file diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 9a6bd2ca..ec48ffc8 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -20,7 +20,7 @@ reltools: release-tools/build.make release-tools/build.make: $(eval CURDIR := $(shell pwd)) $(eval TMP := $(shell mktemp -d)) - $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) + $(shell cd ${TMP} && git clone https://sigs.k8s.io/container-object-storage-interface-spec) $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) $(shell rm -rf ${TMP}) ln -s release-tools/travis.yml travis.yml diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index 8b4f2ac9..0890733f 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -1,12 +1,12 @@ COSI repos and images: -[Spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec) \ -[API](https://github.com/kubernetes-sigs/container-object-storage-interface-api) \ -[Controller](https://github.com/kubernetes-sigs/container-object-storage-interface-controller)
+[Spec](https://sigs.k8s.io/container-object-storage-interface-spec) \ +[API](https://sigs.k8s.io/container-object-storage-interface-api) \ +[Controller](https://sigs.k8s.io/container-object-storage-interface-controller)
  - [images: cosi-controller](https://quay.io/repository/containerobjectstorage/objectstorage-controller?tab=tags) \ [Provisioner Sidecar](https://sigs.k8s.io/container-object-storage-interface-provisioner-sidecar)
  - images: cosi-provisioner \ - [CSI Adapter](https://github.com/kubernetes-sigs/container-object-storage-interface-csi-adapter)
+ [CSI Adapter](https://sigs.k8s.io/container-object-storage-interface-csi-adapter)
  - images: cosi-node-adapter
@@ -28,7 +28,7 @@ COSI deprecated repos: If you are new to a SIG Storage project, check out this [contributing guide](https://github.com/kubernetes/community/blob/master/sig-storage/CONTRIBUTING.md) and the [community page](https://github.com/kubernetes/community/tree/master/sig-storage). -If you are new to the SIG Storage COSI project, check out the [spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec/blob/master/spec.md), [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1979-object-storage-support), and [project board](https://github.com/orgs/kubernetes-sigs/projects/). +If you are new to the SIG Storage COSI project, check out the [spec](https://sigs.k8s.io/container-object-storage-interface-spec/blob/master/spec.md), [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1979-object-storage-support), and [project board](https://github.com/orgs/kubernetes-sigs/projects/). Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index b3024d62..787b2cde 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -9,7 +9,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient" - osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + osspec "sigs.k8s.io/container-object-storage-interface-spec" "github.com/spf13/cobra" diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go index 12ca7d6f..e4c155a6 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go @@ -32,7 +32,7 @@ import ( "k8s.io/klog/v2" - cosi "github.com/kubernetes-sigs/container-object-storage-interface-spec" + cosi "sigs.k8s.io/container-object-storage-interface-spec" ) var ( diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 895e74fc..2305f202 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -5,17 +5,17 @@ go 1.15 require ( github.com/go-ini/ini v1.62.0 // indirect github.com/kubernetes-csi/csi-lib-utils v0.9.0 - github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 - github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 github.com/minio/minio v0.0.0-20210112204746-e09196d62633 github.com/minio/minio-go v6.0.14+incompatible github.com/spf13/cobra v0.0.5 github.com/spf13/viper v1.3.2 golang.org/x/net v0.0.0-20201216054612-986b41b23924 golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 - google.golang.org/grpc v1.34.0 + google.golang.org/grpc v1.35.0 k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 + sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index dc58ca42..d7e048b5 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -97,6 +97,7 @@ github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= @@ -115,6 +116,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -148,6 +150,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -421,10 +424,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI= github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 h1:SVbl8M9RAoLUqJ83eLxDWVyMHz09CZ+dkUjkR7kG9eo= -github.com/kubernetes-sigs/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 h1:+i43Z3yKW7htLAATafmbZ7ULFwwT+8vwB7NMxZ1X3Ww= -github.com/kubernetes-sigs/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -776,6 +775,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -965,6 +965,8 @@ google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1055,6 +1057,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= @@ -1065,6 +1068,14 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 h1:SVbl8M9RAoLUqJ83eLxDWVyMHz09CZ+dkUjkR7kG9eo= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 h1:ZjGviVPvDVxOhCF7+dsbAk5GPfUpEnM0DtR5yH7S6ww= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9/go.mod h1:4V9ty4CWneFEQJbr+yQPjkCdUH3EKfjXM4AQXLY4Sa8= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 h1:+i43Z3yKW7htLAATafmbZ7ULFwwT+8vwB7NMxZ1X3Ww= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 h1:TIx7kV6/3ZSQ5BETBx1QG1Va28zv1LZAvqRjs28n8ss= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go index 9617f4b2..57aae6cc 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -29,11 +29,11 @@ import ( "k8s.io/client-go/util/retry" "k8s.io/client-go/util/workqueue" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" - "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + "sigs.k8s.io/container-object-storage-interface-api/controller" - osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + osspec "sigs.k8s.io/container-object-storage-interface-spec" "k8s.io/klog/v2" diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go index 5df8ca48..1cf49533 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go @@ -21,12 +21,12 @@ import ( "reflect" "testing" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" - fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" + osspec "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" corev1 "k8s.io/api/core/v1" diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index 3a5527a4..bce9c148 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -32,11 +32,11 @@ import ( "k8s.io/client-go/util/retry" "k8s.io/client-go/util/workqueue" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset" - "github.com/kubernetes-sigs/container-object-storage-interface-api/controller" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + "sigs.k8s.io/container-object-storage-interface-api/controller" - osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" + osspec "sigs.k8s.io/container-object-storage-interface-spec" "k8s.io/klog/v2" diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go index 0bb98706..dfa51dc8 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -22,11 +22,11 @@ import ( "strings" "testing" - "github.com/kubernetes-sigs/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "github.com/kubernetes-sigs/container-object-storage-interface-api/clientset/fake" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - osspec "github.com/kubernetes-sigs/container-object-storage-interface-spec" - fakespec "github.com/kubernetes-sigs/container-object-storage-interface-spec/fake" + osspec "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go index 10518738..56848082 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go @@ -27,7 +27,7 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" - osi "github.com/kubernetes-sigs/container-object-storage-interface-spec" + osi "sigs.k8s.io/container-object-storage-interface-spec" "k8s.io/klog/v2" ) From dd8b1f92c844aeb86956981044584ee5ae20cdae Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 4 Mar 2021 17:34:37 -0500 Subject: [PATCH 165/299] update controllers, test and sample driver to use updated api/spec --- .../Makefile | 2 +- .../app/objectstorage-sidecar.go | 5 +- .../cmd/sample-driver/driver-server.go | 31 +- .../go.mod | 3 +- .../go.sum | 13 +- .../controller/bucket/bucket_controller.go | 50 ++-- .../bucket/bucket_controller_test.go | 280 +++++++++--------- .../bucketaccess/bucket_access_controller.go | 61 ++-- .../bucket_access_controller_test.go | 256 ++++++++-------- 9 files changed, 353 insertions(+), 348 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index ec48ffc8..9a6bd2ca 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -20,7 +20,7 @@ reltools: release-tools/build.make release-tools/build.make: $(eval CURDIR := $(shell pwd)) $(eval TMP := $(shell mktemp -d)) - $(shell cd ${TMP} && git clone https://sigs.k8s.io/container-object-storage-interface-spec) + $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) $(shell rm -rf ${TMP}) ln -s release-tools/travis.yml travis.yml diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go index 787b2cde..cc5aac95 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go @@ -54,15 +54,18 @@ func (so *SidecarOptions) Run() { klog.Infof("creating provisioner client") provisionerClient := osspec.NewProvisionerClient(grpcConn) + identityClient := osspec.NewIdentityClient(grpcConn) klog.Infof("discovering driver name") req := osspec.ProvisionerGetInfoRequest{} - rsp, err := provisionerClient.ProvisionerGetInfo(ctx, &req) + rsp, err := identityClient.ProvisionerGetInfo(ctx, &req) if err != nil { klog.Errorf("error calling ProvisionerGetInfo: %v", err) os.Exit(1) } + // TODO: go routine with health check to vendor driver + provisionerName := rsp.Name // TODO: Register provisioner using internal type klog.Info("This sidecar is working with the driver identified as: ", provisionerName) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go index e4c155a6..9d5e7953 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go @@ -63,41 +63,54 @@ func (ds DriverServer) ProvisionerCreateBucket(ctx context.Context, req *cosi.Pr return nil, status.Error(codes.Unavailable, "Driver is missing version") } - err := ds.S3Client.MakeBucket(req.BucketName, "") + s3 := req.Protocol.GetS3() + if s3 == nil { + return nil, status.Error(codes.Unavailable, "Driver is missing protocol") + } + + err := ds.S3Client.MakeBucket(s3.BucketName, "") if err != nil { // Check to see if the bucket already exists - exists, errBucketExists := ds.S3Client.BucketExists(req.BucketName) + exists, errBucketExists := ds.S3Client.BucketExists(s3.BucketName) if errBucketExists == nil && exists { - klog.Info("Backend Bucket already exists", req.BucketName) + klog.Info("Backend Bucket already exists", s3.BucketName) return &cosi.ProvisionerCreateBucketResponse{}, nil } else { klog.Error(err) return &cosi.ProvisionerCreateBucketResponse{}, err } } - klog.Info("Successfully created Backend Bucket", req.BucketName) + klog.Info("Successfully created Backend Bucket", s3.BucketName) return &cosi.ProvisionerCreateBucketResponse{}, nil } func (ds *DriverServer) ProvisionerDeleteBucket(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { + s3 := req.Protocol.GetS3() + if s3 == nil { + return nil, status.Error(codes.Unavailable, "Driver is missing protocol") + } - if err := ds.S3Client.RemoveBucket(req.BucketName); err != nil { - klog.Info("failed to delete bucket", req.BucketName) + if err := ds.S3Client.RemoveBucket(s3.BucketName); err != nil { + klog.Info("failed to delete bucket", s3.BucketName) return nil, err - } + return &cosi.ProvisionerDeleteBucketResponse{}, nil } func (ds *DriverServer) ProvisionerGrantBucketAccess(ctx context.Context, req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { - creds, err := auth.GetNewCredentials() if err != nil { klog.Error("failed to generate new credentails") return nil, err } + s3 := req.Protocol.GetS3() + if s3 == nil { + return nil, status.Error(codes.Unavailable, "Driver is missing protocol") + } + if err := ds.S3AdminClient.AddUser(context.Background(), creds.AccessKey, creds.SecretKey); err != nil { klog.Error("failed to create user", err) return nil, err @@ -110,7 +123,7 @@ func (ds *DriverServer) ProvisionerGrantBucketAccess(ctx context.Context, req *c iampolicy.NewStatement( policy.Allow, iampolicy.NewActionSet("s3:*"), - iampolicy.NewResourceSet(iampolicy.NewResource(req.GetBucketName()+"/*", "")), + iampolicy.NewResourceSet(iampolicy.NewResource(s3.BucketName+"/*", "")), condition.NewFunctions(), )}, } diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 2305f202..39df6eb1 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -7,6 +7,7 @@ require ( github.com/kubernetes-csi/csi-lib-utils v0.9.0 github.com/minio/minio v0.0.0-20210112204746-e09196d62633 github.com/minio/minio-go v6.0.14+incompatible + github.com/pkg/errors v0.9.1 github.com/spf13/cobra v0.0.5 github.com/spf13/viper v1.3.2 golang.org/x/net v0.0.0-20201216054612-986b41b23924 @@ -16,6 +17,6 @@ require ( k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index d7e048b5..4bd17b23 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -96,7 +96,6 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -149,7 +148,6 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -962,9 +960,6 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1068,12 +1063,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3 h1:SVbl8M9RAoLUqJ83eLxDWVyMHz09CZ+dkUjkR7kG9eo= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210112203836-a74c106d3ab3/go.mod h1:C7tjzC+nLe7H7+3UM/Z6a7F24yxOO8FSK3ZaVZrKDPQ= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 h1:ZjGviVPvDVxOhCF7+dsbAk5GPfUpEnM0DtR5yH7S6ww= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9/go.mod h1:4V9ty4CWneFEQJbr+yQPjkCdUH3EKfjXM4AQXLY4Sa8= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74 h1:+i43Z3yKW7htLAATafmbZ7ULFwwT+8vwB7NMxZ1X3Ww= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210107181053-ef523592ca74/go.mod h1:wojgWDesMMLuFza4p1YnpX3sdPeo0mDWmSbmPsxRDh0= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c h1:GANfOgppBbhCKqGFDVnuluhJ5km8gqNDatXn5ULGUt8= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c/go.mod h1:yMgeGQDROJIdY1jymECN2ptefmQ4+e3EQB/S8gyIE0o= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 h1:TIx7kV6/3ZSQ5BETBx1QG1Va28zv1LZAvqRjs28n8ss= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go index 57aae6cc..4dfb6b62 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go @@ -19,6 +19,7 @@ package bucket import ( "context" "fmt" + "github.com/pkg/errors" "strings" "time" @@ -101,20 +102,28 @@ func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { } req := osspec.ProvisionerCreateBucketRequest{ - BucketName: obj.Name, - BucketContext: bl.getParams(obj), + Parameters: bl.getParams(obj), } + if req.Parameters == nil { + req.Parameters = make(map[string]string) + } + + proto, err := obj.Spec.Protocol.ConvertToExternal() + if err != nil { + return errors.Wrap(err, "failed to parse protocol for API") + } + req.Protocol = proto - req.BucketContext["ProtocolVersion"] = obj.Spec.Protocol.Version + req.Parameters["ProtocolVersion"] = obj.Spec.Protocol.Version if obj.Spec.AnonymousAccessMode.Private { - req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_PRIVATE + req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_Private } else if obj.Spec.AnonymousAccessMode.PublicReadOnly { - req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_READ_ONLY + req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_ReadOnly } else if obj.Spec.AnonymousAccessMode.PublicReadWrite { - req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_WRITE_ONLY + req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_ReadWrite } else if obj.Spec.AnonymousAccessMode.PublicWriteOnly { - req.AnonymousBucketAccessMode = osspec.ProvisionerCreateBucketRequest_BUCKET_READ_WRITE + req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_WriteOnly } // TODO set grpc timeout @@ -147,28 +156,19 @@ func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) erro } req := osspec.ProvisionerDeleteBucketRequest{ - BucketContext: bl.getParams(obj), + Parameters: bl.getParams(obj), + } + if req.Parameters == nil { + req.Parameters = make(map[string]string) } - switch obj.Spec.Protocol.Name { - case v1alpha1.ProtocolNameS3: - req.BucketName = obj.Spec.Protocol.S3.BucketName - req.BucketContext["Region"] = obj.Spec.Protocol.S3.Region - req.BucketContext["SignatureVersion"] = string(obj.Spec.Protocol.S3.SignatureVersion) - req.BucketContext["Endpoint"] = obj.Spec.Protocol.S3.Endpoint - case v1alpha1.ProtocolNameAzure: - req.BucketName = obj.Spec.Protocol.AzureBlob.ContainerName - req.BucketContext["StorageAccount"] = obj.Spec.Protocol.AzureBlob.StorageAccount - case v1alpha1.ProtocolNameGCS: - req.BucketName = obj.Spec.Protocol.GCS.BucketName - req.BucketContext["ServiceAccount"] = obj.Spec.Protocol.GCS.ServiceAccount - req.BucketContext["PrivateKeyName"] = obj.Spec.Protocol.GCS.PrivateKeyName - req.BucketContext["ProjectID"] = obj.Spec.Protocol.GCS.ProjectID - default: - return fmt.Errorf("unknown protocol: %s", obj.Spec.Protocol.Name) + proto, err := obj.Spec.Protocol.ConvertToExternal() + if err != nil { + return errors.Wrap(err, "failed to parse protocol for API") } + req.Protocol = proto - req.BucketContext["ProtocolVersion"] = obj.Spec.Protocol.Version + req.Parameters["ProtocolVersion"] = obj.Spec.Protocol.Version // TODO set grpc timeout rsp, err := bl.provisionerClient.ProvisionerDeleteBucket(ctx, &req) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go index 1cf49533..90657a2d 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go @@ -78,8 +78,8 @@ func TestInitializeBucketClient(t *testing.T) { func TestAddWrongProvisioner(t *testing.T) { provisioner := "provisioner1" - mpc := struct{ fakespec.MockProvisionerClient }{} - mpc.CreateBucket = func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerCreateBucket = func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { t.Errorf("grpc client called") return nil, nil } @@ -103,128 +103,133 @@ func TestAddWrongProvisioner(t *testing.T) { func TestAddValidProtocols(t *testing.T) { provisioner := "provisioner1" - region := "region1" - bucketName := "bucket1" protocolVersion := "proto1" - sigVersion := v1alpha1.S3SignatureVersionV2 - account := "account1" - keyName := "keyName1" - projID := "id1" anonAccess := "BUCKET_PRIVATE" - mpc := struct{ fakespec.MockProvisionerClient }{} + bucketName := "bucket1" + s3 := v1alpha1.S3Protocol{ + BucketName: "bucket1", + Endpoint: "127.0.0.1", + Region: "region1", + SignatureVersion: v1alpha1.S3SignatureVersionV2, + } + gcs := v1alpha1.GCSProtocol{ + BucketName: "bucket1", + PrivateKeyName: "keyName1", + ProjectID: "id1", + ServiceAccount: "account1", + } + azure := v1alpha1.AzureProtocol{ + ContainerName: "bucket1", + StorageAccount: "account1", + } + mpc := struct{ fakespec.FakeProvisionerClient }{} testCases := []struct { name string protocolName v1alpha1.ProtocolName + setProtocol func(b *v1alpha1.Bucket) createFunc func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) params map[string]string }{ { name: "S3", protocolName: v1alpha1.ProtocolNameS3, - createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.S3 = &s3 + }, + createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + in := req.Protocol.GetS3() + if in.BucketName != s3.BucketName { + t.Errorf("expected %s, got %s", s3.BucketName, in.BucketName) + } + if in.Region != s3.Region { + t.Errorf("expected %s, got %s", s3.Region, in.Region) + } + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if sigver != string(s3.SignatureVersion) { + t.Errorf("expected %s, got %s", s3.SignatureVersion, sigver) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if in.Endpoint != s3.Endpoint { + t.Errorf("expected %s, got %s", in.Endpoint, in.Endpoint) } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerCreateBucketResponse{}, nil }, - params: map[string]string{ - "Region": region, - "SignatureVersion": string(sigVersion), - }, }, { name: "GCS", protocolName: v1alpha1.ProtocolNameGCS, - createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.GCS = &gcs + }, + createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + in := req.Protocol.GetGcs() + if in.BucketName != gcs.BucketName { + t.Errorf("expected %s, got %s", gcs.BucketName, in.BucketName) } - if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) + if in.ServiceAccount != gcs.ServiceAccount { + t.Errorf("expected %s, got %s", gcs.ServiceAccount, in.ServiceAccount) } - if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) + if in.PrivateKeyName != gcs.PrivateKeyName { + t.Errorf("expected %s, got %s", gcs.PrivateKeyName, in.PrivateKeyName) } - if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) + if in.ProjectId != gcs.ProjectID { + t.Errorf("expected %s, got %s", gcs.ProjectID, in.ProjectId) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerCreateBucketResponse{}, nil }, - params: map[string]string{ - "ServiceAccount": account, - "PrivateKeyName": keyName, - "ProjectID": projID, - }, }, { name: "AzureBlob", protocolName: v1alpha1.ProtocolNameAzure, - createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.AzureBlob = &azure + }, + createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + in := req.Protocol.GetAzureBlob() + if in.ContainerName != azure.ContainerName { + t.Errorf("expected %s, got %s", azure.ContainerName, in.ContainerName) } - if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + if in.StorageAccount != azure.StorageAccount { + t.Errorf("expected %s, got %s", azure.StorageAccount, in.StorageAccount) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerCreateBucketResponse{}, nil }, - params: map[string]string{ - "StorageAccount": account, - }, }, { name: "AnonymousAccessMode", protocolName: v1alpha1.ProtocolNameAzure, - createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + setProtocol: func(b *v1alpha1.Bucket) { + b.Spec.Protocol.AzureBlob = &azure + }, + createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { + in := req.Protocol.GetAzureBlob() + if in.ContainerName != azure.ContainerName { + t.Errorf("expected %s, got %s", azure.ContainerName, in.ContainerName) } - if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + if in.StorageAccount != azure.StorageAccount { + t.Errorf("expected %s, got %s", azure.StorageAccount, in.StorageAccount) } - aMode := osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode(osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode_value[anonAccess]) - if in.AnonymousBucketAccessMode != aMode { - t.Errorf("expected %s, got %s", aMode, in.AnonymousBucketAccessMode) + aMode := osspec.AnonymousBucketAccessMode(osspec.AnonymousBucketAccessMode_value[anonAccess]) + if req.AnonymousBucketAccessMode != aMode { + t.Errorf("expected %s, got %s", aMode, req.AnonymousBucketAccessMode) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerCreateBucketResponse{}, nil }, - params: map[string]string{ - "StorageAccount": account, - "AnonymousAccessMode": anonAccess, - }, - }, - { - name: "Empty parameters", - protocolName: v1alpha1.ProtocolNameS3, - createFunc: func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) - } - return &osspec.ProvisionerCreateBucketResponse{}, nil - }, - params: nil, }, } @@ -236,10 +241,8 @@ func TestAddValidProtocols(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner, Protocol: v1alpha1.Protocol{ - RequestedProtocol: v1alpha1.RequestedProtocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, + Name: tc.protocolName, + Version: protocolVersion, }, Parameters: tc.params, }, @@ -248,7 +251,7 @@ func TestAddValidProtocols(t *testing.T) { ctx := context.TODO() client := fakebucketclientset.NewSimpleClientset(&b) kubeClient := fakekubeclientset.NewSimpleClientset() - mpc.CreateBucket = tc.createFunc + mpc.FakeProvisionerCreateBucket = tc.createFunc bl := bucketListener{ provisionerName: provisioner, provisionerClient: &mpc, @@ -256,6 +259,7 @@ func TestAddValidProtocols(t *testing.T) { kubeClient: kubeClient, } + tc.setProtocol(&b) t.Logf(tc.name) err := bl.Add(ctx, &b) if err != nil { @@ -271,8 +275,8 @@ func TestAddValidProtocols(t *testing.T) { func TestDeleteWrongProvisioner(t *testing.T) { provisioner := "provisioner1" - mpc := struct{ fakespec.MockProvisionerClient }{} - mpc.DeleteBucket = func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerDeleteBucket = func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { t.Errorf("grpc client called") return nil, nil } @@ -304,7 +308,7 @@ func TestDeleteValidProtocols(t *testing.T) { keyName := "keyName1" projID := "id1" endpoint := "endpoint1" - mpc := struct{ fakespec.MockProvisionerClient }{} + mpc := struct{ fakespec.FakeProvisionerClient }{} extraParamName := "ParamName" extraParamValue := "ParamValue" @@ -320,34 +324,35 @@ func TestDeleteValidProtocols(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerDeleteBucketResponse{}, nil }, @@ -366,24 +371,25 @@ func TestDeleteValidProtocols(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameGCS, - deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + in := req.Protocol.GetGcs() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"]) + if in.ServiceAccount != account { + t.Errorf("expected %s, got %s", region, in.ServiceAccount) } - if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"]) + if in.PrivateKeyName != keyName { + t.Errorf("expected %s, got %s", region, in.PrivateKeyName) } - if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"]) + if in.ProjectId != projID { + t.Errorf("expected %s, got %s", region, in.ProjectId) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerDeleteBucketResponse{}, nil }, @@ -400,18 +406,19 @@ func TestDeleteValidProtocols(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameAzure, - deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + in := req.Protocol.GetAzureBlob() + if in.ContainerName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.ContainerName) } - if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"]) + if in.StorageAccount != account { + t.Errorf("expected %s, got %s", region, in.StorageAccount) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerDeleteBucketResponse{}, nil }, @@ -424,31 +431,32 @@ func TestDeleteValidProtocols(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - deleteFunc: func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } - if in.BucketContext["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["ProtocolVersion"]) + if req.Parameters["ProtocolVersion"] != protocolVersion { + t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) } return &osspec.ProvisionerDeleteBucketResponse{}, nil }, @@ -461,10 +469,8 @@ func TestDeleteValidProtocols(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner, Protocol: v1alpha1.Protocol{ - RequestedProtocol: v1alpha1.RequestedProtocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, + Name: tc.protocolName, + Version: protocolVersion, }, Parameters: tc.params, }, @@ -475,7 +481,7 @@ func TestDeleteValidProtocols(t *testing.T) { ctx := context.TODO() client := fakebucketclientset.NewSimpleClientset(&b) - mpc.DeleteBucket = tc.deleteFunc + mpc.FakeProvisionerDeleteBucket = tc.deleteFunc bl := bucketListener{ provisionerName: provisioner, provisionerClient: &mpc, @@ -515,9 +521,7 @@ func TestDeleteInvalidProtocol(t *testing.T) { }, Provisioner: provisioner, Protocol: v1alpha1.Protocol{ - RequestedProtocol: v1alpha1.RequestedProtocol{ - Name: protocolName, - }, + Name: protocolName, }, }, } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go index bce9c148..37c6db58 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go @@ -19,6 +19,7 @@ package bucketaccess import ( "context" "fmt" + "github.com/pkg/errors" "strings" "time" @@ -114,30 +115,21 @@ func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAc } req := osspec.ProvisionerGrantBucketAccessRequest{ - Principal: obj.Spec.Principal, - AccessPolicy: obj.Spec.PolicyActionsConfigMapData, - BucketContext: bal.getParams(obj), + Principal: obj.Spec.Principal, + AccessPolicy: obj.Spec.PolicyActionsConfigMapData, + Parameters: bal.getParams(obj), } - switch bucket.Spec.Protocol.Name { - case v1alpha1.ProtocolNameS3: - req.BucketName = bucket.Spec.Protocol.S3.BucketName - req.BucketContext["Region"] = bucket.Spec.Protocol.S3.Region - req.BucketContext["Version"] = bucket.Spec.Protocol.S3.Version - req.BucketContext["SignatureVersion"] = string(bucket.Spec.Protocol.S3.SignatureVersion) - req.BucketContext["Endpoint"] = bucket.Spec.Protocol.S3.Endpoint - case v1alpha1.ProtocolNameAzure: - req.BucketName = bucket.Spec.Protocol.AzureBlob.ContainerName - req.BucketContext["StorageAccount"] = bucket.Spec.Protocol.AzureBlob.StorageAccount - case v1alpha1.ProtocolNameGCS: - req.BucketName = bucket.Spec.Protocol.GCS.BucketName - req.BucketContext["ServiceAccount"] = bucket.Spec.Protocol.GCS.ServiceAccount - req.BucketContext["PrivateKeyName"] = bucket.Spec.Protocol.GCS.PrivateKeyName - req.BucketContext["ProjectID"] = bucket.Spec.Protocol.GCS.ProjectID - default: - return fmt.Errorf("unknown protocol: %s", bucket.Spec.Protocol.Name) + if req.Parameters == nil { + req.Parameters = make(map[string]string) } + proto, err := bucket.Spec.Protocol.ConvertToExternal() + if err != nil { + return errors.Wrap(err, "failed to parse protocol for API") + } + req.Protocol = proto + // TODO set grpc timeout rsp, err := bal.provisionerClient.ProvisionerGrantBucketAccess(ctx, &req) if err != nil { @@ -205,28 +197,19 @@ func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.Bucke } req := osspec.ProvisionerRevokeBucketAccessRequest{ - Principal: obj.Spec.Principal, - BucketContext: bal.getParams(obj), + Principal: obj.Spec.Principal, + Parameters: bal.getParams(obj), } - switch bucket.Spec.Protocol.Name { - case v1alpha1.ProtocolNameS3: - req.BucketName = bucket.Spec.Protocol.S3.BucketName - req.BucketContext["Region"] = bucket.Spec.Protocol.S3.Region - req.BucketContext["Version"] = bucket.Spec.Protocol.S3.Version - req.BucketContext["SignatureVersion"] = string(bucket.Spec.Protocol.S3.SignatureVersion) - req.BucketContext["Endpoint"] = bucket.Spec.Protocol.S3.Endpoint - case v1alpha1.ProtocolNameAzure: - req.BucketName = bucket.Spec.Protocol.AzureBlob.ContainerName - req.BucketContext["StorageAccount"] = bucket.Spec.Protocol.AzureBlob.StorageAccount - case v1alpha1.ProtocolNameGCS: - req.BucketName = bucket.Spec.Protocol.GCS.BucketName - req.BucketContext["ServiceAccount"] = bucket.Spec.Protocol.GCS.ServiceAccount - req.BucketContext["PrivateKeyName"] = bucket.Spec.Protocol.GCS.PrivateKeyName - req.BucketContext["ProjectID"] = bucket.Spec.Protocol.GCS.ProjectID - default: - return fmt.Errorf("unknown protocol: %s", bucket.Spec.Protocol.Name) + if req.Parameters == nil { + req.Parameters = make(map[string]string) + } + + proto, err := bucket.Spec.Protocol.ConvertToExternal() + if err != nil { + return errors.Wrap(err, "failed to parse protocol for API") } + req.Protocol = proto // TODO set grpc timeout rsp, err := bal.provisionerClient.ProvisionerRevokeBucketAccess(ctx, &req) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go index dfa51dc8..1612114f 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go @@ -79,8 +79,8 @@ func TestInitializeBucketClient(t *testing.T) { func TestAddWrongProvisioner(t *testing.T) { provisioner := "provisioner1" - mpc := struct{ fakespec.MockProvisionerClient }{} - mpc.GrantBucketAccess = func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerGrantBucketAccess = func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { t.Errorf("grpc client called") return nil, nil } @@ -118,7 +118,7 @@ func TestAdd(t *testing.T) { credsFile := "credsFile" generatedPrincipal := "driverPrincipal" sa := "serviceAccount" - mpc := struct{ fakespec.MockProvisionerClient }{} + mpc := struct{ fakespec.FakeProvisionerClient }{} extraParamName := "ParamName" extraParamValue := "ParamValue" @@ -136,34 +136,36 @@ func TestAdd(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["Version"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + // TODO do we need to check ProtocolVersion here? If so, from where? + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -188,24 +190,25 @@ func TestAdd(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameGCS, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + in := req.Protocol.GetGcs() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) + if in.ServiceAccount != account { + t.Errorf("expected %s, got %s", account, in.ServiceAccount) } - if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) + if in.PrivateKeyName != keyName { + t.Errorf("expected %s, got %s", keyName, in.PrivateKeyName) } - if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) + if in.ProjectId != projID { + t.Errorf("expected %s, got %s", projID, in.ProjectId) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -228,18 +231,19 @@ func TestAdd(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameAzure, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + in := req.Protocol.GetAzureBlob() + if in.ContainerName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.ContainerName) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + if in.StorageAccount != account { + t.Errorf("expected %s, got %s", account, in.StorageAccount) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -258,7 +262,6 @@ func TestAdd(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, @@ -283,7 +286,6 @@ func TestAdd(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, @@ -308,31 +310,33 @@ func TestAdd(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["Version"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + // TODO do we need to check ProtocolVersion here? If so, from where? + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } return &osspec.ProvisionerGrantBucketAccessResponse{ Principal: principal, @@ -354,9 +358,8 @@ func TestAdd(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner, Protocol: v1alpha1.Protocol{ - RequestedProtocol: v1alpha1.RequestedProtocol{ - Name: tc.protocolName, - }, + Name: tc.protocolName, + Version: protocolVersion, }, }, } @@ -380,7 +383,7 @@ func TestAdd(t *testing.T) { tc.setProtocol(&b) client := fakebucketclientset.NewSimpleClientset(&ba, &b) kubeClient := fakekubeclientset.NewSimpleClientset() - mpc.GrantBucketAccess = tc.grantFunc + mpc.FakeProvisionerGrantBucketAccess = tc.grantFunc bal := bucketAccessListener{ provisionerName: provisioner, provisionerClient: &mpc, @@ -423,8 +426,8 @@ func TestAdd(t *testing.T) { func TestDeleteWrongProvisioner(t *testing.T) { provisioner := "provisioner1" - mpc := struct{ fakespec.MockProvisionerClient }{} - mpc.RevokeBucketAccess = func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerRevokeBucketAccess = func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { t.Errorf("grpc client called") return nil, nil } @@ -452,13 +455,13 @@ func TestDelete(t *testing.T) { bucketName := "bucket1" principal := "principal1" protocolVersion := "proto1" - sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) + sigVersion := v1alpha1.S3SignatureVersionV2 account := "account1" keyName := "keyName1" projID := "id1" endpoint := "endpoint1" instanceName := "instance" - mpc := struct{ fakespec.MockProvisionerClient }{} + mpc := struct{ fakespec.FakeProvisionerClient }{} extraParamName := "ParamName" extraParamValue := "ParamValue" @@ -475,34 +478,36 @@ func TestDelete(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["Version"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + // TODO do we need to check ProtocolVersion here? If so, from where? + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -522,24 +527,25 @@ func TestDelete(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameGCS, - revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + in := req.Protocol.GetGcs() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["ServiceAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"]) + if in.ServiceAccount != account { + t.Errorf("expected %s, got %s", account, in.ServiceAccount) } - if in.BucketContext["PrivateKeyName"] != keyName { - t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"]) + if in.PrivateKeyName != keyName { + t.Errorf("expected %s, got %s", keyName, in.PrivateKeyName) } - if in.BucketContext["ProjectID"] != projID { - t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"]) + if in.ProjectId != projID { + t.Errorf("expected %s, got %s", projID, in.ProjectId) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -557,18 +563,19 @@ func TestDelete(t *testing.T) { } }, protocolName: v1alpha1.ProtocolNameAzure, - revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) + revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + in := req.Protocol.GetAzureBlob() + if in.ContainerName != bucketName { + t.Errorf("expected %s, got %s", bucketName, in.ContainerName) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["StorageAccount"] != account { - t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"]) + if in.StorageAccount != account { + t.Errorf("expected %s, got %s", account, in.StorageAccount) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -582,34 +589,36 @@ func TestDelete(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["Version"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + // TODO do we need to check ProtocolVersion here? If so, from where? + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } - if in.BucketContext[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, in.BucketContext[extraParamName]) + if req.Parameters[extraParamName] != extraParamValue { + t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -623,31 +632,33 @@ func TestDelete(t *testing.T) { setProtocol: func(b *v1alpha1.Bucket) { b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ Region: region, - Version: protocolVersion, SignatureVersion: sigVersion, BucketName: bucketName, Endpoint: endpoint, } }, protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { + in := req.Protocol.GetS3() if in.BucketName != bucketName { t.Errorf("expected %s, got %s", bucketName, in.BucketName) } - if in.BucketContext["Region"] != region { - t.Errorf("expected %s, got %s", region, in.BucketContext["Region"]) + if in.Region != region { + t.Errorf("expected %s, got %s", region, in.Region) } - if in.Principal != principal { - t.Errorf("expected %s, got %s", principal, in.Principal) + if req.Principal != principal { + t.Errorf("expected %s, got %s", principal, req.Principal) } - if in.BucketContext["Version"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"]) + // TODO do we need to check ProtocolVersion here? If so, from where? + sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] + if !ok { + sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] } - if in.BucketContext["SignatureVersion"] != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, in.BucketContext["SignatureVersion"]) + if sigver != string(sigVersion) { + t.Errorf("expected %s, got %s", sigVersion, sigver) } - if in.BucketContext["Endpoint"] != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.BucketContext["Endpoint"]) + if in.Endpoint != endpoint { + t.Errorf("expected %s, got %s", endpoint, in.Endpoint) } return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil }, @@ -664,9 +675,8 @@ func TestDelete(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner, Protocol: v1alpha1.Protocol{ - RequestedProtocol: v1alpha1.RequestedProtocol{ - Name: tc.protocolName, - }, + Name: tc.protocolName, + Version: protocolVersion, }, }, } @@ -702,7 +712,7 @@ func TestDelete(t *testing.T) { tc.setProtocol(&b) client := fakebucketclientset.NewSimpleClientset(&ba, &b) kubeClient := fakekubeclientset.NewSimpleClientset(&secret) - mpc.RevokeBucketAccess = tc.revokeFunc + mpc.FakeProvisionerRevokeBucketAccess = tc.revokeFunc bal := bucketAccessListener{ provisionerName: provisioner, provisionerClient: &mpc, From aff40a15b40696ae4f62c0298dabbd712c57b33b Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Thu, 11 Mar 2021 16:56:32 +0000 Subject: [PATCH 166/299] updated README.md --- .../README.md | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index 0890733f..929346fb 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -1,41 +1,61 @@ -COSI repos and images: +# Container Object Storage Provisioner Sidecar -[Spec](https://sigs.k8s.io/container-object-storage-interface-spec) \ -[API](https://sigs.k8s.io/container-object-storage-interface-api) \ -[Controller](https://sigs.k8s.io/container-object-storage-interface-controller)
-  - [images: cosi-controller](https://quay.io/repository/containerobjectstorage/objectstorage-controller?tab=tags) \ - [Provisioner Sidecar](https://sigs.k8s.io/container-object-storage-interface-provisioner-sidecar)
-   - images: cosi-provisioner \ - [CSI Adapter](https://sigs.k8s.io/container-object-storage-interface-csi-adapter)
-   - images: cosi-node-adapter +Container Object Storage Interface (COSI) provisioner sidecar is responsible to manage lifecycle of COSI objects and is +deployed as a sidecar to a provisioner. +Specifically, the sidecar monitors the lifecycle of the CRDs generated by the [COSI Controller](https://github.com/kubernetes-sigs/container-object-storage-interface-controller): -
- -COSI deprecated repos: +- Bucket - Represents a Bucket or its equivalent in the storage backend +- BucketAccess - Represents a access token or service account in the storage backend -[Spec](https://github.com/container-object-storage-interface/spec) \ -[API](https://github.com/container-object-storage-interface/api) \ -[Manager (i.e. Controller)](https://github.com/container-object-storage-interface/cosi-controller-manager) \ -[Provisioner Sidecar](https://github.com/container-object-storage-interface/cosi-provisioner-sidecar) \ -[Ephemeral CSI Driver](https://github.com/container-object-storage-interface/ephemeral-csi-driver) +and makes gRPC calls to the associated provisioner. -# Container Object Storage Interface Provisioner Sidecar +In this repo you will also find a [sample provisioner](./cmd/sample-driver) based on Minio. - Container Object Storage Interface (COSI) provisioner responsible to interface with COSI drivers. +## Developer Guide -## Community, discussion, contribution, and support +Before diving into the code of this repo, we suggest that you familiarize yourself with: + +- The Spec of CRDs in [objectstorage.k8s.io/v1alpha1/types.go](https://github.com/kubernetes-sigs/container-object-storage-interface-api/blob/master/apis/objectstorage.k8s.io/v1alpha1/types.go) +- The Spec of the COSI objects [sigs.k8s.io/container-object-storage-interface-spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec) + +A good starting point towards understanding the functionality of this repo would be to study the tests: + +- [Bucket Controller Test](./pkg/controller/bucket/bucket_controller_test.go) +- [Bucket Access Controller Test](./pkg/controller/bucketaccess/bucket_access_controller_test.go) + +### Build and Test -If you are new to a SIG Storage project, check out this [contributing guide](https://github.com/kubernetes/community/blob/master/sig-storage/CONTRIBUTING.md) -and the [community page](https://github.com/kubernetes/community/tree/master/sig-storage). +In order to build and generate the Docker images execute: +```bash +make container +``` +Notice that this command will also generate the image for the sample-driver: +```bash +objectstorage-sidecar:latest +sample-driver:latest +``` -If you are new to the SIG Storage COSI project, check out the [spec](https://sigs.k8s.io/container-object-storage-interface-spec/blob/master/spec.md), [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1979-object-storage-support), and [project board](https://github.com/orgs/kubernetes-sigs/projects/). + +In order to run the tests execute: +```bash +make test +``` + +## References + +- [Documentation](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/index.md) +- [Deployment Guide](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/deployment-guide.md) +- [Weekly Meetings](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/meetings.md) +- [Roadmap](https://github.com/orgs/kubernetes-sigs/projects/8) + +## Community, discussion, contribution, and support Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). You can reach the maintainers of this project at: - [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) -- [Mailing List](https://groups.google.com/g/container-object-storage-interface-wg?pli=1) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) ### Code of conduct From fe7ad657dbe221f62b369dc5799d3800a5d0bb46 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Sun, 14 Mar 2021 21:06:01 -0700 Subject: [PATCH 167/299] update api version & glog -> klog --- .../controller-manager/controller-manager.go | 36 ++-- .../go.mod | 7 +- .../go.sum | 49 ++--- .../bucketaccessrequest.go | 22 +-- .../pkg/bucketrequest/bucketrequest.go | 167 ++++++++++-------- .../pkg/bucketrequest/bucketrequest_test.go | 6 +- .../pkg/util/util.go | 22 +-- 7 files changed, 145 insertions(+), 164 deletions(-) diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index b2508fa4..7d9dc866 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -14,7 +14,7 @@ import ( "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketrequest" bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" - "github.com/golang/glog" + "k8s.io/klog/v2" ) var cmd = &cobra.Command{ @@ -29,34 +29,20 @@ var cmd = &cobra.Command{ } var kubeConfig string +var verbosity int func init() { viper.AutomaticEnv() - cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine) - flag.Set("logtostderr", "true") + flag.Set("alsologtostderr", "true") + kflags := flag.NewFlagSet("klog", flag.ExitOnError) + klog.InitFlags(kflags) - strFlag := func(c *cobra.Command, ptr *string, name string, short string, dfault string, desc string) { - c.PersistentFlags(). - StringVarP(ptr, name, short, dfault, desc) - } - strFlag(cmd, &kubeConfig, "kubeconfig", "", kubeConfig, "path to kubeconfig file") - - hideFlag := func(name string) { - cmd.PersistentFlags().MarkHidden(name) - } - hideFlag("alsologtostderr") - hideFlag("log_backtrace_at") - hideFlag("log_dir") - hideFlag("logtostderr") - hideFlag("master") - hideFlag("stderrthreshold") - hideFlag("vmodule") + cmd.PersistentFlags().AddGoFlagSet(kflags) + cmd.PersistentFlags().StringVarP(&kubeConfig, "kubeconfig", "", kubeConfig, "path to kubeconfig file") - // suppress the incorrect prefix in glog output - flag.CommandLine.Parse([]string{}) + //flag.CommandLine.Parse([]string{}) viper.BindPFlags(cmd.PersistentFlags()) - } func main() { @@ -72,16 +58,16 @@ func main() { }() if err := cmd.ExecuteContext(ctx); err != nil { - glog.Fatal(err.Error()) + klog.Error(err) } } func run(ctx context.Context, args []string) error { - ctrl, err := bucketcontroller.NewDefaultObjectStorageController("controller-manager", "leader-lock", 40) + ctrl, err := bucketcontroller.NewDefaultObjectStorageController("cosi-controller-manager", "leader-lock", 40) if err != nil { return err } - ctrl.AddBucketRequestListener(bucketrequest.NewListener()) + ctrl.AddBucketRequestListener(bucketrequest.NewBucketRequestListener()) ctrl.AddBucketAccessRequestListener(bucketaccessrequest.NewListener()) return ctrl.Run(ctx) } diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index ef1e3da7..65a358ad 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -3,10 +3,7 @@ module github.com/kubernetes-sigs/container-object-storage-interface-controller go 1.15 require ( - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/golang/protobuf v1.4.3 // indirect github.com/google/go-cmp v0.5.2 // indirect - github.com/google/uuid v1.1.2 // indirect github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect github.com/kr/text v0.2.0 // indirect github.com/mailru/easyjson v0.7.6 // indirect @@ -29,8 +26,8 @@ require ( k8s.io/apiextensions-apiserver v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 - k8s.io/klog/v2 v2.4.0 // indirect + k8s.io/klog/v2 v2.4.0 k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 634efa7a..824260f5 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -61,6 +61,7 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -78,6 +79,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -94,7 +96,9 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -196,7 +200,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -205,8 +208,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -218,7 +221,6 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= 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= @@ -230,7 +232,6 @@ github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1a github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f h1:4Gslotqbs16iAg+1KR/XdabIfq8TlAWHdwS5QJFksLc= github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -266,10 +267,8 @@ 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/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -295,11 +294,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -311,7 +308,6 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 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/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -352,7 +348,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= @@ -360,7 +355,6 @@ github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -373,7 +367,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -408,7 +401,6 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= @@ -443,8 +435,8 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= @@ -488,7 +480,6 @@ golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -538,12 +529,12 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/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-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= @@ -551,7 +542,6 @@ golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -597,7 +587,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= @@ -609,7 +598,6 @@ golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fq golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -647,13 +635,11 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 h1:UaoXseXAWUJUcuJ2E2oczJdLxAJXL0lOmVaBl7kuk+I= golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e h1:Z2uDrs8MyXUWJbwGc4V+nGjV4Ygo+oubBbWSVQw21/I= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -680,6 +666,7 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -687,8 +674,11 @@ google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -697,22 +687,20 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/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 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -726,7 +714,6 @@ 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -775,15 +762,12 @@ k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= @@ -794,15 +778,16 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9 h1:ZjGviVPvDVxOhCF7+dsbAk5GPfUpEnM0DtR5yH7S6ww= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210225042325-7c26b4fc1ed9/go.mod h1:4V9ty4CWneFEQJbr+yQPjkCdUH3EKfjXM4AQXLY4Sa8= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd h1:29yp8kNmIAvmVrk49H+CWBa7Yf4fipVLcTyong15tbs= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd/go.mod h1:yMgeGQDROJIdY1jymECN2ptefmQ4+e3EQB/S8gyIE0o= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 h1:TIx7kV6/3ZSQ5BETBx1QG1Va28zv1LZAvqRjs28n8ss= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index b07d1917..860cbec9 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -14,7 +14,7 @@ import ( bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" - "github.com/golang/glog" + "k8s.io/klog/v2" ) type bucketAccessRequestListener struct { @@ -35,7 +35,7 @@ func (b *bucketAccessRequestListener) InitializeBucketClient(bc bucketclientset. } func (b *bucketAccessRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { - glog.V(1).Infof("Add called for BucketAccessRequest %s", obj.Name) + klog.V(1).Infof("Add called for BucketAccessRequest %s", obj.Name) bucketAccessRequest := obj err := b.provisionBucketAccess(ctx, bucketAccessRequest) @@ -43,25 +43,25 @@ func (b *bucketAccessRequestListener) Add(ctx context.Context, obj *v1alpha1.Buc // Provisioning is 100% finished / not in progress. switch err { case util.ErrBucketAccessAlreadyExists: - glog.V(1).Infof("BucketAccess already exist for this BucketAccessRequest %v.", bucketAccessRequest.Name) + klog.V(1).Infof("BucketAccess already exist for this BucketAccessRequest %v.", bucketAccessRequest.Name) err = nil default: - glog.V(1).Infof("Error occurred processing BucketAccessRequest %v: %v", bucketAccessRequest.Name, err) + klog.V(1).Infof("Error occurred processing BucketAccessRequest %v: %v", bucketAccessRequest.Name, err) } return err } - glog.V(1).Infof("BucketAccessRequest %v is successfully processed.", bucketAccessRequest.Name) + klog.V(1).Infof("BucketAccessRequest %v is successfully processed.", bucketAccessRequest.Name) return nil } func (b *bucketAccessRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccessRequest) error { - glog.V(1).Infof("Update called for BucketAccessRequest %v", old.Name) + klog.V(1).Infof("Update called for BucketAccessRequest %v", old.Name) return nil } func (b *bucketAccessRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { - glog.V(1).Infof("Delete called for BucketAccessRequest %v", obj.Name) + klog.V(1).Infof("Delete called for BucketAccessRequest %v", obj.Name) return nil } @@ -82,7 +82,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, if err != nil { // anything other than 404 if !errors.IsNotFound(err) { - glog.Errorf("error fetching bucketaccess: %v", err) + klog.Errorf("error fetching bucketaccess: %v", err) return err } } else { // if bucket found @@ -93,7 +93,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketAccessClass, err := bacClient.Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if err != nil { // bucket access class is invalid or not specified, cannot continue with provisioning. - glog.Errorf("error fetching bucketaccessclass [%v]: %v", bucketAccessClassName, err) + klog.Errorf("error fetching bucketaccessclass [%v]: %v", bucketAccessClassName, err) return util.ErrInvalidBucketAccessClass } @@ -104,7 +104,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, } bucketRequest, err := brClient(bucketAccessRequest.Namespace).Get(ctx, brName, metav1.GetOptions{}) if err != nil { - glog.Errorf("error fetching bucket request [%v]: %v", brName, err) + klog.Errorf("error fetching bucket request [%v]: %v", brName, err) return err } @@ -163,7 +163,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, if err != nil { return err } - glog.Infof("Finished creating BucketAccess %v", bucketaccess.Name) + klog.Infof("Finished creating BucketAccess %v", bucketaccess.Name) return nil } diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index 0403024f..f6d63d8c 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -2,7 +2,6 @@ package bucketrequest import ( "context" - "strings" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -13,76 +12,86 @@ import ( kubeclientset "k8s.io/client-go/kubernetes" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" + objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" - "github.com/golang/glog" + "k8s.io/klog/v2" ) +// bucketRequestListener is a resource handler for bucket requests objects type bucketRequestListener struct { kubeClient kubeclientset.Interface bucketClient bucketclientset.Interface } -func NewListener() bucketcontroller.BucketRequestListener { +func NewBucketRequestListener() *bucketRequestListener { return &bucketRequestListener{} } -func (b *bucketRequestListener) InitializeKubeClient(k kubeclientset.Interface) { - b.kubeClient = k -} - -func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { - b.bucketClient = bc -} - // Add creates a bucket in response to a bucketrequest -func (b *bucketRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketRequest) error { - glog.V(3).Infof("Add called for BucketRequest %s", obj.Name) - bucketRequest := obj +func (b *bucketRequestListener) Add(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { + klog.V(3).InfoS("Add BucketRequest", + "name", bucketRequest.Name, + "ns", bucketRequest.Namespace, + "bucketClass", bucketRequest.Spec.BucketClassName, + "bucketPrefix", bucketRequest.Spec.BucketPrefix, + ) + err := b.provisionBucketRequestOperation(ctx, bucketRequest) if err != nil { - // Provisioning is 100% finished / not in progress. switch err { case util.ErrInvalidBucketClass: - glog.V(1).Infof("BucketClass specified does not exist while processing BucketRequest %v.", bucketRequest.Name) - err = nil + klog.ErrorS(util.ErrInvalidBucketClass, + "bucketRequest", bucketRequest.Name, + "ns", bucketRequest.Namespace, + "bucketClassName", bucketRequest.Spec.BucketClassName) case util.ErrBucketAlreadyExists: - glog.V(1).Infof("Bucket already exist for this bucket request %v.", bucketRequest.Name) - err = nil + klog.V(3).InfoS("Bucket already exists", + "bucketRequest", bucketRequest.Name, + "ns", bucketRequest.Namespace, + ) + return nil default: - glog.V(1).Infof("Error occurred processing BucketRequest %v: %v", bucketRequest.Name, err) + klog.ErrorS(err, + "name", bucketRequest.Name, + "ns", bucketRequest.Namespace, + "err", err) } return err } - glog.V(1).Infof("BucketRequest %v is successfully processed.", bucketRequest.Name) + klog.V(3).InfoS("Add BucketRequest success", + "name", bucketRequest.Name, + "ns", bucketRequest.Namespace) return nil } // update processes any updates made to the bucket request func (b *bucketRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketRequest) error { - glog.V(3).Infof("Update called for BucketRequest %v", old.Name) + klog.V(3).InfoS("Update BucketRequest", + "name", old.Name, + "ns", old.Namespace) return nil } // Delete processes a bucket for which bucket request is deleted -func (b *bucketRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketRequest) error { - glog.V(3).Infof("Delete called for BucketRequest %v", obj.Name) +func (b *bucketRequestListener) Delete(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { + klog.V(3).Infof("Delete BucketRequest %v", + "name", bucketRequest.Name, + "ns", bucketRequest.Namespace) return nil } -// provisionBucketRequestOperation attempts to provision a bucket for the given bucketRequest. -// Returns nil error only when the bucket was provisioned, an error it set appropriately if not. -// Returns a normal error when the bucket was not provisioned and provisioning should be retried (requeue the bucketRequest), -// or the special error errBucketAlreadyExists, errInvalidBucketClass, when provisioning was impossible and -// no further attempts to provision should be tried. +// provisionBucketRequestOperation attempts to provision a bucket for a given bucketRequest. +// Return values +// nil - BucketRequest successfully processed +// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] +// ErrBucketAlreadyExists - BucketRequest already processed +// non-nil err - Internal error [requeue'd with exponential backoff] func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { - // Most code here is identical to that found in controller.go of kube's controller... - bucketClassName := b.GetBucketClass(bucketRequest) - - bucketClass, err := b.bucketClient.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) + bucketClassName := b.getBucketClass(bucketRequest) + bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if err != nil { - glog.Errorf("error getting bucketclass: [%v] %v", bucketClassName, err) + klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) return util.ErrInvalidBucketClass } @@ -92,15 +101,12 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont } name = name + string(bucketRequest.GetUID()) - bucket, err := b.bucketClient.ObjectstorageV1alpha1().Buckets().Get(context.Background(), name, metav1.GetOptions{}) - if err != nil { - // anything other than 404 - if !errors.IsNotFound(err) { - glog.Errorf("error fetching bucket: %v", err) - return err - } - } else { // if bucket found - return nil + bucket, err := b.Buckets().Get(ctx, name, metav1.GetOptions{}) + if err == nil { + return util.ErrBucketAlreadyExists + } else if !errors.IsNotFound(err) { // anything other than bucket not found error is an internal error + klog.ErrorS(err, "name", name) + return err } // create bucket @@ -114,39 +120,36 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket.Spec.BucketRequest = &v1.ObjectReference{ Name: bucketRequest.Name, Namespace: bucketRequest.Namespace, - UID: bucketRequest.ObjectMeta.UID} + UID: bucketRequest.ObjectMeta.UID, + } bucket.Spec.AllowedNamespaces = util.CopyStrings(bucketClass.AllowedNamespaces) bucket.Spec.Protocol = *bucketClass.Protocol.DeepCopy() bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) - bucket, err = b.bucketClient.ObjectstorageV1alpha1().Buckets().Create(context.Background(), bucket, metav1.CreateOptions{}) + bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) if err != nil { if errors.IsAlreadyExists(err) { - return nil + return util.ErrBucketAlreadyExists } - glog.V(5).Infof("Error occurred when creating Bucket %v", err) + klog.ErrorS(err, "name", bucket.Name) return err } - err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + updateBucketRequest := func() error { bucketRequest.Spec.BucketInstanceName = bucket.Name - _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) + _, err := b.BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) if err != nil { return err } return nil - }) - if err != nil { - return err } - glog.Infof("Finished creating Bucket %v", bucket.Name) - return nil + + return retry.RetryOnConflict(retry.DefaultRetry, updateBucketRequest) } -// GetBucketClass returns BucketClassName. If no bucket class was in the request it returns empty +// getBucketClass returns BucketClassName. If no bucket class was in the request it returns empty // TODO this methods can be more sophisticate to address bucketClass overrides using annotations just like SC. -func (b *bucketRequestListener) GetBucketClass(bucketRequest *v1alpha1.BucketRequest) string { - +func (b *bucketRequestListener) getBucketClass(bucketRequest *v1alpha1.BucketRequest) string { if bucketRequest.Spec.BucketClassName != "" { return bucketRequest.Spec.BucketClassName } @@ -154,27 +157,37 @@ func (b *bucketRequestListener) GetBucketClass(bucketRequest *v1alpha1.BucketReq return "" } -func (b *bucketRequestListener) FindBucket(ctx context.Context, br *v1alpha1.BucketRequest) *v1alpha1.Bucket { - bucketList, err := b.bucketClient.ObjectstorageV1alpha1().Buckets().List(ctx, metav1.ListOptions{}) - if err != nil { - return nil +// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. +func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { + klog.InfoS("Cloning Bucket", "name", bucketRequest.Spec.BucketInstanceName) + return util.ErrNotImplemented +} + +func (b *bucketRequestListener) InitializeKubeClient(k kubeclientset.Interface) { + b.kubeClient = k +} + +func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { + b.bucketClient = bc +} + +func (b *bucketRequestListener) Buckets() objectstoragev1alpha1.BucketInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().Buckets() } - if len(bucketList.Items) > 0 { - for _, bucket := range bucketList.Items { - if strings.HasPrefix(bucket.Name, br.Spec.BucketPrefix) && - bucket.Spec.BucketClassName == br.Spec.BucketClassName && - bucket.Spec.BucketRequest.Name == br.Name && - bucket.Spec.BucketRequest.Namespace == br.Namespace && - bucket.Spec.BucketRequest.UID == br.ObjectMeta.UID { - return &bucket - } - } + panic("uninitialized listener") +} + +func (b *bucketRequestListener) BucketClasses() objectstoragev1alpha1.BucketClassInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() } - return nil + panic("uninitialized listener") } -// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. -func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { - glog.V(1).Infof("Clone called for Bucket %s", bucketRequest.Spec.BucketInstanceName) - return util.ErrNotImplemented +func (b *bucketRequestListener) BucketRequests(namespace string) objectstoragev1alpha1.BucketRequestInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketRequests(namespace) + } + panic("uninitialized listener") } diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index c4fae686..342bb3a5 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -86,7 +86,7 @@ func runCreateBucket(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewListener() + listener := NewBucketRequestListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) @@ -129,7 +129,7 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewListener() + listener := NewBucketRequestListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) @@ -183,7 +183,7 @@ func runCreateBucketIdempotency(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewListener() + listener := NewBucketRequestListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index 2645d9a7..a3a4e1f6 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -32,7 +32,7 @@ import ( "sigs.k8s.io/controller-tools/pkg/loader" "sigs.k8s.io/controller-tools/pkg/markers" - "github.com/golang/glog" + "k8s.io/klog/v2" ) var ( @@ -105,26 +105,26 @@ func SetupTest(ctx context.Context) (bucketclientset.Interface, kubeclientset.In return rest.InClusterConfig() }() if err != nil { - glog.Fatalf("Failed to create clients: %v", err) + klog.Fatalf("Failed to create clients: %v", err) } kubeClient, err := kubeclientset.NewForConfig(config) if err != nil { - glog.Fatalf("Failed to create Kubernetes client: %v", err) + klog.Fatalf("Failed to create Kubernetes client: %v", err) } client, err := bucketclientset.NewForConfig(config) if err != nil { - glog.Fatalf("Failed to create ObjectStorage client: %v", err) + klog.Fatalf("Failed to create ObjectStorage client: %v", err) } crdClientset, err := apiextensions.NewForConfig(config) if err != nil { - glog.Fatalf("Failed to create CRD client: %v", err) + klog.Fatalf("Failed to create CRD client: %v", err) } err = RegisterCRDs(ctx, crdClientset.CustomResourceDefinitions()) if err != nil { - glog.Fatalf("Failed to register CRDs: %v", err) + klog.Fatalf("Failed to register CRDs: %v", err) } rateLimit := workqueue.NewMaxOfRateLimiter( @@ -133,7 +133,7 @@ func SetupTest(ctx context.Context) (bucketclientset.Interface, kubeclientset.In ) ctrl, err := controller.NewObjectStorageControllerWithClientset("controller-manager", "leader-lock", 40, rateLimit, kubeClient, client) if err != nil { - glog.Fatalf("Failed to create ObjectStorage Controller: %v", err) + klog.Fatalf("Failed to create ObjectStorage Controller: %v", err) } go ctrl.Run(ctx) @@ -153,7 +153,7 @@ func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpect if len(bucketList.Items) >= numExpected { return bucketList } else { - glog.Errorf("Failed to fetch the bucket created %v", err) + klog.Errorf("Failed to fetch the bucket created %v", err) } numtimes++ <-time.After(time.Duration(numtimes) * time.Second) @@ -239,7 +239,7 @@ func DeleteObjects(ctx context.Context, client bucketclientset.Interface, objs . DeleteObjects(ctx, client, a) } default: - glog.Errorf("Unknown Obj of type %v", t) + klog.Errorf("Unknown Obj of type %v", t) } } } @@ -318,7 +318,7 @@ func getCRDClient() (apiextensions.CustomResourceDefinitionInterface, error) { crdClientset, err := apiextensions.NewForConfig(config) if err != nil { - glog.Fatalf("could not initialize crd client: %v", err) + klog.Fatalf("could not initialize crd client: %v", err) return nil, err } return crdClientset.CustomResourceDefinitions(), err @@ -386,7 +386,7 @@ func RegisterCRDs(ctx context.Context, client apiextensions.CustomResourceDefini return &i }()) crdRaw := parser.CustomResourceDefinitions[groupKind] - glog.Infof("creating CRD: %v", groupKind) + klog.Infof("creating CRD: %v", groupKind) if crdRaw.ObjectMeta.Annotations == nil { crdRaw.ObjectMeta.Annotations = map[string]string{} } From 3f4019d641a2af4d1f75ebcf98dcd810e4956637 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 18 Mar 2021 12:47:50 -0400 Subject: [PATCH 168/299] add identity server to sample-driver --- .../cmd/sample-driver/driver-server.go | 20 ------- .../cmd/sample-driver/identity-server.go | 53 +++++++++++++++++++ .../cmd/sample-driver/sample-driver.go | 6 +-- .../pkg/grpcserver/server.go | 11 ++-- 4 files changed, 63 insertions(+), 27 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go index 9d5e7953..00d2cdf8 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go @@ -35,34 +35,14 @@ import ( cosi "sigs.k8s.io/container-object-storage-interface-spec" ) -var ( - PROVISIONER_NAME = "sample-provisioner.objectstorage.k8s.io" - VERSION = "dev" -) - type DriverServer struct { - Name, Version string S3Client *minio.Client S3AdminClient *madmin.AdminClient } -func (ds *DriverServer) ProvisionerGetInfo(context.Context, *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { - rsp := &cosi.ProvisionerGetInfoResponse{} - rsp.Name = fmt.Sprintf("%s-%s", ds.Name, ds.Version) - return rsp, nil -} - func (ds DriverServer) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { klog.Infof("Using minio to create Backend Bucket") - if ds.Name == "" { - return nil, status.Error(codes.Unavailable, "Driver name not configured") - } - - if ds.Version == "" { - return nil, status.Error(codes.Unavailable, "Driver is missing version") - } - s3 := req.Protocol.GetS3() if s3 == nil { return nil, status.Error(codes.Unavailable, "Driver is missing protocol") diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go new file mode 100644 index 00000000..6438221c --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go @@ -0,0 +1,53 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + + "github.com/minio/minio-go" + "github.com/minio/minio/pkg/madmin" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + cosi "sigs.k8s.io/container-object-storage-interface-spec" +) + +var ( + PROVISIONER_NAME = "sample-provisioner.objectstorage.k8s.io" + VERSION = "dev" +) + +type IdentityServer struct { + Name, Version string + S3Client *minio.Client + S3AdminClient *madmin.AdminClient +} + +func (id *IdentityServer) ProvisionerGetInfo(context.Context, *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { + if id.Name == "" { + return nil, status.Error(codes.Unavailable, "Driver name not configured") + } + + if id.Version == "" { + return nil, status.Error(codes.Unavailable, "Driver is missing version") + } + rsp := &cosi.ProvisionerGetInfoResponse{} + rsp.Name = fmt.Sprintf("%s-%s", id.Name, id.Version) + return rsp, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go index 9aaab8b7..af1c2b10 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go @@ -29,7 +29,6 @@ import ( "github.com/minio/minio/pkg/madmin" "github.com/spf13/cobra" "github.com/spf13/viper" - "k8s.io/klog/v2" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver" @@ -119,9 +118,10 @@ func run(args []string, endpoint string) error { if err != nil { klog.Fatalln(err) } - cds := DriverServer{Name: PROVISIONER_NAME, Version: VERSION, S3Client: minioClient, S3AdminClient: minioAdminClient} + cds := DriverServer{S3Client: minioClient, S3AdminClient: minioAdminClient} + ids := IdentityServer{Name: PROVISIONER_NAME, Version: VERSION} s := grpcserver.NewNonBlockingGRPCServer() - s.Start(endpoint, &cds) + s.Start(endpoint, &cds, &ids) s.Wait() return nil } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go index 56848082..a78901ef 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go @@ -35,7 +35,7 @@ import ( // Defines Non blocking GRPC server interfaces type NonBlockingGRPCServer interface { // Start services at the endpoint - Start(endpoint string, cds osi.ProvisionerServer) + Start(endpoint string, cds osi.ProvisionerServer, ids osi.IdentityServer) // Waits for the service to stop Wait() // Stops the service gracefully @@ -76,11 +76,11 @@ func ParseEndpoint(ep string) (string, string, error) { return "", "", fmt.Errorf("Invalid endpoint: %v", ep) } -func (s *nonBlockingGRPCServer) Start(endpoint string, cds osi.ProvisionerServer) { +func (s *nonBlockingGRPCServer) Start(endpoint string, cds osi.ProvisionerServer, ids osi.IdentityServer) { s.wg.Add(1) - go s.serve(endpoint, cds) + go s.serve(endpoint, cds, ids) return } @@ -97,7 +97,7 @@ func (s *nonBlockingGRPCServer) ForceStop() { s.server.Stop() } -func (s *nonBlockingGRPCServer) serve(endpoint string, driver osi.ProvisionerServer) { +func (s *nonBlockingGRPCServer) serve(endpoint string, driver osi.ProvisionerServer, identity osi.IdentityServer) { proto, addr, err := ParseEndpoint(endpoint) if err != nil { @@ -128,6 +128,9 @@ func (s *nonBlockingGRPCServer) serve(endpoint string, driver osi.ProvisionerSer if driver != nil { osi.RegisterProvisionerServer(server, driver) } + if identity != nil { + osi.RegisterIdentityServer(server, identity) + } klog.Infof("Listening for connections on address: %#v", listener.Addr()) From 35e78442c9a57ef0c083fc3e5177d920a8ffbdcc Mon Sep 17 00:00:00 2001 From: wlan0 Date: Fri, 19 Mar 2021 17:41:54 -0700 Subject: [PATCH 169/299] add minio.yaml --- .../minio.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/minio.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/minio.yaml b/container-object-storage-interface-provisioner-sidecar/minio.yaml new file mode 100644 index 00000000..cc359dd6 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/minio.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: Service +metadata: + name: minio +spec: + type: ClusterIP + ports: + - port: 9000 + targetPort: 9000 + protocol: TCP + selector: + app: minio + +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: minio + labels: + app: minio +spec: + selector: + matchLabels: + app: minio + template: + metadata: + labels: + app: minio + spec: + containers: + - image: minio/minio:latest + name: image + args: + - server + - /data + env: + - name: MINIO_ACCESS_KEY + value: minio + - name: MINIO_SECRET_KEY + value: minio123 From 70d3923e9edebb91122c59cf6fcd3bd01a8b002f Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Tue, 23 Mar 2021 16:03:54 -0400 Subject: [PATCH 170/299] added image registry name and tag Signed-off-by: Tejas Parikh --- .../Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 9a6bd2ca..c26fe7e1 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -22,8 +22,11 @@ release-tools/build.make: $(eval TMP := $(shell mktemp -d)) $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) - $(shell rm -rf ${TMP}) + $(shell rm -rf ${TMP}) ln -s release-tools/travis.yml travis.yml include release-tools/build.make + +REGISTRY_NAME=quay.io/containerobjectstorage +IMAGE_TAGS=canary From 8db5fc3cc8be03b7dbe25ee79538437350279c6a Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Wed, 24 Mar 2021 15:06:02 -0400 Subject: [PATCH 171/299] added cloudbuiild.yaml --- container-object-storage-interface-controller/Makefile | 5 ++++- .../cloudbuild.yaml | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 container-object-storage-interface-controller/cloudbuild.yaml diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 6c19baab..5a49dfd1 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -20,9 +20,12 @@ release-tools/build.make: $(eval TMP := $(shell mktemp -d)) $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) - $(shell rm -rf ${TMP}) + $(shell rm -rf ${TMP}) ln -s release-tools/travis.yml travis.yml CMDS=controller-manager include release-tools/build.make + +IMAGE_NAME=quay.io/containerobjectstorage/objectstorage-controller +IMAGE_TAGS=canary diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml new file mode 100644 index 00000000..87af11a6 --- /dev/null +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -0,0 +1,9 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +timeout: 3000s +options: + substitution_option: ALLOW_LOOSE +steps: +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" + entrypoint: make + args: + - build From c79af18ecc13fd10badb81a4ee0b8dce91e21737 Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Wed, 24 Mar 2021 15:14:18 -0400 Subject: [PATCH 172/299] added cloudbuiild.yaml --- .../cloudbuild.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml new file mode 100644 index 00000000..87af11a6 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -0,0 +1,9 @@ +# See https://cloud.google.com/cloud-build/docs/build-config +timeout: 3000s +options: + substitution_option: ALLOW_LOOSE +steps: +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" + entrypoint: make + args: + - build From 7d7b8cc72c0c776412368c4330e8979ea0c4c46d Mon Sep 17 00:00:00 2001 From: wlan0 Date: Mon, 5 Apr 2021 15:08:03 -0700 Subject: [PATCH 173/299] Major refactor and bugfixes - Requires changes to API from this PR github.com/kubernetes-sigs/container-object-storage-interface-api/pull/35 - Requires changes to API from this PR github.com/kubernetes-sigs/container-object-storage-interface-spec/pull/25 --- .../objectstorage-sidecar => }/Dockerfile | 2 +- .../Dockerfile.sample-driver | 6 - .../Makefile | 2 +- .../cmd/minio-cosi-driver/cmd.go | 73 ++ .../cmd/minio-cosi-driver/main.go | 44 ++ .../app/objectstorage-sidecar.go | 109 --- .../cmd/objectstorage-sidecar/cmd.go | 101 +++ .../cmd/objectstorage-sidecar/main.go | 52 +- .../cmd/sample-driver/Dockerfile | 6 - .../cmd/sample-driver/driver-server.go | 136 ---- .../cmd/sample-driver/identity-server.go | 53 -- .../cmd/sample-driver/sample-driver.go | 127 --- .../go.mod | 27 +- .../go.sum | 438 +---------- .../hack/add-license-header.sh | 22 + .../pkg/bucket/bucket_controller.go | 200 +++++ .../pkg/bucket/bucket_controller_test.go | 187 +++++ .../bucketaccess/bucketaccess_controller.go | 254 ++++++ .../bucketaccess_controller_test.go | 235 ++++++ .../controller/bucket/bucket_controller.go | 208 ----- .../bucket/bucket_controller_test.go | 534 ------------- .../bucketaccess/bucket_access_controller.go | 270 ------- .../bucket_access_controller_test.go | 740 ------------------ .../pkg/grpcclient/client.go | 139 ---- .../pkg/grpcserver/server.go | 139 ---- .../pkg/provisioner/client.go | 70 ++ .../pkg/provisioner/interceptors.go | 46 ++ .../pkg/provisioner/provisioner.go | 111 +++ .../pkg/provisioner/server.go | 67 ++ .../pkg/sampledriver/driver.go | 22 + .../pkg/sampledriver/identity.go | 42 + .../pkg/sampledriver/provisioner.go | 49 ++ .../resources/deployment.yaml | 16 +- .../resources/secret.yaml | 4 +- 34 files changed, 1629 insertions(+), 2902 deletions(-) rename container-object-storage-interface-provisioner-sidecar/{cmd/objectstorage-sidecar => }/Dockerfile (79%) delete mode 100644 container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go create mode 100755 container-object-storage-interface-provisioner-sidecar/hack/add-license-header.sh create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/provisioner/interceptors.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile similarity index 79% rename from container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/Dockerfile rename to container-object-storage-interface-provisioner-sidecar/Dockerfile index 78f5ebc0..0a44b734 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/Dockerfile +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -1,5 +1,5 @@ FROM gcr.io/distroless/static:latest -LABEL maintainers="Kubernetes Authors" +LABEL maintainers="Kubernetes COSI Authors" LABEL description="Object Storage Sidecar" COPY ./bin/objectstorage-sidecar objectstorage-sidecar diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver b/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver deleted file mode 100644 index 0a8ee41e..00000000 --- a/container-object-storage-interface-provisioner-sidecar/Dockerfile.sample-driver +++ /dev/null @@ -1,6 +0,0 @@ -FROM gcr.io/distroless/static:latest -LABEL maintainers="Kubernetes Authors" -LABEL description="Object Storage Sidecar Sample Driver" - -COPY ./bin/sample-driver /sample-driver -ENTRYPOINT ["/sample-driver"] diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index c26fe7e1..d98e7a81 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -CMDS=objectstorage-sidecar sample-driver +CMDS=objectstorage-sidecar minio-cosi-driver all: reltools build .PHONY: reltools diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go new file mode 100644 index 00000000..69d243e9 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go @@ -0,0 +1,73 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "flag" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/provisioner" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver" + + "k8s.io/klog/v2" +) + +const provisionerName = "minio.objectstorage.k8s.io" + +var ( + driverAddress = "unix:///var/lib/cosi/cosi.sock" +) + +var cmd = &cobra.Command{ + Use: "minio-cosi-driver", + Short: "K8s COSI driver for MinIO object storage", + SilenceErrors: true, + SilenceUsage: true, + RunE: func(cmd *cobra.Command, args []string) error { + return run(cmd.Context(), args) + }, + DisableFlagsInUseLine: true, +} + +func init() { + viper.AutomaticEnv() + + flag.Set("alsologtostderr", "true") + kflags := flag.NewFlagSet("klog", flag.ExitOnError) + klog.InitFlags(kflags) + + persistentFlags := cmd.PersistentFlags() + persistentFlags.AddGoFlagSet(kflags) + + stringFlag := persistentFlags.StringVarP + stringFlag(&driverAddress, + "driver-addr", + "d", + driverAddress, + "path to unix domain socket where driver should listen") + + viper.BindPFlags(cmd.PersistentFlags()) +} + +func run(ctx context.Context, args []string) error { + identityServer, bucketProvisioner := sampledriver.NewDriver(provisionerName) + server, err := provisioner.NewDefaultCOSIProvisionerServer(driverAddress, identityServer, bucketProvisioner) + if err != nil { + return err + } + return server.Run(ctx) +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go new file mode 100644 index 00000000..abce3c7e --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go @@ -0,0 +1,44 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "os" + "os/signal" + "syscall" + "time" + + "k8s.io/klog/v2" +) + +func main() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + + go func() { + sig := <-sigs + klog.InfoS("Signal received", "type", sig) + cancel() + <-time.After(30 * time.Second) + os.Exit(1) + }() + + if err := cmd.ExecuteContext(ctx); err != nil { + klog.ErrorS(err, "Exiting on error") + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go deleted file mode 100644 index cc5aac95..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app/objectstorage-sidecar.go +++ /dev/null @@ -1,109 +0,0 @@ -package app - -import ( - "context" - "os" - "time" - - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient" - - osspec "sigs.k8s.io/container-object-storage-interface-spec" - - "github.com/spf13/cobra" - - "google.golang.org/grpc" - - "k8s.io/klog/v2" -) - -const ( - // Interval of logging connection errors - connectionLoggingInterval = 10 * time.Second - defaultDriverAddress = "tcp://0.0.0.0:9000" -) - -// SidecarOptions defines the options for running the sidecar -type SidecarOptions struct { - driverAddress string -} - -// NewSidecarOptions returns an initialized SidecarOptions instance -func NewSidecarOptions() *SidecarOptions { - return &SidecarOptions{driverAddress: defaultDriverAddress} -} - -// Run starts the sidecar with the configured options -func (so *SidecarOptions) Run() { - klog.Infof("attempting to open a gRPC connection with: %q", so.driverAddress) - grpcClient, err := grpcclient.NewGRPCClient(so.driverAddress, []grpc.DialOption{}, nil) - if err != nil { - klog.Errorf("error creating GRPC Client: %v", err) - os.Exit(1) - } - - grpcConn, err := grpcClient.ConnectWithLogging(connectionLoggingInterval) - if err != nil { - klog.Errorf("error connecting to COSI driver: %v", err) - os.Exit(1) - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - klog.Infof("creating provisioner client") - provisionerClient := osspec.NewProvisionerClient(grpcConn) - identityClient := osspec.NewIdentityClient(grpcConn) - - klog.Infof("discovering driver name") - req := osspec.ProvisionerGetInfoRequest{} - rsp, err := identityClient.ProvisionerGetInfo(ctx, &req) - if err != nil { - klog.Errorf("error calling ProvisionerGetInfo: %v", err) - os.Exit(1) - } - - // TODO: go routine with health check to vendor driver - - provisionerName := rsp.Name - // TODO: Register provisioner using internal type - klog.Info("This sidecar is working with the driver identified as: ", provisionerName) - - so.startControllers(ctx, provisionerName, provisionerClient) - <-ctx.Done() -} - -func (so *SidecarOptions) startControllers(ctx context.Context, name string, client osspec.ProvisionerClient) { - bucketController, err := bucket.NewBucketController(name, client) - if err != nil { - klog.Fatalf("Error creating bucket controller: %v", err) - } - - bucketAccessController, err := bucketaccess.NewBucketAccessController(name, client) - if err != nil { - klog.Fatalf("Error creating bucket access controller: %v", err) - } - - go bucketController.Run(ctx) - go bucketAccessController.Run(ctx) -} - -// NewControllerManagerCommand creates a *cobra.Command object with default parameters -func NewControllerManagerCommand() *cobra.Command { - opts := NewSidecarOptions() - - cmd := &cobra.Command{ - Use: "objectstorage-sidecar", - DisableFlagsInUseLine: true, - Short: "", - Long: ``, - Run: func(cmd *cobra.Command, args []string) { - opts.Run() - }, - } - - cmd.Flags().StringVarP(&opts.driverAddress, "connect-address", "c", opts.driverAddress, "The address that the sidecar should connect to") - - return cmd -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go new file mode 100644 index 00000000..75559477 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go @@ -0,0 +1,101 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "flag" + + "sigs.k8s.io/container-object-storage-interface-api/controller" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/bucket" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/provisioner" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + + "k8s.io/klog/v2" +) + +const DefaultProvisionerName = "provisioner.objectstorage.k8s.io" + +var ( + driverAddress = "unix:///var/lib/cosi/cosi.sock" + provisionerName = "" + kubeconfig = "" + debug = false +) + +var cmd = &cobra.Command{ + Use: "objectstorage-sidecar", + Short: "provisioner that interacts with cosi drivers to manage buckets and bucketAccesses", + SilenceErrors: true, + SilenceUsage: true, + RunE: func(cmd *cobra.Command, args []string) error { + return run(cmd.Context(), args) + }, + DisableFlagsInUseLine: true, +} + +func init() { + viper.AutomaticEnv() + + flag.Set("alsologtostderr", "true") + kflags := flag.NewFlagSet("klog", flag.ExitOnError) + klog.InitFlags(kflags) + + persistentFlags := cmd.PersistentFlags() + persistentFlags.AddGoFlagSet(kflags) + + stringFlag := persistentFlags.StringVarP + boolFlag := persistentFlags.BoolVarP + + stringFlag(&kubeconfig, "kubeconfig", "", kubeconfig, "path to kubeconfig file") + stringFlag(&driverAddress, "driver-addr", "d", driverAddress, "path to unix domain socket where driver is listening") + stringFlag(&provisionerName, "provisioner", "p", DefaultProvisionerName, "The name of the provisioner") + + boolFlag(&debug, "debug", "g", debug, "Logs all grpc requests and responses") + + viper.BindPFlags(cmd.PersistentFlags()) +} + +func run(ctx context.Context, args []string) error { + if provisionerName == "" { + provisionerName = DefaultProvisionerName + } + + ctrl, err := controller.NewDefaultObjectStorageController("cosi", provisionerName, 40) + if err != nil { + return err + } + + klog.V(3).InfoS("Attempting connection to driver", "address", driverAddress) + cosiClient, err := provisioner.NewDefaultCOSIProvisionerClient(ctx, driverAddress, debug) + if err != nil { + return err + } + klog.V(3).InfoS("Successfully connected to driver") + + ctrl.AddBucketListener(bucket.NewBucketListener(provisionerName, cosiClient)) + + bal, err := bucketaccess.NewBucketAccessListener(provisionerName, cosiClient) + if err != nil { + return err + } + ctrl.AddBucketAccessListener(bal) + + return ctrl.Run(ctx) +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go index a2317e33..643eb0ac 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/main.go @@ -1,30 +1,46 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package main import ( + "context" "os" + "os/signal" + "syscall" + "time" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/app" + "k8s.io/klog/v2" ) func main() { - command := app.NewControllerManagerCommand() - if err := command.Execute(); err != nil { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + + go func() { + sig := <-sigs + klog.InfoS("Signal received", "type", sig) + cancel() + <-time.After(30 * time.Second) os.Exit(1) + }() + + if err := cmd.ExecuteContext(ctx); err != nil { + klog.ErrorS(err, "Exiting on error") } } diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile deleted file mode 100644 index 1d8c977b..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM gcr.io/distroless/static:latest -LABEL maintainers="Kubernetes Authors" -LABEL description="Object Storage Sample Driver" - -COPY ./bin/sample-driver sample-driver -ENTRYPOINT ["/sample-driver"] diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go deleted file mode 100644 index 00d2cdf8..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/driver-server.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "fmt" - - "github.com/minio/minio-go" - "github.com/minio/minio/pkg/auth" - "github.com/minio/minio/pkg/bucket/policy" - "github.com/minio/minio/pkg/bucket/policy/condition" - iampolicy "github.com/minio/minio/pkg/iam/policy" - "github.com/minio/minio/pkg/madmin" - - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "k8s.io/klog/v2" - - cosi "sigs.k8s.io/container-object-storage-interface-spec" -) - -type DriverServer struct { - S3Client *minio.Client - S3AdminClient *madmin.AdminClient -} - -func (ds DriverServer) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { - klog.Infof("Using minio to create Backend Bucket") - - s3 := req.Protocol.GetS3() - if s3 == nil { - return nil, status.Error(codes.Unavailable, "Driver is missing protocol") - } - - err := ds.S3Client.MakeBucket(s3.BucketName, "") - if err != nil { - // Check to see if the bucket already exists - exists, errBucketExists := ds.S3Client.BucketExists(s3.BucketName) - if errBucketExists == nil && exists { - klog.Info("Backend Bucket already exists", s3.BucketName) - return &cosi.ProvisionerCreateBucketResponse{}, nil - } else { - klog.Error(err) - return &cosi.ProvisionerCreateBucketResponse{}, err - } - } - klog.Info("Successfully created Backend Bucket", s3.BucketName) - - return &cosi.ProvisionerCreateBucketResponse{}, nil -} - -func (ds *DriverServer) ProvisionerDeleteBucket(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { - s3 := req.Protocol.GetS3() - if s3 == nil { - return nil, status.Error(codes.Unavailable, "Driver is missing protocol") - } - - if err := ds.S3Client.RemoveBucket(s3.BucketName); err != nil { - klog.Info("failed to delete bucket", s3.BucketName) - return nil, err - } - - return &cosi.ProvisionerDeleteBucketResponse{}, nil -} - -func (ds *DriverServer) ProvisionerGrantBucketAccess(ctx context.Context, req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { - creds, err := auth.GetNewCredentials() - if err != nil { - klog.Error("failed to generate new credentails") - return nil, err - } - - s3 := req.Protocol.GetS3() - if s3 == nil { - return nil, status.Error(codes.Unavailable, "Driver is missing protocol") - } - - if err := ds.S3AdminClient.AddUser(context.Background(), creds.AccessKey, creds.SecretKey); err != nil { - klog.Error("failed to create user", err) - return nil, err - } - - // Create policy - p := iampolicy.Policy{ - Version: iampolicy.DefaultVersion, - Statements: []iampolicy.Statement{ - iampolicy.NewStatement( - policy.Allow, - iampolicy.NewActionSet("s3:*"), - iampolicy.NewResourceSet(iampolicy.NewResource(s3.BucketName+"/*", "")), - condition.NewFunctions(), - )}, - } - - if err := ds.S3AdminClient.AddCannedPolicy(context.Background(), "s3:*", &p); err != nil { - klog.Error("failed to add canned policy", err) - return nil, err - } - - if err := ds.S3AdminClient.SetPolicy(context.Background(), "s3:*", creds.AccessKey, false); err != nil { - klog.Error("failed to set policy", err) - return nil, err - } - - return &cosi.ProvisionerGrantBucketAccessResponse{ - Principal: req.Principal, - CredentialsFileContents: fmt.Sprintf("[default]\naws_access_key %s\naws_secret_key %s", creds.AccessKey, creds.SecretKey), - CredentialsFilePath: ".aws/credentials", - }, nil -} - -func (ds *DriverServer) ProvisionerRevokeBucketAccess(ctx context.Context, req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { - - // revokes user access to bucket - if err := ds.S3AdminClient.RemoveUser(ctx, req.GetPrincipal()); err != nil { - klog.Error("falied to Revoke Bucket Access") - return nil, err - } - return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go deleted file mode 100644 index 6438221c..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/identity-server.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "fmt" - - "github.com/minio/minio-go" - "github.com/minio/minio/pkg/madmin" - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - cosi "sigs.k8s.io/container-object-storage-interface-spec" -) - -var ( - PROVISIONER_NAME = "sample-provisioner.objectstorage.k8s.io" - VERSION = "dev" -) - -type IdentityServer struct { - Name, Version string - S3Client *minio.Client - S3AdminClient *madmin.AdminClient -} - -func (id *IdentityServer) ProvisionerGetInfo(context.Context, *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { - if id.Name == "" { - return nil, status.Error(codes.Unavailable, "Driver name not configured") - } - - if id.Version == "" { - return nil, status.Error(codes.Unavailable, "Driver is missing version") - } - rsp := &cosi.ProvisionerGetInfoResponse{} - rsp.Name = fmt.Sprintf("%s-%s", id.Name, id.Version) - return rsp, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go deleted file mode 100644 index af1c2b10..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/sample-driver/sample-driver.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "context" - "flag" - "fmt" - "os" - "os/signal" - "strings" - "syscall" - - "github.com/minio/minio-go" - "github.com/minio/minio/pkg/madmin" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "k8s.io/klog/v2" - - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver" -) - -var ( - cosiAddress = "tcp://0.0.0.0:9000" - s3Endpoint = "tcp://0.0.0.0:9000" - accessKey = "AKIAIOSFODNN7EXAMPLE" - secretKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" - ctx context.Context -) - -var cmd = &cobra.Command{ - Use: os.Args[0], - Short: "sample provisoner for provisioning bucket instance to the backend bucket", - SilenceErrors: true, - SilenceUsage: true, - RunE: func(c *cobra.Command, args []string) error { - return run(args, cosiAddress) - }, - DisableFlagsInUseLine: true, - Version: VERSION, -} - -func init() { - viper.AutomaticEnv() - - cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine) - flag.Set("logtostderr", "true") - - strFlag := func(c *cobra.Command, ptr *string, name string, short string, dfault string, desc string) { - c.PersistentFlags(). - StringVarP(ptr, name, short, dfault, desc) - } - strFlag(cmd, &cosiAddress, "listen-address", "", cosiAddress, "The address for the driver to listen on") - strFlag(cmd, &s3Endpoint, "s3-endpoint", "", "", "S3-endpont") - strFlag(cmd, &accessKey, "access-key", "", "", "S3-AccessKey") - strFlag(cmd, &secretKey, "secret-key", "", "", "S3-SecretKey") - hideFlag := func(name string) { - cmd.PersistentFlags().MarkHidden(name) - } - hideFlag("alsologtostderr") - hideFlag("log_backtrace_at") - hideFlag("log_dir") - hideFlag("logtostderr") - hideFlag("master") - hideFlag("stderrthreshold") - hideFlag("vmodule") - - // Substitute _ for - - replacer := strings.NewReplacer("-", "_") - viper.SetEnvKeyReplacer(replacer) - - // suppress the incorrect prefix in glog output - flag.CommandLine.Parse([]string{}) - viper.BindPFlags(cmd.PersistentFlags()) - - var cancel context.CancelFunc - - ctx, cancel = context.WithCancel(context.Background()) - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGSEGV) - - go func() { - s := <-sigs - cancel() - klog.Error(fmt.Sprintf("%s %s", s.String(), "Signal received. Exiting")) - }() - -} - -func main() { - if err := cmd.Execute(); err != nil { - klog.Fatal(err.Error()) - - } -} - -func run(args []string, endpoint string) error { - // Initialize minio client object. - minioClient, err := minio.New(s3Endpoint, accessKey, secretKey, false) - if err != nil { - klog.Fatalln(err) - } - minioAdminClient, err := madmin.New(s3Endpoint, accessKey, secretKey, false) - if err != nil { - klog.Fatalln(err) - } - cds := DriverServer{S3Client: minioClient, S3AdminClient: minioAdminClient} - ids := IdentityServer{Name: PROVISIONER_NAME, Version: VERSION} - s := grpcserver.NewNonBlockingGRPCServer() - s.Start(endpoint, &cds, &ids) - s.Wait() - return nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 39df6eb1..64d00fef 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -3,20 +3,27 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.15 require ( - github.com/go-ini/ini v1.62.0 // indirect - github.com/kubernetes-csi/csi-lib-utils v0.9.0 - github.com/minio/minio v0.0.0-20210112204746-e09196d62633 - github.com/minio/minio-go v6.0.14+incompatible + github.com/google/go-cmp v0.5.2 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/spf13/cobra v0.0.5 - github.com/spf13/viper v1.3.2 - golang.org/x/net v0.0.0-20201216054612-986b41b23924 - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 + github.com/smartystreets/assertions v1.1.1 // indirect + github.com/spf13/cobra v1.1.3 + github.com/spf13/viper v1.7.0 + github.com/stretchr/testify v1.6.1 // indirect + golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect + golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/grpc v1.35.0 + gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect + gopkg.in/ini.v1 v1.57.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c - sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 + sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 4bd17b23..e6dd379a 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -1,7 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -9,36 +8,27 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.10.0/go.mod h1:ep1edmW+kNQx4UfWM9heESNmQdijykocJ0YOxmMX8SE= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.9.1/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -46,63 +36,32 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/sarama v1.27.2/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/alecthomas/participle v0.2.1/go.mod h1:SW6HZGeZgSIpcUWX3fXpfZhuaWHnmoD5KCVaqSaNTkk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -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= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= -github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/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/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= -github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= -github.com/coredns/coredns v1.4.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -111,43 +70,30 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d h1:QK8IYltsNy+5QZcDFbVkyInrs98/wHy1tfUTGG91sps= -github.com/dswarbrick/smart v0.0.0-20190505152634-909a45200d6d/go.mod h1:apXo4PA/BgBPrt66j0N45O2stlBTRowdip2igwcUWVc= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.3.0/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -155,14 +101,6 @@ github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -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/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= 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= @@ -170,22 +108,15 @@ github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2H github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU= -github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -236,17 +167,11 @@ github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72P github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -257,7 +182,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -268,20 +192,15 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -307,46 +226,27 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -357,35 +257,20 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= -github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= -github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= 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= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -393,250 +278,125 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/klauspost/readahead v1.3.1/go.mod h1:AH9juHzNH7xqdqFHrMRSHeH2Ps+vFf+kblDqzPFiLJg= -github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo= 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/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 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI= -github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 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/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/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/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= -github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio v0.0.0-20210112204746-e09196d62633 h1:N90Nw/JSwaKOg4sHN6AhMkg6/91axNFOao4/K8JJ3K8= -github.com/minio/minio v0.0.0-20210112204746-e09196d62633/go.mod h1:mD4TRSEetR2LyRBs9oKqi5ynFQDyW49vPPLCdP///EY= -github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= -github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= -github.com/minio/minio-go/v7 v7.0.7-0.20210105224719-8dddba43079f h1:XMEV9mP1TMX/lPvhnEH5vAr4AKfF+A9vycTninVcgOA= -github.com/minio/minio-go/v7 v7.0.7-0.20210105224719-8dddba43079f/go.mod h1:pEZBUa+L2m9oECoIA6IcSK8bv/qggtQVLovjeKK5jYc= -github.com/minio/selfupdate v0.3.1/go.mod h1:b8ThJzzH7u2MkF6PcIra7KaXO9Khf6alWPvMSyTDCFM= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/simdjson-go v0.1.5/go.mod h1:oKURrZZEBtqObgJrSjN1Ln2n9MJj2icuBTkeJzZnvSI= -github.com/minio/sio v0.2.1/go.mod h1:8b0yPp2avGThviy/+OCJBI6OMpvxoUuiLvE6F1lebhw= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= 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/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104/go.mod h1:wqKykBG2QzQDJEzvRkcS8x6MiSJkF52hXZsXcjaB3ls= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/montanaflynn/stats v0.5.0 h1:2EkzeTSqBB4V4bJwWrt5gIIrZmpJBcoIRGS2kWLgzmk= -github.com/montanaflynn/stats v0.5.0/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats-server/v2 v2.1.9/go.mod h1:9qVyoewoYXzG1ME9ox0HwkkzyYvnlBDugfR4Gg/8uHU= -github.com/nats-io/nats-streaming-server v0.19.0/go.mod h1:oqrRqpMg84aiPDyroTornjVWNYJKh+6ozh2Mgt8dslE= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.10.0/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nats-io/stan.go v0.7.0/go.mod h1:Ci6mUIpGQTjl++MqK2XzkWI/0vF+Bl72uScx7ejSYmU= -github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4= -github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= 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= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 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/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/samuel/go-zookeeper v0.0.0-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/secure-io/sio-go v0.3.0 h1:QKGb6rGJeiExac9wSWxnWPYo8O8OFN7lxXQvHshX6vo= -github.com/secure-io/sio-go v0.3.0/go.mod h1:D3KmXgKETffyYxBdFRN+Hpd2WzhzqS0EQwT3XWsAcBU= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto= -github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= 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/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +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/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -644,66 +404,41 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -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/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.0.4/go.mod h1:bURseu1nuBkFpIES5cz6zBtjmYeOQmEESshn7VpF15Y= -github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20201125193152-8a03d2e9614b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= 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= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= -golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -711,26 +446,20 @@ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -747,8 +476,6 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -759,9 +486,7 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -772,21 +497,12 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/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-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/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-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -800,71 +516,46 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -875,7 +566,6 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -886,7 +576,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -894,38 +583,27 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -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= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -933,33 +611,24 @@ google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpC google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -974,73 +643,54 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -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.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= -gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= -gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -1052,7 +702,6 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= @@ -1061,12 +710,12 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c h1:GANfOgppBbhCKqGFDVnuluhJ5km8gqNDatXn5ULGUt8= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210308183412-eb167f7cca3c/go.mod h1:yMgeGQDROJIdY1jymECN2ptefmQ4+e3EQB/S8gyIE0o= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 h1:TIx7kV6/3ZSQ5BETBx1QG1Va28zv1LZAvqRjs28n8ss= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 h1:M2ZMhWdq9Az8TFj8G6ZffFUpR4XG7Qy8h8ZGsZhi9Xg= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7/go.mod h1:5n4lNKN4uOMW2NTqJ9r8qRAiqh5dZRZB7CNOkFihLfM= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 h1:U+M87V77xKotSub2dqNlmxHMbb30QeC7wwTWdPGAhSI= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= @@ -1076,4 +725,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK 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= diff --git a/container-object-storage-interface-provisioner-sidecar/hack/add-license-header.sh b/container-object-storage-interface-provisioner-sidecar/hack/add-license-header.sh new file mode 100755 index 00000000..73788039 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/hack/add-license-header.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +cat > /tmp/LICENSE_TEMPLATE << EOF +Copyright 2021 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +You may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +EOF + +# install addlicense +GO111MODULE=off go get github.com/google/addlicense + +# apply license to all go files +find . | grep .go$ | xargs addlicense -f /tmp/LICENSE_TEMPLATE diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go new file mode 100644 index 00000000..5c9e2fbd --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -0,0 +1,200 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bucket + +import ( + "context" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + kube "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" + bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// BucketListener manages Bucket objects +type BucketListener struct { + provisionerClient cosi.ProvisionerClient + provisionerName string + + kubeClient kube.Interface + bucketClient buckets.Interface + kubeVersion *utilversion.Version +} + +// NewBucketListener returns a resource handler for Bucket objects +func NewBucketListener(provisionerName string, client cosi.ProvisionerClient) *BucketListener { + bl := &BucketListener{ + provisionerName: provisionerName, + provisionerClient: client, + } + + return bl +} + +// Add attempts to create a bucket for a given bucket. This function must be idempotent +// Return values +// nil - Bucket successfully provisioned +// non-nil err - Internal error [requeue'd with exponential backoff] +func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) error { + bucket := inputBucket.DeepCopy() + + klog.V(3).InfoS("Add Bucket", + "name", bucket.Name, + "bucketclass", bucket.Spec.BucketClassName, + ) + + if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { + klog.V(5).InfoS("Skipping bucket for provisiner", + "bucket", bucket.Name, + "provisioner", bucket.Spec.Provisioner, + ) + return nil + } + + if bucket.Status.BucketAvailable { + klog.V(5).InfoS("BucketExists", + "bucket", bucket.Name, + "provisioner", bucket.Spec.Provisioner, + ) + return nil + } + + proto, err := bucket.Spec.Protocol.ConvertToExternal() + if err != nil { + klog.ErrorS(err, "Invalid protocol", + "bucket", bucket.Name) + + return errors.Wrap(err, "Failed to parse protocol for API") + } + + req := &cosi.ProvisionerCreateBucketRequest{ + Parameters: bucket.Spec.Parameters, + Protocol: proto, + Name: bucket.Name, + } + + rsp, err := b.provisionerClient.ProvisionerCreateBucket(ctx, req) + if err != nil { + if status.Code(err) != codes.AlreadyExists { + klog.ErrorS(err, "Failed to create bucket", + "bucket", bucket.Name) + return errors.Wrap(err, "Failed to create bucket") + } + } + + bucket.Spec.BucketID = rsp.BucketId + bucket.Status.Message = "Bucket Provisioned" + bucket.Status.BucketAvailable = true + + // if this step fails, then controller will retry with backoff + if _, err := b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucket", + "bucket", bucket.Name) + return errors.Wrap(err, "Failed to update bucket") + } + + return nil +} + +// Update attempts to reconcile changes to a given bucket. This function must be idempotent +// Return values +// nil - Bucket successfully reconciled +// non-nil err - Internal error [requeue'd with exponential backoff] +func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { + klog.V(3).InfoS("Update Bucket", + "name", old.Name) + + return nil +} + +// Delete attemps to delete a bucket. This function must be idempotent +// Return values +// nil - Bucket successfully deleted +// non-nil err - Internal error [requeue'd with exponential backoff] +func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error { + bucket := inputBucket.DeepCopy() + + klog.V(3).InfoS("Delete Bucket", + "name", bucket.Name, + "bucketclass", bucket.Spec.BucketClassName, + ) + + if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { + klog.V(5).InfoS("Skipping bucket for provisiner", + "bucket", bucket.Name, + "provisioner", bucket.Spec.Provisioner, + ) + return nil + } + + req := &cosi.ProvisionerDeleteBucketRequest{ + BucketId: bucket.Spec.BucketID, + } + + if _, err := b.provisionerClient.ProvisionerDeleteBucket(ctx, req); err != nil { + if status.Code(err) != codes.NotFound { + klog.ErrorS(err, "Failed to delete bucket", + "bucket", bucket.Name, + ) + return err + } + } + + bucket.Status.BucketAvailable = false + + // if this step fails, then controller will retry with backoff + if _, err := b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucket", + "bucket", bucket.Name) + return errors.Wrap(err, "Failed to update bucket") + } + + return nil +} + +func (b *BucketListener) Buckets() bucketapi.BucketInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().Buckets() + } + panic("uninitialized listener") +} + +// InitializeKubeClient initializes the kubernetes client +func (b *BucketListener) InitializeKubeClient(k kube.Interface) { + b.kubeClient = k + + serverVersion, err := k.Discovery().ServerVersion() + if err != nil { + klog.ErrorS(err, "Cannot determine server version") + } else { + b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + } +} + +// InitializeBucketClient initializes the object storage bucket client +func (b *BucketListener) InitializeBucketClient(bc buckets.Interface) { + b.bucketClient = bc +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go new file mode 100644 index 00000000..5fbff0cf --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -0,0 +1,187 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bucket + +import ( + "context" + "reflect" + "testing" + + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/version" + fakediscovery "k8s.io/client-go/discovery/fake" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" + + "google.golang.org/grpc" +) + +func TestInitializeKubeClient(t *testing.T) { + client := fakekubeclientset.NewSimpleClientset() + fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) + if !ok { + t.Fatalf("Couldn't convert Discovery() to *FakeDiscovery") + } + + fakeVersion := &version.Info{ + GitVersion: "v1.0.0", + } + fakeDiscovery.FakedServerVersion = fakeVersion + + bl := BucketListener{} + bl.InitializeKubeClient(client) + + if bl.kubeClient == nil { + t.Errorf("KubeClient was nil") + } + + expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) + if !reflect.DeepEqual(expected, bl.kubeVersion) { + t.Errorf("Expected %+v, but got %+v", expected, bl.kubeVersion) + } +} + +func TestInitializeBucketClient(t *testing.T) { + client := fakebucketclientset.NewSimpleClientset() + + bl := BucketListener{} + bl.InitializeBucketClient(client) + + if bl.bucketClient == nil { + t.Errorf("BucketClient was nil") + } +} + +func TestAddWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerCreateBucket = func(ctx context.Context, + in *cosi.ProvisionerCreateBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerCreateBucketResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bl := BucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bl.Add(ctx, &b) + if err != nil { + t.Errorf("Error returned: %+v", err) + } +} + +func TestDeleteWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerDeleteBucket = func(ctx context.Context, + in *cosi.ProvisionerDeleteBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bl := BucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + } + + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: "provisioner2", + }, + } + ctx := context.TODO() + err := bl.Delete(ctx, &b) + if err != nil { + t.Errorf("error returned: %+v", err) + } +} + +func TestBucketDeletion(t *testing.T) { + provisioner := "provisioner1" + bucketId := "bucket1" + mpc := struct{ fakespec.FakeProvisionerClient }{} + + testCases := []struct { + name string + setFields func(*v1alpha1.Bucket) + deleteFunc func(ctx context.Context, + in *cosi.ProvisionerDeleteBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) + }{ + { + name: "BucketDeletion", + setFields: func(b *v1alpha1.Bucket) { + b.Spec.BucketID = bucketId + }, + deleteFunc: func(ctx context.Context, + req *cosi.ProvisionerDeleteBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { + inBucketId := req.BucketId + if inBucketId != bucketId { + t.Errorf("expected %s, got %s", bucketId, inBucketId) + } + return &cosi.ProvisionerDeleteBucketResponse{}, nil + }, + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + }, + Status: v1alpha1.BucketStatus{ + BucketAvailable: true, + }, + } + + ctx := context.TODO() + client := fakebucketclientset.NewSimpleClientset(&b) + mpc.FakeProvisionerDeleteBucket = tc.deleteFunc + bl := BucketListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketClient: client, + } + + tc.setFields(&b) + t.Logf(tc.name) + err := bl.Delete(ctx, &b) + if err != nil { + t.Errorf("Error running TestBucketDeletion: %v", err) + } + + updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) + if updatedB.Status.BucketAvailable != false { + t.Errorf("Expected %t, got %t", false, b.Status.BucketAvailable) + } + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go new file mode 100644 index 00000000..0d392de5 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -0,0 +1,254 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bucketaccess + +import ( + "context" + "os" + "strings" + + corev1 "k8s.io/api/core/v1" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + kube "k8s.io/client-go/kubernetes" + kubecorev1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/klog/v2" + + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" + bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const ( + CredentialsFilePath = "CredentialsFilePath" + CredentialsFileContents = "CredentialsFileContents" +) + +// BucketAccessListener manages Bucket objects +type BucketAccessListener struct { + provisionerClient cosi.ProvisionerClient + provisionerName string + + kubeClient kube.Interface + bucketClient buckets.Interface + kubeVersion *utilversion.Version + + namespace string +} + +// NewBucketAccessListener returns a resource handler for BucketAccess objects +func NewBucketAccessListener(provisionerName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { + ns := os.Getenv("POD_NAMESPACE") + if ns == "" { + return nil, errors.New("POD_NAMESPACE env var cannot be empty") + } + + return &BucketAccessListener{ + provisionerName: provisionerName, + provisionerClient: client, + namespace: ns, + }, nil +} + +// Add attempts to provision credentials to access a given bucket. This function must be idempotent +// Return values +// nil - BucketAccess successfully granted +// non-nil err - Internal error [requeue'd with exponential backoff] +func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { + bucketAccess := inputBucketAccess.DeepCopy() + + bucketName := bucketAccess.Spec.BucketName + klog.V(3).InfoS("Add BucketAccess", + "name", bucketAccess.Name, + "bucket", bucketName, + ) + + if bucketAccess.Spec.MintedSecretName != "" { + klog.V(5).InfoS("AccessAlreadyGranted", + "bucketAccess", bucketAccess.Name, + "bucket", bucketName, + ) + return nil + } + + bucket, err := bal.Buckets().Get(ctx, bucketName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Failed to fetch bucket", "bucket", bucketName) + return errors.Wrap(err, "Failed to fetch bucket") + } + + if !strings.EqualFold(bucket.Spec.Provisioner, bal.provisionerName) { + klog.V(5).InfoS("Skipping bucketaccess for provisiner", + "bucketAccess", bucketAccess.Name, + "provisioner", bucket.Spec.Provisioner, + ) + return nil + } + + if bucketAccess.Status.AccessGranted { + klog.V(5).InfoS("AccessAlreadyGranted", + "bucketaccess", bucketAccess.Name, + "bucket", bucket.Name, + ) + return nil + } + + if bucket.Spec.BucketID == "" { + err := errors.New("BucketID cannot be empty") + klog.ErrorS(err, + "Invalid arguments", + "bucket", bucket.Name, + "bucketAccess", bucketAccess.Name, + ) + return errors.Wrap(err, "Invalid arguments") + } + + req := &cosi.ProvisionerGrantBucketAccessRequest{ + BucketId: bucket.Spec.BucketID, + AccountName: bucketAccess.Name, + AccessPolicy: bucketAccess.Spec.PolicyActionsConfigMapData, + } + + // This needs to be idempotent + rsp, err := bal.provisionerClient.ProvisionerGrantBucketAccess(ctx, req) + if err != nil { + if status.Code(err) != codes.AlreadyExists { + klog.ErrorS(err, + "Failed to grant access", + "bucketAccess", bucketAccess.Name, + "bucket", bucket.Name, + ) + return errors.Wrap(err, "failed to grant access") + } + + } + ns := bal.namespace + mintedSecretName := "ba-" + string(bucketAccess.UID) + if _, err := bal.Secrets(ns).Get(ctx, mintedSecretName, metav1.GetOptions{}); err != nil { + if !kubeerrors.IsNotFound(err) { + klog.ErrorS(err, + "Failed to create secrets", + "bucketAccess", bucketAccess.Name, + "bucket", bucket.Name) + return errors.Wrap(err, "failed to fetch secrets") + } + + // if secret doesn't exist, create it + credentialsFileContents := rsp.CredentialsFileContents + credentialsFilePath := rsp.CredentialsFilePath + + if _, err := bal.Secrets(ns).Create(ctx, &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: mintedSecretName, + Namespace: ns, + }, + StringData: map[string]string{ + CredentialsFilePath: credentialsFilePath, + CredentialsFileContents: credentialsFileContents, + }, + Type: corev1.SecretTypeOpaque, + }, metav1.CreateOptions{}); err != nil { + if !kubeerrors.IsAlreadyExists(err) { + klog.ErrorS(err, + "Failed to create minted secret", + "bucketAccess", bucketAccess.Name, + "bucket", bucket.Name) + return errors.Wrap(err, "Failed to create minted secret") + } + } + } + + bucketAccess.Spec.AccountID = rsp.AccountId + bucketAccess.Status.AccessGranted = true + bucketAccess.Spec.MintedSecretName = mintedSecretName + + // if this step fails, then controller will retry with backoff + if _, err := bal.BucketAccesses().Update(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update BucketAccess", + "bucketAccess", bucketAccess.Name, + "bucket", bucket.Name) + return errors.Wrap(err, "Failed to update BucketAccess") + } + + return nil +} + +// Update attempts to reconcile changes to a given bucketAccess. This function must be idempotent +// Return values +// nil - BucketAccess successfully reconciled +// non-nil err - Internal error [requeue'd with exponential backoff] +func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { + klog.V(3).InfoS("Update BucketAccess", + "name", old.Name) + + return nil +} + +// Delete attemps to delete a bucketAccess. This function must be idempotent +// Return values +// nil - BucketAccess successfully deleted +// non-nil err - Internal error [requeue'd with exponential backoff] +func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { + klog.V(3).InfoS("Delete BucketAccess", + "name", bucketAccess.Name, + "bucket", bucketAccess.Spec.BucketName, + ) + return nil +} + +func (b *BucketAccessListener) Secrets(ns string) kubecorev1.SecretInterface { + if b.kubeClient != nil { + return b.kubeClient.CoreV1().Secrets(ns) + } + panic("uninitialized listener") +} + +func (b *BucketAccessListener) BucketAccesses() bucketapi.BucketAccessInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketAccesses() + } + panic("uninitialized listener") +} + +func (b *BucketAccessListener) Buckets() bucketapi.BucketInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().Buckets() + } + panic("uninitialized listener") +} + +// InitializeKubeClient initializes the kubernetes client +func (b *BucketAccessListener) InitializeKubeClient(k kube.Interface) { + b.kubeClient = k + + serverVersion, err := k.Discovery().ServerVersion() + if err != nil { + klog.ErrorS(err, "Cannot determine server version") + } else { + b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + } +} + +// InitializeBucketClient initializes the object storage bucket client +func (b *BucketAccessListener) InitializeBucketClient(bc buckets.Interface) { + b.bucketClient = bc +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go new file mode 100644 index 00000000..e1571c91 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -0,0 +1,235 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bucketaccess + +import ( + "context" + "reflect" + "strings" + "testing" + + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/version" + fakediscovery "k8s.io/client-go/discovery/fake" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" + + "google.golang.org/grpc" +) + +func TestInitializeKubeClient(t *testing.T) { + client := fakekubeclientset.NewSimpleClientset() + fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) + if !ok { + t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") + } + + fakeVersion := &version.Info{ + GitVersion: "v1.0.0", + } + fakeDiscovery.FakedServerVersion = fakeVersion + + bal := BucketAccessListener{} + bal.InitializeKubeClient(client) + + if bal.kubeClient == nil { + t.Errorf("KubeClient was nil") + } + + expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) + if !reflect.DeepEqual(expected, bal.kubeVersion) { + t.Errorf("Expected %+v, but got %+v", expected, bal.kubeVersion) + } +} + +func TestInitializeBucketClient(t *testing.T) { + client := fakebucketclientset.NewSimpleClientset() + + bal := BucketAccessListener{} + bal.InitializeBucketClient(client) + + if bal.bucketClient == nil { + t.Errorf("BucketClient not initialized, expected not nil") + } +} + +func TestAddWrongProvisioner(t *testing.T) { + provisioner := "provisioner1" + bucketName := "bucket1" + bucketId := "bucketId1" + accountId := "accountId1" + bucketAccessRequestName := "bar1" + policy := "policy1" + + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeProvisionerGrantBucketAccess = func(ctx context.Context, + in *cosi.ProvisionerGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + t.Errorf("grpc client called") + return &cosi.ProvisionerGrantBucketAccessResponse{ + AccountId: accountId, + }, nil + } + + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketName, + }, + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner + "-invalid", + Protocol: v1alpha1.Protocol{}, + BucketID: bucketId, + }, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + BucketName: bucketName, + BucketAccessRequest: &corev1.ObjectReference{ + Name: bucketAccessRequestName, + }, + PolicyActionsConfigMapData: policy, + }, + } + client := fakebucketclientset.NewSimpleClientset(&ba, &b) + kubeClient := fakekubeclientset.NewSimpleClientset() + bal := BucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketClient: client, + kubeClient: kubeClient, + } + + ctx := context.TODO() + err := bal.Add(ctx, &ba) + if err != nil { + t.Errorf("Error returned: %+v", err) + } +} + +func TestAddBucketAccess(t *testing.T) { + provisioner := "provisioner" + bucketName := "bucket1" + bucketId := "bucketId1" + bucketAccessRequestName := "bar1" + + policy := "policy1" + accountId := "account1" + credsContents := "credsContents" + credsFile := "credsFile" + ns := "testns" + mpc := struct{ fakespec.FakeProvisionerClient }{} + + testCases := []struct { + name string + setFields func(ba *v1alpha1.BucketAccess) + grantFunc func(ctx context.Context, + in *cosi.ProvisionerGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) + }{ + { + name: "TestAddBucketAccess", + setFields: func(ba *v1alpha1.BucketAccess) { + + }, + grantFunc: func(ctx context.Context, + req *cosi.ProvisionerGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + + return &cosi.ProvisionerGrantBucketAccessResponse{ + AccountId: accountId, + CredentialsFileContents: credsContents, + CredentialsFilePath: credsFile, + }, nil + }, + }, + } + + for _, tc := range testCases { + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketName, + }, + Spec: v1alpha1.BucketSpec{ + Provisioner: provisioner, + Protocol: v1alpha1.Protocol{}, + BucketID: bucketId, + }, + } + + ba := v1alpha1.BucketAccess{ + Spec: v1alpha1.BucketAccessSpec{ + BucketName: bucketName, + BucketAccessRequest: &corev1.ObjectReference{ + Name: bucketAccessRequestName, + }, + PolicyActionsConfigMapData: policy, + }, + } + + ctx := context.TODO() + tc.setFields(&ba) + + client := fakebucketclientset.NewSimpleClientset(&ba, &b) + kubeClient := fakekubeclientset.NewSimpleClientset() + mpc.FakeProvisionerGrantBucketAccess = tc.grantFunc + + bal := BucketAccessListener{ + provisionerName: provisioner, + provisionerClient: &mpc, + bucketClient: client, + kubeClient: kubeClient, + namespace: ns, + } + + t.Logf(tc.name) + err := bal.Add(ctx, &ba) + if err != nil { + t.Errorf("Add returned: %+v", err) + } + + updatedBA, _ := bal.BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) + if updatedBA.Status.AccessGranted != true { + t.Errorf("Expected %t, got %t", true, ba.Status.AccessGranted) + } + if !strings.EqualFold(updatedBA.Spec.AccountID, accountId) { + t.Errorf("Expected %s, got %s", accountId, updatedBA.Spec.AccountID) + } + + secretName := "ba-" + string(ba.UID) + secret, err := bal.Secrets(ns).Get(ctx, secretName, metav1.GetOptions{}) + if err != nil { + t.Fatalf("minted secret creation failed: %v", err) + } + + if secret.StringData["CredentialsFilePath"] != credsFile { + t.Errorf("Expected %s, got %s", + credsFile, + secret.StringData["CredentialsFilePath"]) + } + if secret.StringData["CredentialsFileContents"] != credsContents { + t.Errorf("Expected %s, got %s", + credsContents, + secret.StringData["CredentialsFileContents"]) + } + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go deleted file mode 100644 index 4dfb6b62..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package bucket - -import ( - "context" - "fmt" - "github.com/pkg/errors" - "strings" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilversion "k8s.io/apimachinery/pkg/util/version" - - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" - "k8s.io/client-go/util/workqueue" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - "sigs.k8s.io/container-object-storage-interface-api/controller" - - osspec "sigs.k8s.io/container-object-storage-interface-spec" - - "k8s.io/klog/v2" - - "golang.org/x/time/rate" -) - -// bucketListener manages Bucket objects -type bucketListener struct { - kubeClient kubeclientset.Interface - bucketClient bucketclientset.Interface - provisionerClient osspec.ProvisionerClient - - // The name of the provisioner for which this controller dynamically - // provisions buckets. - provisionerName string - kubeVersion *utilversion.Version -} - -// NewBucketController returns a controller that manages Bucket objects -func NewBucketController(provisionerName string, client osspec.ProvisionerClient) (*controller.ObjectStorageController, error) { - rateLimit := workqueue.NewMaxOfRateLimiter( - workqueue.NewItemExponentialFailureRateLimiter(5*time.Second, 60*time.Minute), - &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, - ) - - identity := fmt.Sprintf("objectstorage-sidecar-%s", provisionerName) - bc, err := controller.NewObjectStorageController(identity, "bucket-controller", 5, rateLimit) - if err != nil { - return nil, err - } - - bl := bucketListener{ - provisionerName: provisionerName, - provisionerClient: client, - } - bc.AddBucketListener(&bl) - - return bc, nil -} - -// InitializeKubeClient initializes the kubernetes client -func (bl *bucketListener) InitializeKubeClient(k kubeclientset.Interface) { - bl.kubeClient = k - - serverVersion, err := k.Discovery().ServerVersion() - if err != nil { - klog.Errorf("unable to get server version: %v", err) - } else { - bl.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) - } -} - -// InitializeBucketClient initializes the object storage bucket client -func (bl *bucketListener) InitializeBucketClient(bc bucketclientset.Interface) { - bl.bucketClient = bc -} - -// Add will call the provisioner and add a bucket -func (bl *bucketListener) Add(ctx context.Context, obj *v1alpha1.Bucket) error { - klog.Infof("bucketListener: add called for bucket %s", obj.Name) - - // Verify this bucket is for this provisioner - if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { - return nil - } - - req := osspec.ProvisionerCreateBucketRequest{ - Parameters: bl.getParams(obj), - } - if req.Parameters == nil { - req.Parameters = make(map[string]string) - } - - proto, err := obj.Spec.Protocol.ConvertToExternal() - if err != nil { - return errors.Wrap(err, "failed to parse protocol for API") - } - req.Protocol = proto - - req.Parameters["ProtocolVersion"] = obj.Spec.Protocol.Version - - if obj.Spec.AnonymousAccessMode.Private { - req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_Private - } else if obj.Spec.AnonymousAccessMode.PublicReadOnly { - req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_ReadOnly - } else if obj.Spec.AnonymousAccessMode.PublicReadWrite { - req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_ReadWrite - } else if obj.Spec.AnonymousAccessMode.PublicWriteOnly { - req.AnonymousBucketAccessMode = osspec.AnonymousBucketAccessMode_WriteOnly - } - - // TODO set grpc timeout - rsp, err := bl.provisionerClient.ProvisionerCreateBucket(ctx, &req) - if err != nil { - klog.Errorf("error calling ProvisionerCreateBucket: %v", err) - return err - } - klog.V(1).Infof("provisioner returned create bucket response %v", rsp) - - // TODO update the bucket protocol in the bucket spec - - // update bucket availability to true - return bl.updateStatus(ctx, obj.Name, "Bucket Provisioned", true) -} - -// Update does nothing -func (bl *bucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { - klog.Infof("bucketListener: update called for bucket %s", old.Name) - return nil -} - -// Delete will call the provisioner and delete a bucket -func (bl *bucketListener) Delete(ctx context.Context, obj *v1alpha1.Bucket) error { - klog.Infof("bucketListener: delete called for bucket %s", obj.Name) - - // Verify this bucket is for this provisioner - if !strings.EqualFold(obj.Spec.Provisioner, bl.provisionerName) { - return nil - } - - req := osspec.ProvisionerDeleteBucketRequest{ - Parameters: bl.getParams(obj), - } - if req.Parameters == nil { - req.Parameters = make(map[string]string) - } - - proto, err := obj.Spec.Protocol.ConvertToExternal() - if err != nil { - return errors.Wrap(err, "failed to parse protocol for API") - } - req.Protocol = proto - - req.Parameters["ProtocolVersion"] = obj.Spec.Protocol.Version - - // TODO set grpc timeout - rsp, err := bl.provisionerClient.ProvisionerDeleteBucket(ctx, &req) - if err != nil { - klog.Errorf("error calling ProvisionerDeleteBucket: %v", err) - obj.Status.Message = "Bucket Deleting" - obj.Status.BucketAvailable = false - _, err = bl.bucketClient.ObjectstorageV1alpha1().Buckets().UpdateStatus(ctx, obj, metav1.UpdateOptions{}) - return err - } - klog.Infof("provisioner returned delete bucket response %v", rsp) - - // update bucket availability to false - return bl.updateStatus(ctx, obj.Name, "Bucket Deleted", false) -} - -func (bl *bucketListener) updateStatus(ctx context.Context, name, msg string, state bool) error { - err := retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucket, err := bl.bucketClient.ObjectstorageV1alpha1().Buckets().Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return err - } - bucket.Status.Message = msg - bucket.Status.BucketAvailable = state - _, err = bl.bucketClient.ObjectstorageV1alpha1().Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}) - return err - }) - return err -} - -func (bl *bucketListener) getParams(obj *v1alpha1.Bucket) map[string]string { - params := map[string]string{} - if obj.Spec.Parameters != nil { - params = obj.Spec.Parameters - } - return params -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go deleted file mode 100644 index 90657a2d..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucket/bucket_controller_test.go +++ /dev/null @@ -1,534 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package bucket - -import ( - "context" - "reflect" - "testing" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - - osspec "sigs.k8s.io/container-object-storage-interface-spec" - fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" - - corev1 "k8s.io/api/core/v1" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilversion "k8s.io/apimachinery/pkg/util/version" - "k8s.io/apimachinery/pkg/version" - - fakediscovery "k8s.io/client-go/discovery/fake" - fakekubeclientset "k8s.io/client-go/kubernetes/fake" - - "google.golang.org/grpc" -) - -func TestInitializeKubeClient(t *testing.T) { - client := fakekubeclientset.NewSimpleClientset() - fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) - if !ok { - t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") - } - - fakeVersion := &version.Info{ - GitVersion: "v1.0.0", - } - fakeDiscovery.FakedServerVersion = fakeVersion - - bl := bucketListener{} - bl.InitializeKubeClient(client) - - if bl.kubeClient == nil { - t.Errorf("kubeClient was nil") - } - - expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) - if !reflect.DeepEqual(expected, bl.kubeVersion) { - t.Errorf("expected %+v, but got %+v", expected, bl.kubeVersion) - } -} - -func TestInitializeBucketClient(t *testing.T) { - client := fakebucketclientset.NewSimpleClientset() - - bl := bucketListener{} - bl.InitializeBucketClient(client) - - if bl.bucketClient == nil { - t.Errorf("bucketClient was nil") - } -} - -func TestAddWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerCreateBucket = func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - t.Errorf("grpc client called") - return nil, nil - } - - bl := bucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - } - - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - Provisioner: "provisioner2", - }, - } - ctx := context.TODO() - err := bl.Add(ctx, &b) - if err != nil { - t.Errorf("error returned: %+v", err) - } -} - -func TestAddValidProtocols(t *testing.T) { - provisioner := "provisioner1" - protocolVersion := "proto1" - anonAccess := "BUCKET_PRIVATE" - bucketName := "bucket1" - s3 := v1alpha1.S3Protocol{ - BucketName: "bucket1", - Endpoint: "127.0.0.1", - Region: "region1", - SignatureVersion: v1alpha1.S3SignatureVersionV2, - } - gcs := v1alpha1.GCSProtocol{ - BucketName: "bucket1", - PrivateKeyName: "keyName1", - ProjectID: "id1", - ServiceAccount: "account1", - } - azure := v1alpha1.AzureProtocol{ - ContainerName: "bucket1", - StorageAccount: "account1", - } - mpc := struct{ fakespec.FakeProvisionerClient }{} - - testCases := []struct { - name string - protocolName v1alpha1.ProtocolName - setProtocol func(b *v1alpha1.Bucket) - createFunc func(ctx context.Context, in *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) - params map[string]string - }{ - { - name: "S3", - protocolName: v1alpha1.ProtocolNameS3, - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &s3 - }, - createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != s3.BucketName { - t.Errorf("expected %s, got %s", s3.BucketName, in.BucketName) - } - if in.Region != s3.Region { - t.Errorf("expected %s, got %s", s3.Region, in.Region) - } - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(s3.SignatureVersion) { - t.Errorf("expected %s, got %s", s3.SignatureVersion, sigver) - } - if in.Endpoint != s3.Endpoint { - t.Errorf("expected %s, got %s", in.Endpoint, in.Endpoint) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerCreateBucketResponse{}, nil - }, - }, - { - name: "GCS", - protocolName: v1alpha1.ProtocolNameGCS, - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.GCS = &gcs - }, - createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - in := req.Protocol.GetGcs() - if in.BucketName != gcs.BucketName { - t.Errorf("expected %s, got %s", gcs.BucketName, in.BucketName) - } - if in.ServiceAccount != gcs.ServiceAccount { - t.Errorf("expected %s, got %s", gcs.ServiceAccount, in.ServiceAccount) - } - if in.PrivateKeyName != gcs.PrivateKeyName { - t.Errorf("expected %s, got %s", gcs.PrivateKeyName, in.PrivateKeyName) - } - if in.ProjectId != gcs.ProjectID { - t.Errorf("expected %s, got %s", gcs.ProjectID, in.ProjectId) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerCreateBucketResponse{}, nil - }, - }, - { - name: "AzureBlob", - protocolName: v1alpha1.ProtocolNameAzure, - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.AzureBlob = &azure - }, - createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - in := req.Protocol.GetAzureBlob() - if in.ContainerName != azure.ContainerName { - t.Errorf("expected %s, got %s", azure.ContainerName, in.ContainerName) - } - if in.StorageAccount != azure.StorageAccount { - t.Errorf("expected %s, got %s", azure.StorageAccount, in.StorageAccount) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerCreateBucketResponse{}, nil - }, - }, - { - name: "AnonymousAccessMode", - protocolName: v1alpha1.ProtocolNameAzure, - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.AzureBlob = &azure - }, - createFunc: func(ctx context.Context, req *osspec.ProvisionerCreateBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerCreateBucketResponse, error) { - in := req.Protocol.GetAzureBlob() - if in.ContainerName != azure.ContainerName { - t.Errorf("expected %s, got %s", azure.ContainerName, in.ContainerName) - } - if in.StorageAccount != azure.StorageAccount { - t.Errorf("expected %s, got %s", azure.StorageAccount, in.StorageAccount) - } - aMode := osspec.AnonymousBucketAccessMode(osspec.AnonymousBucketAccessMode_value[anonAccess]) - if req.AnonymousBucketAccessMode != aMode { - t.Errorf("expected %s, got %s", aMode, req.AnonymousBucketAccessMode) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerCreateBucketResponse{}, nil - }, - }, - } - - for _, tc := range testCases { - b := v1alpha1.Bucket{ - ObjectMeta: metav1.ObjectMeta{ - Name: bucketName, - }, - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, - Parameters: tc.params, - }, - } - - ctx := context.TODO() - client := fakebucketclientset.NewSimpleClientset(&b) - kubeClient := fakekubeclientset.NewSimpleClientset() - mpc.FakeProvisionerCreateBucket = tc.createFunc - bl := bucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - bucketClient: client, - kubeClient: kubeClient, - } - - tc.setProtocol(&b) - t.Logf(tc.name) - err := bl.Add(ctx, &b) - if err != nil { - t.Errorf("add returned: %+v", err) - } - - updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) - if updatedB.Status.BucketAvailable != true { - t.Errorf("expected %t, got %t", true, b.Status.BucketAvailable) - } - } -} - -func TestDeleteWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerDeleteBucket = func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - t.Errorf("grpc client called") - return nil, nil - } - - bl := bucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - } - - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - Provisioner: "provisioner2", - }, - } - ctx := context.TODO() - err := bl.Delete(ctx, &b) - if err != nil { - t.Errorf("error returned: %+v", err) - } -} - -func TestDeleteValidProtocols(t *testing.T) { - provisioner := "provisioner1" - region := "region1" - bucketName := "bucket1" - protocolVersion := "proto1" - sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) - account := "account1" - keyName := "keyName1" - projID := "id1" - endpoint := "endpoint1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - extraParamName := "ParamName" - extraParamValue := "ParamValue" - - testCases := []struct { - name string - setProtocol func(b *v1alpha1.Bucket) - protocolName v1alpha1.ProtocolName - deleteFunc func(ctx context.Context, in *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) - params map[string]string - }{ - { - name: "S3", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerDeleteBucketResponse{}, nil - }, - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "GCS", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ - ServiceAccount: account, - PrivateKeyName: keyName, - ProjectID: projID, - BucketName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameGCS, - deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - in := req.Protocol.GetGcs() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.ServiceAccount != account { - t.Errorf("expected %s, got %s", region, in.ServiceAccount) - } - if in.PrivateKeyName != keyName { - t.Errorf("expected %s, got %s", region, in.PrivateKeyName) - } - if in.ProjectId != projID { - t.Errorf("expected %s, got %s", region, in.ProjectId) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerDeleteBucketResponse{}, nil - }, - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "AzureBlob", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ - StorageAccount: account, - ContainerName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameAzure, - deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - in := req.Protocol.GetAzureBlob() - if in.ContainerName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.ContainerName) - } - if in.StorageAccount != account { - t.Errorf("expected %s, got %s", region, in.StorageAccount) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerDeleteBucketResponse{}, nil - }, - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "Empty parameters", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - deleteFunc: func(ctx context.Context, req *osspec.ProvisionerDeleteBucketRequest, opts ...grpc.CallOption) (*osspec.ProvisionerDeleteBucketResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - if req.Parameters["ProtocolVersion"] != protocolVersion { - t.Errorf("expected %s, got %s", protocolVersion, req.Parameters["ProtocolVersion"]) - } - return &osspec.ProvisionerDeleteBucketResponse{}, nil - }, - params: nil, - }, - } - - for _, tc := range testCases { - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, - Parameters: tc.params, - }, - Status: v1alpha1.BucketStatus{ - BucketAvailable: true, - }, - } - - ctx := context.TODO() - client := fakebucketclientset.NewSimpleClientset(&b) - mpc.FakeProvisionerDeleteBucket = tc.deleteFunc - bl := bucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - bucketClient: client, - } - - tc.setProtocol(&b) - t.Logf(tc.name) - err := bl.Delete(ctx, &b) - if err != nil { - t.Errorf("delete returned: %+v", err) - } - - updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) - if updatedB.Status.BucketAvailable != false { - t.Errorf("expected %t, got %t", false, b.Status.BucketAvailable) - } - } -} - -func TestDeleteInvalidProtocol(t *testing.T) { - const ( - protocolName v1alpha1.ProtocolName = "invalid" - ) - - bucketName := "bucket1" - provisioner := "provisioner1" - - bl := bucketListener{ - provisionerName: provisioner, - } - - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - BucketRequest: &corev1.ObjectReference{ - Name: bucketName, - }, - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{ - Name: protocolName, - }, - }, - } - - ctx := context.TODO() - err := bl.Delete(ctx, &b) - if err == nil { - t.Errorf("invalidProtocol: no error returned") - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go deleted file mode 100644 index 37c6db58..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package bucketaccess - -import ( - "context" - "fmt" - "github.com/pkg/errors" - "strings" - "time" - - corev1 "k8s.io/api/core/v1" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - utilversion "k8s.io/apimachinery/pkg/util/version" - - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" - "k8s.io/client-go/util/workqueue" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - "sigs.k8s.io/container-object-storage-interface-api/controller" - - osspec "sigs.k8s.io/container-object-storage-interface-spec" - - "k8s.io/klog/v2" - - "golang.org/x/time/rate" -) - -func generateSecretName(uid types.UID) string { - return fmt.Sprintf("ba-%s", string(uid)) -} - -// bucketAccessListener manages BucketAccess objects -type bucketAccessListener struct { - kubeClient kubeclientset.Interface - bucketAccessClient bucketclientset.Interface - provisionerClient osspec.ProvisionerClient - - // The name of the provisioner for which this controller handles - // bucket access. - provisionerName string - kubeVersion *utilversion.Version -} - -// NewBucketAccessController returns a controller that manages BucketAccess objects -func NewBucketAccessController(provisionerName string, client osspec.ProvisionerClient) (*controller.ObjectStorageController, error) { - rateLimit := workqueue.NewMaxOfRateLimiter( - workqueue.NewItemExponentialFailureRateLimiter(5*time.Second, 60*time.Minute), - &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, - ) - - identity := fmt.Sprintf("objectstorage-sidecar-%s", provisionerName) - bc, err := controller.NewObjectStorageController(identity, "bucket-access-controller", 5, rateLimit) - if err != nil { - return nil, err - } - - bal := bucketAccessListener{ - provisionerName: provisionerName, - provisionerClient: client, - } - bc.AddBucketAccessListener(&bal) - - return bc, nil -} - -// InitializeKubeClient initializes the kubernetes client -func (bal *bucketAccessListener) InitializeKubeClient(k kubeclientset.Interface) { - bal.kubeClient = k - - serverVersion, err := k.Discovery().ServerVersion() - if err != nil { - klog.Errorf("unable to get server version: %v", err) - } else { - bal.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) - } -} - -// InitializeBucketClient initializes the object storage bucket client -func (bal *bucketAccessListener) InitializeBucketClient(bc bucketclientset.Interface) { - bal.bucketAccessClient = bc -} - -// Add will call the provisioner to grant permissions -func (bal *bucketAccessListener) Add(ctx context.Context, obj *v1alpha1.BucketAccess) error { - klog.Infof("bucketAccessListener: add called for bucket access %s", obj.Name) - - // Verify this bucket access is for this provisioner - if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { - return nil - } - - bucketInstanceName := obj.Spec.BucketInstanceName - bucket, err := bal.bucketAccessClient.ObjectstorageV1alpha1().Buckets().Get(ctx, bucketInstanceName, metav1.GetOptions{}) - if err != nil { - return fmt.Errorf("unable to get bucket instance %s: %+v", bucketInstanceName, err) - } - - req := osspec.ProvisionerGrantBucketAccessRequest{ - Principal: obj.Spec.Principal, - AccessPolicy: obj.Spec.PolicyActionsConfigMapData, - Parameters: bal.getParams(obj), - } - - if req.Parameters == nil { - req.Parameters = make(map[string]string) - } - - proto, err := bucket.Spec.Protocol.ConvertToExternal() - if err != nil { - return errors.Wrap(err, "failed to parse protocol for API") - } - req.Protocol = proto - - // TODO set grpc timeout - rsp, err := bal.provisionerClient.ProvisionerGrantBucketAccess(ctx, &req) - if err != nil { - klog.Errorf("error calling ProvisionerGrantBucketAccess: %v", err) - return err - } - klog.Infof("provisioner returned grant bucket access response %v", rsp) - - // Only update the principal in the BucketAccess if it wasn't set because - // that means that the provisioner created one - if len(obj.Spec.Principal) == 0 && obj.Spec.ServiceAccount == nil { - err = bal.updatePrincipal(ctx, obj.Name, rsp) - if err != nil { - return err - } - } - - // Only create the secret with credentials if serviveAccount isn't set. - // If serviceAccount is set then authorization happens out of band in the - // cloud provider - if obj.Spec.ServiceAccount == nil { - secret := corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: generateSecretName(obj.UID), - }, - StringData: map[string]string{ - "CredentialsFilePath": rsp.CredentialsFilePath, - "CredentialsFileContents": rsp.CredentialsFileContents, - }, - Type: corev1.SecretTypeOpaque, - } - - // It's unlikely but should probably handle retries on rare case of collision - _, err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Create(ctx, &secret, metav1.CreateOptions{}) - if err != nil { - return err - } - - // TODO update the mintedSecretName in the BA - } - - // update bucket access status to granted - return bal.updateStatus(ctx, obj.Name, "Permissions Granted", true) -} - -// Update does nothing -func (bal *bucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { - klog.Infof("bucketAccessListener: update called for bucket %s", old.Name) - return nil -} - -// Delete will call the provisioner to revoke permissions -func (bal *bucketAccessListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccess) error { - klog.Infof("bucketAccessListener: delete called for bucket access %s", obj.Name) - - // Verify this bucket access is for this provisioner - if !strings.EqualFold(obj.Spec.Provisioner, bal.provisionerName) { - return nil - } - - bucketInstanceName := obj.Spec.BucketInstanceName - bucket, err := bal.bucketAccessClient.ObjectstorageV1alpha1().Buckets().Get(ctx, bucketInstanceName, metav1.GetOptions{}) - if err != nil { - return fmt.Errorf("unable to get bucket instance %s: %+v", bucketInstanceName, err) - } - - req := osspec.ProvisionerRevokeBucketAccessRequest{ - Principal: obj.Spec.Principal, - Parameters: bal.getParams(obj), - } - - if req.Parameters == nil { - req.Parameters = make(map[string]string) - } - - proto, err := bucket.Spec.Protocol.ConvertToExternal() - if err != nil { - return errors.Wrap(err, "failed to parse protocol for API") - } - req.Protocol = proto - - // TODO set grpc timeout - rsp, err := bal.provisionerClient.ProvisionerRevokeBucketAccess(ctx, &req) - if err != nil { - klog.Errorf("error calling ProvisionerRevokeBucketAccess: %v", err) - return err - } - klog.Infof("provisioner returned revoke bucket access response %v", rsp) - - // Delete the secret - if obj.Spec.ServiceAccount == nil { - // TODO get the minted secret name from the BA - - // It's unlikely but should probably handle retries on rare case of collision - err = bal.kubeClient.CoreV1().Secrets("objectstorage-system").Delete(ctx, generateSecretName(obj.UID), metav1.DeleteOptions{}) - if err != nil { - return err - } - } - - // Update bucket access status to revoked - return bal.updateStatus(ctx, obj.Name, "Permissions Revoked", false) -} - -func (bal *bucketAccessListener) updateStatus(ctx context.Context, name, msg string, state bool) error { - err := retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return err - } - bucketAccess.Status.Message = msg - bucketAccess.Status.AccessGranted = state - _, err = bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}) - return err - }) - return err -} - -func (bal *bucketAccessListener) updatePrincipal(ctx context.Context, name string, resp *osspec.ProvisionerGrantBucketAccessResponse) error { - err := retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucketAccess, err := bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return err - } - bucketAccess.Spec.Principal = resp.Principal - _, err = bal.bucketAccessClient.ObjectstorageV1alpha1().BucketAccesses().Update(ctx, bucketAccess, metav1.UpdateOptions{}) - return err - }) - return err -} - -func (bal *bucketAccessListener) getParams(obj *v1alpha1.BucketAccess) map[string]string { - params := map[string]string{} - if obj.Spec.Parameters != nil { - params = obj.Spec.Parameters - } - return params -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go deleted file mode 100644 index 1612114f..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/controller/bucketaccess/bucket_access_controller_test.go +++ /dev/null @@ -1,740 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package bucketaccess - -import ( - "context" - "reflect" - "strings" - "testing" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - - osspec "sigs.k8s.io/container-object-storage-interface-spec" - fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" - - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilversion "k8s.io/apimachinery/pkg/util/version" - "k8s.io/apimachinery/pkg/version" - - fakediscovery "k8s.io/client-go/discovery/fake" - fakekubeclientset "k8s.io/client-go/kubernetes/fake" - - "google.golang.org/grpc" -) - -func TestInitializeKubeClient(t *testing.T) { - client := fakekubeclientset.NewSimpleClientset() - fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) - if !ok { - t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") - } - - fakeVersion := &version.Info{ - GitVersion: "v1.0.0", - } - fakeDiscovery.FakedServerVersion = fakeVersion - - bal := bucketAccessListener{} - bal.InitializeKubeClient(client) - - if bal.kubeClient == nil { - t.Errorf("kubeClient was nil") - } - - expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) - if !reflect.DeepEqual(expected, bal.kubeVersion) { - t.Errorf("expected %+v, but got %+v", expected, bal.kubeVersion) - } -} - -func TestInitializeBucketClient(t *testing.T) { - client := fakebucketclientset.NewSimpleClientset() - - bal := bucketAccessListener{} - bal.InitializeBucketClient(client) - - if bal.bucketAccessClient == nil { - t.Errorf("bucketClient was nil") - } -} - -func TestAddWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerGrantBucketAccess = func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - t.Errorf("grpc client called") - return nil, nil - } - - bal := bucketAccessListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - } - - ba := v1alpha1.BucketAccess{ - Spec: v1alpha1.BucketAccessSpec{ - Provisioner: "provisioner2", - }, - } - ctx := context.TODO() - err := bal.Add(ctx, &ba) - if err != nil { - t.Errorf("error returned: %+v", err) - } -} - -func TestAdd(t *testing.T) { - provisioner := "provisioner1" - region := "region1" - bucketName := "bucket1" - principal := "principal1" - protocolVersion := "proto1" - sigVersion := v1alpha1.S3SignatureVersion(v1alpha1.S3SignatureVersionV2) - account := "account1" - keyName := "keyName1" - projID := "id1" - endpoint := "endpoint1" - instanceName := "instance" - credsContents := "credsContents" - credsFile := "credsFile" - generatedPrincipal := "driverPrincipal" - sa := "serviceAccount" - mpc := struct{ fakespec.FakeProvisionerClient }{} - extraParamName := "ParamName" - extraParamValue := "ParamValue" - - testCases := []struct { - name string - setProtocol func(b *v1alpha1.Bucket) - protocolName v1alpha1.ProtocolName - grantFunc func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) - principal string - serviceAccount string - params map[string]string - }{ - { - name: "S3", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - // TODO do we need to check ProtocolVersion here? If so, from where? - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: principal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: principal, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "GCS", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ - ServiceAccount: account, - PrivateKeyName: keyName, - ProjectID: projID, - BucketName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameGCS, - grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - in := req.Protocol.GetGcs() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - if in.ServiceAccount != account { - t.Errorf("expected %s, got %s", account, in.ServiceAccount) - } - if in.PrivateKeyName != keyName { - t.Errorf("expected %s, got %s", keyName, in.PrivateKeyName) - } - if in.ProjectId != projID { - t.Errorf("expected %s, got %s", projID, in.ProjectId) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: principal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: principal, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "AzureBlob", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ - StorageAccount: account, - ContainerName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameAzure, - grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - in := req.Protocol.GetAzureBlob() - if in.ContainerName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.ContainerName) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - if in.StorageAccount != account { - t.Errorf("expected %s, got %s", account, in.StorageAccount) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: principal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: principal, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "No Principal", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: generatedPrincipal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: "", - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "ServiceAccount exists", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, in *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: principal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: principal, - serviceAccount: sa, - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "Empty parameters", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - grantFunc: func(ctx context.Context, req *osspec.ProvisionerGrantBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerGrantBucketAccessResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - // TODO do we need to check ProtocolVersion here? If so, from where? - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - return &osspec.ProvisionerGrantBucketAccessResponse{ - Principal: principal, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, - }, nil - }, - principal: principal, - serviceAccount: "", - params: nil, - }, - } - - for _, tc := range testCases { - b := v1alpha1.Bucket{ - ObjectMeta: metav1.ObjectMeta{ - Name: instanceName, - }, - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, - }, - } - - ba := v1alpha1.BucketAccess{ - Spec: v1alpha1.BucketAccessSpec{ - BucketInstanceName: instanceName, - Provisioner: provisioner, - Principal: tc.principal, - Parameters: tc.params, - }, - } - - if len(tc.serviceAccount) > 0 { - ba.Spec.ServiceAccount = &corev1.ObjectReference{ - Name: tc.serviceAccount, - } - } - - ctx := context.TODO() - tc.setProtocol(&b) - client := fakebucketclientset.NewSimpleClientset(&ba, &b) - kubeClient := fakekubeclientset.NewSimpleClientset() - mpc.FakeProvisionerGrantBucketAccess = tc.grantFunc - bal := bucketAccessListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - bucketAccessClient: client, - kubeClient: kubeClient, - } - - t.Logf(tc.name) - err := bal.Add(ctx, &ba) - if err != nil { - t.Errorf("add returned: %+v", err) - } - - updatedBA, _ := client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) - if updatedBA.Status.AccessGranted != true { - t.Errorf("expected %t, got %t", true, ba.Status.AccessGranted) - } - if len(tc.principal) <= 0 { - if !strings.EqualFold(updatedBA.Spec.Principal, generatedPrincipal) { - t.Errorf("expected %s, got %s", generatedPrincipal, updatedBA.Spec.Principal) - } - } - - secretName := generateSecretName(ba.UID) - secret, err := kubeClient.CoreV1().Secrets("objectstorage-system").Get(ctx, secretName, metav1.GetOptions{}) - if len(tc.serviceAccount) > 0 { - if err == nil { - t.Errorf("secret should not have been created") - } - } else { - if secret.StringData["CredentialsFilePath"] != credsFile { - t.Errorf("expected %s, got %s", credsFile, secret.StringData["CredentialsFilePath"]) - } - if secret.StringData["CredentialsFileContents"] != credsContents { - t.Errorf("expected %s, got %s", credsContents, secret.StringData["CredentialsFileContents"]) - } - } - } -} - -func TestDeleteWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerRevokeBucketAccess = func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - t.Errorf("grpc client called") - return nil, nil - } - - bal := bucketAccessListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - } - - ba := v1alpha1.BucketAccess{ - Spec: v1alpha1.BucketAccessSpec{ - Provisioner: "provisioner2", - }, - } - ctx := context.TODO() - err := bal.Delete(ctx, &ba) - if err != nil { - t.Errorf("error returned: %+v", err) - } -} - -func TestDelete(t *testing.T) { - provisioner := "provisioner1" - region := "region1" - bucketName := "bucket1" - principal := "principal1" - protocolVersion := "proto1" - sigVersion := v1alpha1.S3SignatureVersionV2 - account := "account1" - keyName := "keyName1" - projID := "id1" - endpoint := "endpoint1" - instanceName := "instance" - mpc := struct{ fakespec.FakeProvisionerClient }{} - extraParamName := "ParamName" - extraParamValue := "ParamValue" - - testCases := []struct { - name string - setProtocol func(b *v1alpha1.Bucket) - protocolName v1alpha1.ProtocolName - revokeFunc func(ctx context.Context, in *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) - serviceAccount string - params map[string]string - }{ - { - name: "S3", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - // TODO do we need to check ProtocolVersion here? If so, from where? - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil - }, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "GCS", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.GCS = &v1alpha1.GCSProtocol{ - ServiceAccount: account, - PrivateKeyName: keyName, - ProjectID: projID, - BucketName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameGCS, - revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - in := req.Protocol.GetGcs() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - if in.ServiceAccount != account { - t.Errorf("expected %s, got %s", account, in.ServiceAccount) - } - if in.PrivateKeyName != keyName { - t.Errorf("expected %s, got %s", keyName, in.PrivateKeyName) - } - if in.ProjectId != projID { - t.Errorf("expected %s, got %s", projID, in.ProjectId) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil - }, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "AzureBlob", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.AzureBlob = &v1alpha1.AzureProtocol{ - StorageAccount: account, - ContainerName: bucketName, - } - }, - protocolName: v1alpha1.ProtocolNameAzure, - revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - in := req.Protocol.GetAzureBlob() - if in.ContainerName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.ContainerName) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - if in.StorageAccount != account { - t.Errorf("expected %s, got %s", account, in.StorageAccount) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil - }, - serviceAccount: "", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "service account exists", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - // TODO do we need to check ProtocolVersion here? If so, from where? - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - if req.Parameters[extraParamName] != extraParamValue { - t.Errorf("expected %s, got %s", extraParamValue, req.Parameters[extraParamName]) - } - return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil - }, - serviceAccount: "serviceAccount", - params: map[string]string{ - extraParamName: extraParamValue, - }, - }, - { - name: "Empty parameters", - setProtocol: func(b *v1alpha1.Bucket) { - b.Spec.Protocol.S3 = &v1alpha1.S3Protocol{ - Region: region, - SignatureVersion: sigVersion, - BucketName: bucketName, - Endpoint: endpoint, - } - }, - protocolName: v1alpha1.ProtocolNameS3, - revokeFunc: func(ctx context.Context, req *osspec.ProvisionerRevokeBucketAccessRequest, opts ...grpc.CallOption) (*osspec.ProvisionerRevokeBucketAccessResponse, error) { - in := req.Protocol.GetS3() - if in.BucketName != bucketName { - t.Errorf("expected %s, got %s", bucketName, in.BucketName) - } - if in.Region != region { - t.Errorf("expected %s, got %s", region, in.Region) - } - if req.Principal != principal { - t.Errorf("expected %s, got %s", principal, req.Principal) - } - // TODO do we need to check ProtocolVersion here? If so, from where? - sigver, ok := osspec.S3SignatureVersion_name[int32(in.SignatureVersion)] - if !ok { - sigver = osspec.S3SignatureVersion_name[int32(osspec.S3SignatureVersion_UnknownSignature)] - } - if sigver != string(sigVersion) { - t.Errorf("expected %s, got %s", sigVersion, sigver) - } - if in.Endpoint != endpoint { - t.Errorf("expected %s, got %s", endpoint, in.Endpoint) - } - return &osspec.ProvisionerRevokeBucketAccessResponse{}, nil - }, - serviceAccount: "", - params: nil, - }, - } - - for _, tc := range testCases { - b := v1alpha1.Bucket{ - ObjectMeta: metav1.ObjectMeta{ - Name: instanceName, - }, - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{ - Name: tc.protocolName, - Version: protocolVersion, - }, - }, - } - - ba := v1alpha1.BucketAccess{ - Spec: v1alpha1.BucketAccessSpec{ - BucketInstanceName: instanceName, - Provisioner: provisioner, - Principal: principal, - Parameters: tc.params, - }, - Status: v1alpha1.BucketAccessStatus{ - AccessGranted: true, - }, - } - - if len(tc.serviceAccount) > 0 { - ba.Spec.ServiceAccount = &corev1.ObjectReference{ - Name: tc.serviceAccount, - } - } - secretName := generateSecretName(ba.UID) - secret := v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: secretName, - Namespace: "objectstorage-system", - }, - Type: v1.SecretTypeOpaque, - } - - t.Logf(tc.name) - ctx := context.TODO() - tc.setProtocol(&b) - client := fakebucketclientset.NewSimpleClientset(&ba, &b) - kubeClient := fakekubeclientset.NewSimpleClientset(&secret) - mpc.FakeProvisionerRevokeBucketAccess = tc.revokeFunc - bal := bucketAccessListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - bucketAccessClient: client, - kubeClient: kubeClient, - } - - err := bal.Delete(ctx, &ba) - if err != nil { - t.Errorf("delete returned: %+v", err) - } - - updatedBA, _ := client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) - if updatedBA.Status.AccessGranted != false { - t.Errorf("expected %t, got %t", false, ba.Status.AccessGranted) - } - - _, err = kubeClient.CoreV1().Secrets("objectstorage-system").Get(ctx, secretName, metav1.GetOptions{}) - if len(tc.serviceAccount) == 0 { - if err == nil { - t.Errorf("secret should not exist") - } - } - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go deleted file mode 100644 index 25016a39..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcclient/client.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package grpcclient - -import ( - "context" - "errors" - "net" - "strings" - "time" - - "google.golang.org/grpc" - - "k8s.io/klog/v2" -) - -type options struct { - reconnect func() bool -} - -// Option is the type of all optional parameters for Connect. -type Option func(o *options) - -type GRPCClient struct { - serverAddress string - dialOptions []grpc.DialOption -} - -// NewGRPCClient creates a new GRPCClient -func NewGRPCClient(address string, dialOptions []grpc.DialOption, connectOptions []Option) (*GRPCClient, error) { - var o options - for _, option := range connectOptions { - option(&o) - } - - dialOptions = append(dialOptions, - grpc.WithInsecure(), // Don't use TLS, it's usually local Unix domain socket in a container. - grpc.WithBackoffMaxDelay(time.Second), // Retry every second after failure. - grpc.WithBlock(), // Block until connection succeeds. - ) - - unixPrefix := "unix://" - if strings.HasPrefix(address, "tcp://") { - address = address[6:] - } - if strings.HasPrefix(address, "/") { - // It looks like filesystem path. - address = unixPrefix + address - } - - if strings.HasPrefix(address, unixPrefix) { - // state variables for the custom dialer - haveConnected := false - lostConnection := false - reconnect := true - - dialOptions = append(dialOptions, grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { - if haveConnected && !lostConnection { - // We have detected a loss of connection for the first time. Decide what to do... - // Record this once. TODO (?): log at regular time intervals. - klog.Errorf("Lost connection to %s.", address) - // Inform caller and let it decide? Default is to reconnect. - if o.reconnect != nil { - reconnect = o.reconnect() - } - lostConnection = true - } - if !reconnect { - return nil, errors.New("connection lost, reconnecting disabled") - } - conn, err := net.DialTimeout("unix", address[len(unixPrefix):], timeout) - if err == nil { - // Connection restablished. - haveConnected = true - lostConnection = false - } - return conn, err - })) - } else if o.reconnect != nil { - return nil, errors.New("OnConnectionLoss callback only supported for unix:// addresses") - } - - return &GRPCClient{serverAddress: address, dialOptions: dialOptions}, nil -} - -// Connect connects to the grpc server -func (c *GRPCClient) ConnectWithLogging(interval time.Duration) (*grpc.ClientConn, error) { - klog.Infof("Connecting to %s", c.serverAddress) - - grpcLogFunc := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - klog.Infof("GRPC call: %s", method) - klog.Infof("GRPC request: %s", req) - err := invoker(ctx, method, req, reply, cc, opts...) - klog.Infof("GRPC response: %s", reply) - klog.Infof("GRPC error: %v", err) - return err - } - - // Log all messages - c.dialOptions = append(c.dialOptions, grpc.WithChainUnaryInterceptor(grpcLogFunc)) - - // Connect in background. - var conn *grpc.ClientConn - var err error - ready := make(chan bool) - go func() { - conn, err = grpc.Dial(c.serverAddress, c.dialOptions...) - close(ready) - }() - - // Log error every connectionLoggingInterval - ticker := time.NewTicker(interval) - defer ticker.Stop() - - // Wait until Dial() succeeds. - for { - select { - case <-ticker.C: - klog.Warningf("Still connecting to %s", c.serverAddress) - - case <-ready: - return conn, err - } - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go deleted file mode 100644 index a78901ef..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/grpcserver/server.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package grpcserver - -import ( - "fmt" - "net" - "os" - "strings" - "sync" - - "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" - "golang.org/x/net/context" - "google.golang.org/grpc" - - osi "sigs.k8s.io/container-object-storage-interface-spec" - - "k8s.io/klog/v2" -) - -// Defines Non blocking GRPC server interfaces -type NonBlockingGRPCServer interface { - // Start services at the endpoint - Start(endpoint string, cds osi.ProvisionerServer, ids osi.IdentityServer) - // Waits for the service to stop - Wait() - // Stops the service gracefully - Stop() - // Stops the service forcefully - ForceStop() -} - -func NewNonBlockingGRPCServer() NonBlockingGRPCServer { - return &nonBlockingGRPCServer{} -} - -// NonBlocking server -type nonBlockingGRPCServer struct { - wg sync.WaitGroup - server *grpc.Server -} - -func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - klog.Infof("GRPC call: %s", info.FullMethod) - klog.Infof("GRPC request: %s", protosanitizer.StripSecrets(req)) - resp, err := handler(ctx, req) - if err != nil { - klog.Errorf("GRPC error: %v", err) - } else { - klog.Infof("GRPC response: %s", protosanitizer.StripSecrets(resp)) - } - return resp, err -} - -func ParseEndpoint(ep string) (string, string, error) { - if strings.HasPrefix(strings.ToLower(ep), "unix://") || strings.HasPrefix(strings.ToLower(ep), "tcp://") { - s := strings.SplitN(ep, "://", 2) - if s[1] != "" { - return s[0], s[1], nil - } - } - return "", "", fmt.Errorf("Invalid endpoint: %v", ep) -} - -func (s *nonBlockingGRPCServer) Start(endpoint string, cds osi.ProvisionerServer, ids osi.IdentityServer) { - - s.wg.Add(1) - - go s.serve(endpoint, cds, ids) - - return -} - -func (s *nonBlockingGRPCServer) Wait() { - s.wg.Wait() -} - -func (s *nonBlockingGRPCServer) Stop() { - s.server.GracefulStop() -} - -func (s *nonBlockingGRPCServer) ForceStop() { - s.server.Stop() -} - -func (s *nonBlockingGRPCServer) serve(endpoint string, driver osi.ProvisionerServer, identity osi.IdentityServer) { - - proto, addr, err := ParseEndpoint(endpoint) - if err != nil { - klog.Fatal(err.Error()) - } - - if proto == "unix" { - addr = "/" + addr - if err := os.Remove(addr); err != nil && !os.IsNotExist(err) { - klog.Fatalf("Failed to remove %s, error: %s", addr, err.Error()) - } - } - klog.Infof("Create listener on %s", endpoint) - - //listener, err := net.Listen("tcp", fmt.Sprintf(":%d", osi-port)) - listener, err := net.Listen(proto, addr) - if err != nil { - klog.Fatalf("Failed to listen: %v", err) - } - - opts := []grpc.ServerOption{ - grpc.UnaryInterceptor(logGRPC), - } - server := grpc.NewServer(opts...) - s.server = server - - klog.Infof("Registering CosiControllerServer") - if driver != nil { - osi.RegisterProvisionerServer(server, driver) - } - if identity != nil { - osi.RegisterIdentityServer(server, identity) - } - - klog.Infof("Listening for connections on address: %#v", listener.Addr()) - - server.Serve(listener) - -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go new file mode 100644 index 00000000..ab689309 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go @@ -0,0 +1,70 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package provisioner + +import ( + "context" + + "google.golang.org/grpc" + cosi "sigs.k8s.io/container-object-storage-interface-spec" +) + +var ( + _ cosi.IdentityClient = &COSIProvisionerClient{} + _ cosi.ProvisionerClient = &COSIProvisionerClient{} +) + +type COSIProvisionerClient struct { + address string + conn *grpc.ClientConn + identityClient cosi.IdentityClient + provisionerClient cosi.ProvisionerClient +} + +func (c *COSIProvisionerClient) ProvisionerGetInfo(ctx context.Context, + in *cosi.ProvisionerGetInfoRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerGetInfoResponse, error) { + + return c.identityClient.ProvisionerGetInfo(ctx, in, opts...) +} + +func (c *COSIProvisionerClient) ProvisionerCreateBucket(ctx context.Context, + in *cosi.ProvisionerCreateBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerCreateBucketResponse, error) { + + return c.provisionerClient.ProvisionerCreateBucket(ctx, in, opts...) +} + +func (c *COSIProvisionerClient) ProvisionerDeleteBucket(ctx context.Context, + in *cosi.ProvisionerDeleteBucketRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { + + return c.provisionerClient.ProvisionerDeleteBucket(ctx, in, opts...) +} + +func (c *COSIProvisionerClient) ProvisionerGrantBucketAccess(ctx context.Context, + in *cosi.ProvisionerGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + + return c.provisionerClient.ProvisionerGrantBucketAccess(ctx, in, opts...) +} + +func (c *COSIProvisionerClient) ProvisionerRevokeBucketAccess(ctx context.Context, + in *cosi.ProvisionerRevokeBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { + + return c.provisionerClient.ProvisionerRevokeBucketAccess(ctx, in, opts...) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/interceptors.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/interceptors.go new file mode 100644 index 00000000..77d4353a --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/interceptors.go @@ -0,0 +1,46 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package provisioner + +import ( + "context" + "encoding/json" + "time" + + "google.golang.org/grpc" + "k8s.io/klog/v2" +) + +func apiLogger(ctx context.Context, api string, + req, resp interface{}, + grpcConn *grpc.ClientConn, + apiCall grpc.UnaryInvoker, + opts ...grpc.CallOption) error { + + if jsonReq, err := json.MarshalIndent(req, "", " "); err != nil { + klog.InfoS("Request", "api", api, "req", string(jsonReq)) + } + + start := time.Now() + err := apiCall(ctx, api, req, resp, grpcConn, opts...) + end := time.Now() + + if jsonRes, err := json.MarshalIndent(resp, "", " "); err != nil { + klog.InfoS("Response", "api", api, "elapsed", end.Sub(start), "resp", jsonRes) + } + + return err +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go new file mode 100644 index 00000000..6f34be06 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go @@ -0,0 +1,111 @@ +/* Copyright 2021 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package provisioner + +import ( + "context" + "net/url" + "time" + + "github.com/pkg/errors" + "google.golang.org/grpc" + + "k8s.io/klog/v2" + cosi "sigs.k8s.io/container-object-storage-interface-spec" +) + +const ( + maxGrpcBackoff = 30 * time.Second + grpcDialTimeout = 30 * time.Second +) + +func NewDefaultCOSIProvisionerClient(ctx context.Context, address string, debug bool) (*COSIProvisionerClient, error) { + dialOpts := []grpc.DialOption{ + grpc.WithInsecure(), // strictly restricting to local Unix domain socket + grpc.WithBackoffMaxDelay(maxGrpcBackoff), + grpc.WithBlock(), // block until connection succeeds + grpc.WithTimeout(grpcDialTimeout), + } + + interceptors := []grpc.UnaryClientInterceptor{} + + if debug { + interceptors = append(interceptors, apiLogger) + } + return NewCOSIProvisionerClient(ctx, address, dialOpts, interceptors) +} + +// NewCOSIProvisionerClient creates a new GRPCClient that only supports unix domain sockets +func NewCOSIProvisionerClient(ctx context.Context, address string, dialOpts []grpc.DialOption, interceptors []grpc.UnaryClientInterceptor) (*COSIProvisionerClient, error) { + addr, err := url.Parse(address) + if err != nil { + return nil, err + } + + if addr.Scheme != "unix" { + err := errors.New("Address must be a unix domain socket") + klog.ErrorS(err, "Unsupported scheme", "expected", "unix", "found", addr.Scheme) + return nil, errors.Wrap(err, "Invalid argument") + } + + for _, interceptor := range interceptors { + dialOpts = append(dialOpts, grpc.WithChainUnaryInterceptor(interceptor)) + } + + conn, err := grpc.DialContext(ctx, address, dialOpts...) + if err != nil { + klog.ErrorS(err, "Connection failed", "address", address) + return nil, err + } + + return &COSIProvisionerClient{ + address: address, + conn: conn, + identityClient: cosi.NewIdentityClient(conn), + provisionerClient: cosi.NewProvisionerClient(conn), + }, nil +} + +func NewDefaultCOSIProvisionerServer(address string, + identityServer cosi.IdentityServer, + provisionerServer cosi.ProvisionerServer) (*COSIProvisionerServer, error) { + + return NewCOSIProvisionerServer(address, identityServer, provisionerServer, []grpc.ServerOption{}) +} + +func NewCOSIProvisionerServer(address string, + identityServer cosi.IdentityServer, + provisionerServer cosi.ProvisionerServer, + listenOpts []grpc.ServerOption) (*COSIProvisionerServer, error) { + + if identityServer == nil { + err := errors.New("Identity server cannot be nil") + klog.ErrorS(err, "Invalid argument") + return nil, err + } + if provisionerServer == nil { + err := errors.New("Provisioner server cannot be nil") + klog.ErrorS(err, "Invalid argument") + return nil, err + } + + return &COSIProvisionerServer{ + address: address, + identityServer: identityServer, + provisionerServer: provisionerServer, + listenOpts: listenOpts, + }, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go new file mode 100644 index 00000000..dab572aa --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go @@ -0,0 +1,67 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package provisioner + +import ( + "context" + "net" + "net/url" + + "github.com/pkg/errors" + "google.golang.org/grpc" + + "k8s.io/klog/v2" + cosi "sigs.k8s.io/container-object-storage-interface-spec" +) + +type COSIProvisionerServer struct { + address string + identityServer cosi.IdentityServer + provisionerServer cosi.ProvisionerServer + + listenOpts []grpc.ServerOption +} + +func (s *COSIProvisionerServer) Run(ctx context.Context) error { + addr, err := url.Parse(s.address) + if err != nil { + return err + } + + if addr.Scheme != "unix" { + err := errors.New("Address must be a unix domain socket") + klog.ErrorS(err, "Unsupported scheme", "expected", "unix", "found", addr.Scheme) + return errors.Wrap(err, "Invalid argument") + } + + listenConfig := net.ListenConfig{} + listener, err := listenConfig.Listen(ctx, "unix", addr.Path) + if err != nil { + klog.ErrorS(err, "Failed to start server") + return errors.Wrap(err, "Failed to start server") + } + + server := grpc.NewServer(s.listenOpts...) + + if s.provisionerServer == nil || s.identityServer == nil { + err := errors.New("ProvisionerServer and identity server cannot be nil") + klog.ErrorS(err, "Invalid args") + return errors.Wrap(err, "Invalid args") + } + + cosi.RegisterIdentityServer(server, s.identityServer) + cosi.RegisterProvisionerServer(server, s.provisionerServer) + + return server.Serve(listener) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go new file mode 100644 index 00000000..d74a1932 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sampledriver + +func NewDriver(provisioner string) (*IdentityServer, *ProvisionerServer) { + return &IdentityServer{ + provisioner: provisioner, + }, &ProvisionerServer{ + provisioner: provisioner, + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go new file mode 100644 index 00000000..c45fa898 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go @@ -0,0 +1,42 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sampledriver + +import ( + "context" + + "k8s.io/klog/v2" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type IdentityServer struct { + provisioner string +} + +func (id *IdentityServer) ProvisionerGetInfo(ctx context.Context, + req *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { + + if id.provisioner == "" { + klog.ErrorS(errors.New("provisioner name cannot be empty"), "Invalid argument") + return nil, status.Error(codes.Unavailable, "Provisioner name not configured") + } + + return &cosi.ProvisionerGetInfoResponse{ + Name: id.provisioner, + }, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go new file mode 100644 index 00000000..b44cd589 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go @@ -0,0 +1,49 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sampledriver + +import ( + "context" + + _ "k8s.io/klog/v2" + cosi "sigs.k8s.io/container-object-storage-interface-spec" +) + +type ProvisionerServer struct { + provisioner string +} + +func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, + req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { + + return &cosi.ProvisionerCreateBucketResponse{}, nil +} + +func (s *ProvisionerServer) ProvisionerDeleteBucket(ctx context.Context, + req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { + + return &cosi.ProvisionerDeleteBucketResponse{}, nil +} + +func (s *ProvisionerServer) ProvisionerGrantBucketAccess(ctx context.Context, + req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + + return &cosi.ProvisionerGrantBucketAccessResponse{}, nil +} + +func (s *ProvisionerServer) ProvisionerRevokeBucketAccess(ctx context.Context, + req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { + + return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index 6eac0fb7..3f924213 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -34,11 +34,11 @@ spec: spec: serviceAccountName: objectstorage-provisioner-sa containers: - - name: objectstorage-sample-driver - image: quay.io/containerobjectstorage/objectstorage-sample-driver:latest + - name: minio-cosi-driver + image: quay.io/containerobjectstorage/minio-cosi-driver:latest args: - - "--listen-address=$(LISTEN_ADDRESS)" - - "--s3-endpoint=$(S3_ENDPOINT)" + - "--driver-addr=$(DRIVER_ADDRESS)" + - "--endpoint=$(ENDPOINT)" - "--access-key=$(ACCESS_KEY)" - "--secret-key=$(SECRET_KEY)" envFrom: @@ -47,10 +47,10 @@ spec: - name: objectstorage-provisioner-sidecar image: quay.io/containerobjectstorage/objectstorage-sidecar:latest args: - - "--connect-address=$(CONNECT_ADDRESS)" - env: - - name: CONNECT_ADDRESS + - "--driver-addr=$(DRIVER_ADDRESS)" + envFrom: + - name: DRIVER_ADDRESS valueFrom: secretKeyRef: name: objectstorage-provisioner - key: LISTEN_ADDRESS + key: DRIVER_ADDRESS diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml index 69085e50..d7f96fa3 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml @@ -10,9 +10,9 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-provisioner type: Opaque stringData: - LISTEN_ADDRESS: tcp://0.0.0.0:9000 + DRIVER_ADDRESS: unix:///var/lib/cosi/cosi.sock data: # set to space - S3_ENDPOINT: IA== + ENDPOINT: IA== ACCESS_KEY: IA== SECRET_KEY: IA== From 97eaa46d71486f60eb376c69b41affd30b2e5e65 Mon Sep 17 00:00:00 2001 From: wlan0 Date: Tue, 6 Apr 2021 22:57:24 -0700 Subject: [PATCH 174/299] Sample driver: Implement ProvisionerCreateBucket - Fix deployment files - Make repository org and version configurable for easier dev-test lifecycle - Fix EnvVar <-> CLI flag parsing in both sidecar and sample driver - Respond to context cancels correctly from grpc server --- .../cmd/minio-cosi-driver/Dockerfile | 6 + .../cmd/minio-cosi-driver/cmd.go | 47 ++++++- .../cmd/minio-cosi-driver/internal/driver.go | 34 +++++ .../minio-cosi-driver/internal}/identity.go | 4 +- .../internal/minio/bucket.go | 36 ++++++ .../internal/minio/client.go | 101 +++++++++++++++ .../internal/minio/const.go} | 12 +- .../minio-cosi-driver/internal/provisioner.go | 121 ++++++++++++++++++ .../cmd/minio-cosi-driver/main.go | 1 + .../cmd/objectstorage-sidecar/cmd.go | 39 +++--- .../go.mod | 4 +- .../go.sum | 17 ++- .../kustomization.yaml | 27 ++++ .../pkg/bucket/bucket_controller.go | 9 +- .../pkg/provisioner/server.go | 13 +- .../pkg/sampledriver/provisioner.go | 49 ------- .../resources/deployment.yaml | 31 +++-- .../resources/kustomizeconfig.yaml | 3 + .../objectstorage-provisioner.properties | 2 + .../resources/secret.yaml | 11 +- 20 files changed, 464 insertions(+), 103 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go rename container-object-storage-interface-provisioner-sidecar/{pkg/sampledriver => cmd/minio-cosi-driver/internal}/identity.go (92%) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go rename container-object-storage-interface-provisioner-sidecar/{pkg/sampledriver/driver.go => cmd/minio-cosi-driver/internal/minio/const.go} (74%) create mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml create mode 100644 container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile new file mode 100644 index 00000000..6502d40d --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:latest +LABEL maintainers="Kubernetes COSI Authors" +LABEL description="MinIO COSI driver" + +COPY ./bin/minio-cosi-driver minio-cosi-driver +ENTRYPOINT ["/minio-cosi-driver"] diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go index 69d243e9..f3826b84 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go @@ -16,12 +16,14 @@ package main import ( "context" "flag" + "strings" "github.com/spf13/cobra" + "github.com/spf13/pflag" "github.com/spf13/viper" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/provisioner" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver" "k8s.io/klog/v2" ) @@ -30,6 +32,10 @@ const provisionerName = "minio.objectstorage.k8s.io" var ( driverAddress = "unix:///var/lib/cosi/cosi.sock" + + minioAccessKey = "" + minioSecretKey = "" + minioHost = "" ) var cmd = &cobra.Command{ @@ -45,6 +51,7 @@ var cmd = &cobra.Command{ func init() { viper.AutomaticEnv() + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) flag.Set("alsologtostderr", "true") kflags := flag.NewFlagSet("klog", flag.ExitOnError) @@ -54,18 +61,52 @@ func init() { persistentFlags.AddGoFlagSet(kflags) stringFlag := persistentFlags.StringVarP + stringFlag(&driverAddress, "driver-addr", "d", driverAddress, "path to unix domain socket where driver should listen") + stringFlag(&minioHost, + "minio-host", + "m", + minioHost, + "endpoint where minio server is listening") + + stringFlag(&minioAccessKey, + "minio-access-key", + "a", + minioAccessKey, + "access key for minio") + + stringFlag(&minioSecretKey, + "minio-secret-key", + "s", + minioSecretKey, + "secret key for minio") + viper.BindPFlags(cmd.PersistentFlags()) + cmd.PersistentFlags().VisitAll(func(f *pflag.Flag) { + if viper.IsSet(f.Name) && viper.GetString(f.Name) != "" { + cmd.PersistentFlags().Set(f.Name, viper.GetString(f.Name)) + } + }) } func run(ctx context.Context, args []string) error { - identityServer, bucketProvisioner := sampledriver.NewDriver(provisionerName) - server, err := provisioner.NewDefaultCOSIProvisionerServer(driverAddress, identityServer, bucketProvisioner) + identityServer, bucketProvisioner, err := internal.NewDriver(ctx, + provisionerName, + minioHost, + minioAccessKey, + minioSecretKey) + if err != nil { + return err + } + + server, err := provisioner.NewDefaultCOSIProvisionerServer(driverAddress, + identityServer, + bucketProvisioner) if err != nil { return err } diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go new file mode 100644 index 00000000..9dfe02ef --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go @@ -0,0 +1,34 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" +) + +func NewDriver(ctx context.Context, provisioner, minioHost, accessKey, secretKey string) (*IdentityServer, *ProvisionerServer, error) { + mc, err := minio.NewClient(ctx, minioHost, accessKey, secretKey) + if err != nil { + return nil, nil, err + } + + return &IdentityServer{ + provisioner: provisioner, + }, &ProvisionerServer{ + provisioner: provisioner, + mc: mc, + }, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go similarity index 92% rename from container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go rename to container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go index c45fa898..012d3c48 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/identity.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package sampledriver +package internal import ( "context" @@ -33,7 +33,7 @@ func (id *IdentityServer) ProvisionerGetInfo(ctx context.Context, if id.provisioner == "" { klog.ErrorS(errors.New("provisioner name cannot be empty"), "Invalid argument") - return nil, status.Error(codes.Unavailable, "Provisioner name not configured") + return nil, status.Error(codes.InvalidArgument, "ProvisionerName is empty") } return &cosi.ProvisionerGetInfoResponse{ diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go new file mode 100644 index 00000000..37c647db --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go @@ -0,0 +1,36 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package minio + +import ( + "context" + + "github.com/minio/minio-go/v7" + "github.com/pkg/errors" +) + +var ErrBucketAlreadyExists = errors.New("Bucket Already Exists") + +type MakeBucketOptions minio.MakeBucketOptions + +func (x *C) CreateBucket(ctx context.Context, bucketName string, options MakeBucketOptions) (string, error) { + if err := x.client.MakeBucket(ctx, bucketName, minio.MakeBucketOptions(options)); err != nil { + errCode := minio.ToErrorResponse(err).Code + if errCode == "BucketAlreadyExists" || errCode == "BucketAlreadyOwnedByYou" { + return bucketName, ErrBucketAlreadyExists + } + return "", err + } + return bucketName, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go new file mode 100644 index 00000000..ea12eba5 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go @@ -0,0 +1,101 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package minio + +import ( + "context" + "net/url" + + "github.com/google/uuid" + "github.com/pkg/errors" + + min "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + + "k8s.io/klog/v2" +) + +type C struct { + accessKey string + secretKey string + host *url.URL + + client *min.Client +} + +func NewClient(ctx context.Context, minioHost, accessKey, secretKey string) (*C, error) { + if minioHost == "" { + return nil, errors.New("minio host cannot be empty") + } + host, err := url.Parse(minioHost) + if err != nil { + return nil, err + } + + secure := false + switch host.Scheme { + case "http": + case "https": + secure = true + default: + return nil, errors.New("invalid url scheme for minio endpoint") + } + + clChan := make(chan *min.Client) + errChan := make(chan error) + go func() { + klog.V(3).InfoS("Connecting to MinIO", "endpoint", host.Host) + + cl, err := min.New(host.Host, &min.Options{ + Creds: credentials.NewStaticV4(accessKey, secretKey, ""), + Secure: secure, + }) + if err != nil { + errChan <- err + } + _, err = cl.BucketExists(ctx, uuid.New().String()) + if err != nil { + if errResp, ok := err.(min.ErrorResponse); ok { + if errResp.Code == "NoSuchBucket" { + clChan <- cl + return + } + if errResp.StatusCode == 403 { + errChan <- errors.Wrap(errors.New("Access Denied"), "Connection to MinIO Failed") + return + } + } + errChan <- errors.Wrap(err, "Connection to MinIO Failed") + return + } + + clChan <- cl + klog.InfoS("Successfully connected to MinIO") + }() + + select { + case <-ctx.Done(): + return nil, ctx.Err() + case cl := <-clChan: + return &C{ + accessKey: accessKey, + secretKey: secretKey, + host: host, + + client: cl, + }, nil + case err := <-errChan: + return nil, err + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go similarity index 74% rename from container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go rename to container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go index d74a1932..56476f83 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/driver.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go @@ -11,12 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package sampledriver +package minio -func NewDriver(provisioner string) (*IdentityServer, *ProvisionerServer) { - return &IdentityServer{ - provisioner: provisioner, - }, &ProvisionerServer{ - provisioner: provisioner, - } -} +const ( + ObjectLocking = "objectlocking.min.io" +) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go new file mode 100644 index 00000000..5342f1a5 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go @@ -0,0 +1,121 @@ +// Copyright 2021 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + + "k8s.io/klog/v2" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type ProvisionerServer struct { + provisioner string + mc *minio.C +} + +// ProvisionerCreateBucket is an idempotent method for creating buckets +// It is expected to create the same bucket given a bucketName and protocol +// If the bucket already exists, then it MUST return codes.AlreadyExists +// Return values +// nil - Bucket successfully created +// codes.AlreadyExists - Bucket already exists. No more retries +// non-nil err - Internal error [requeue'd with exponential backoff] +func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, + req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { + + bucketName := req.GetName() + klog.V(3).InfoS("Create Bucket", "name", bucketName) + + protocol := req.GetProtocol() + if protocol == nil { + klog.ErrorS(errors.New("Invalid Argument"), "Protocol is nil") + return nil, status.Error(codes.InvalidArgument, "Protocol is nil") + } + s3 := protocol.GetS3() + if s3 == nil { + klog.ErrorS(errors.New("Invalid Argument"), "S3 protocol is nil") + return nil, status.Error(codes.InvalidArgument, "S3 Protocol is nil") + } + + options := minio.MakeBucketOptions{} + + // MinIO regions, unlike AWS s3 does not strictly require the + // country-direction-index format. Therefore, no validation + // is needed here + options.Region = s3.Region + + // Support for the following two fields will be added + // in the future using which bucket will be provisioned in a + // particular region conforming to a particular signature version + // However, as of now, these will be ignored + + // endpoint := s3.Endpoint + // signatureVersion := s3.SignatureVersion + + // Since 'parameters' is not a typed construct + // it is better to have predefined set of keys + // to parse, rather than treating it as an opaque + // set of keys and values. + parameters := req.GetParameters() + + for k, v := range parameters { + switch k { + case minio.ObjectLocking: + options.ObjectLocking = true + default: + klog.ErrorS(errors.New("Invalid Argument"), "parameter", k, "value", v) + return nil, status.Error(codes.InvalidArgument, "invalid parameter") + } + } + + bucketID, err := s.mc.CreateBucket(ctx, bucketName, options) + if err != nil { + if err == minio.ErrBucketAlreadyExists { + klog.InfoS("Bucket already exists", "name", bucketName) + return &cosi.ProvisionerCreateBucketResponse{ + BucketId: bucketID, + }, status.Error(codes.AlreadyExists, "Bucket already exists") + } + klog.ErrorS(err, "Bucket creation failed") + return nil, status.Error(codes.Internal, "Bucket creation failed") + } + + return &cosi.ProvisionerCreateBucketResponse{ + BucketId: bucketID, + }, nil +} + +func (s *ProvisionerServer) ProvisionerDeleteBucket(ctx context.Context, + req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { + + return &cosi.ProvisionerDeleteBucketResponse{}, nil +} + +func (s *ProvisionerServer) ProvisionerGrantBucketAccess(ctx context.Context, + req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + + return &cosi.ProvisionerGrantBucketAccessResponse{}, nil +} + +func (s *ProvisionerServer) ProvisionerRevokeBucketAccess(ctx context.Context, + req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { + + return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil +} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go index abce3c7e..a08e4b29 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go @@ -34,6 +34,7 @@ func main() { sig := <-sigs klog.InfoS("Signal received", "type", sig) cancel() + <-time.After(30 * time.Second) os.Exit(1) }() diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go index 75559477..63c05970 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go @@ -18,25 +18,25 @@ package main import ( "context" "flag" + "strings" "sigs.k8s.io/container-object-storage-interface-api/controller" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/bucket" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/provisioner" + cosi "sigs.k8s.io/container-object-storage-interface-spec" "github.com/spf13/cobra" + "github.com/spf13/pflag" "github.com/spf13/viper" "k8s.io/klog/v2" ) -const DefaultProvisionerName = "provisioner.objectstorage.k8s.io" - var ( - driverAddress = "unix:///var/lib/cosi/cosi.sock" - provisionerName = "" - kubeconfig = "" - debug = false + driverAddress = "unix:///var/lib/cosi/cosi.sock" + kubeconfig = "" + debug = false ) var cmd = &cobra.Command{ @@ -52,6 +52,7 @@ var cmd = &cobra.Command{ func init() { viper.AutomaticEnv() + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) flag.Set("alsologtostderr", "true") kflags := flag.NewFlagSet("klog", flag.ExitOnError) @@ -65,36 +66,42 @@ func init() { stringFlag(&kubeconfig, "kubeconfig", "", kubeconfig, "path to kubeconfig file") stringFlag(&driverAddress, "driver-addr", "d", driverAddress, "path to unix domain socket where driver is listening") - stringFlag(&provisionerName, "provisioner", "p", DefaultProvisionerName, "The name of the provisioner") boolFlag(&debug, "debug", "g", debug, "Logs all grpc requests and responses") viper.BindPFlags(cmd.PersistentFlags()) + cmd.PersistentFlags().VisitAll(func(f *pflag.Flag) { + if viper.IsSet(f.Name) && viper.GetString(f.Name) != "" { + cmd.PersistentFlags().Set(f.Name, viper.GetString(f.Name)) + } + }) } func run(ctx context.Context, args []string) error { - if provisionerName == "" { - provisionerName = DefaultProvisionerName + klog.V(3).InfoS("Attempting connection to driver", "address", driverAddress) + cosiClient, err := provisioner.NewDefaultCOSIProvisionerClient(ctx, driverAddress, debug) + if err != nil { + return err } - ctrl, err := controller.NewDefaultObjectStorageController("cosi", provisionerName, 40) + info, err := cosiClient.ProvisionerGetInfo(ctx, &cosi.ProvisionerGetInfoRequest{}) if err != nil { return err } + klog.V(3).InfoS("Successfully connected to driver", "name", info.Name) - klog.V(3).InfoS("Attempting connection to driver", "address", driverAddress) - cosiClient, err := provisioner.NewDefaultCOSIProvisionerClient(ctx, driverAddress, debug) + ctrl, err := controller.NewDefaultObjectStorageController("cosi", info.Name, 40) if err != nil { return err } - klog.V(3).InfoS("Successfully connected to driver") - ctrl.AddBucketListener(bucket.NewBucketListener(provisionerName, cosiClient)) - - bal, err := bucketaccess.NewBucketAccessListener(provisionerName, cosiClient) + bl := bucket.NewBucketListener(info.Name, cosiClient) + bal, err := bucketaccess.NewBucketAccessListener(info.Name, cosiClient) if err != nil { return err } + + ctrl.AddBucketListener(bl) ctrl.AddBucketAccessListener(bal) return ctrl.Run(ctx) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 64d00fef..aea2c89a 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -4,12 +4,15 @@ go 1.15 require ( github.com/google/go-cmp v0.5.2 // indirect + github.com/google/uuid v1.2.0 github.com/kr/text v0.2.0 // indirect github.com/mailru/easyjson v0.7.6 // indirect + github.com/minio/minio-go/v7 v7.0.10 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 github.com/smartystreets/assertions v1.1.1 // indirect github.com/spf13/cobra v1.1.3 + github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 github.com/stretchr/testify v1.6.1 // indirect golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect @@ -18,7 +21,6 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/grpc v1.35.0 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect - gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index e6dd379a..7530133e 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -214,8 +214,9 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 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.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -281,6 +282,9 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= +github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -307,8 +311,15 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx 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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= +github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= +github.com/minio/minio-go/v7 v7.0.10 h1:1oUKe4EOPUEhw2qnPQaPsJ0lmVTYLFu03SiItauXs94= +github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -373,6 +384,8 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 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= @@ -453,6 +466,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -548,6 +562,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= diff --git a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml index cbf96c30..1c68838d 100644 --- a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml +++ b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml @@ -14,9 +14,36 @@ commonLabels: app.kubernetes.io/version: main app.kubernetes.io/name: container-object-storage-interface-provisioner +configMapGenerator: +- name: objectstorage-provisioner-config + env: resources/objectstorage-provisioner.properties +generatorOptions: + disableNameSuffixHash: true + labels: + generated-by: "kustomize" + resources: - resources/ns.yaml - resources/sa.yaml - resources/rbac.yaml - resources/secret.yaml - resources/deployment.yaml + +configurations: + - resources/kustomizeconfig.yaml + +vars: + - name: IMAGE_ORG + objref: + name: objectstorage-provisioner-config + kind: ConfigMap + apiVersion: v1 + fieldref: + fieldpath: data.OBJECTSTORAGE_PROVISIONER_IMAGE_ORG + - name: IMAGE_VERSION + objref: + name: objectstorage-provisioner-config + kind: ConfigMap + apiVersion: v1 + fieldref: + fieldpath: data.OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 5c9e2fbd..2a19b310 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -104,8 +104,15 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) return errors.Wrap(err, "Failed to create bucket") } } + if rsp == nil { + err := errors.New("ProvisionerCreateBucket returned a nil response") + klog.ErrorS(err, "Internal Error") + return err + } - bucket.Spec.BucketID = rsp.BucketId + if rsp.BucketId != "" { + bucket.Spec.BucketID = rsp.BucketId + } bucket.Status.Message = "Bucket Provisioned" bucket.Status.BucketAvailable = true diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go index dab572aa..a65949a6 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go @@ -63,5 +63,16 @@ func (s *COSIProvisionerServer) Run(ctx context.Context) error { cosi.RegisterIdentityServer(server, s.identityServer) cosi.RegisterProvisionerServer(server, s.provisionerServer) - return server.Serve(listener) + errChan := make(chan error) + go func() { + errChan <- server.Serve(listener) + }() + + select { + case <-ctx.Done(): + server.GracefulStop() + return ctx.Err() + case err := <-errChan: + return err + } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go deleted file mode 100644 index b44cd589..00000000 --- a/container-object-storage-interface-provisioner-sidecar/pkg/sampledriver/provisioner.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sampledriver - -import ( - "context" - - _ "k8s.io/klog/v2" - cosi "sigs.k8s.io/container-object-storage-interface-spec" -) - -type ProvisionerServer struct { - provisioner string -} - -func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, - req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { - - return &cosi.ProvisionerCreateBucketResponse{}, nil -} - -func (s *ProvisionerServer) ProvisionerDeleteBucket(ctx context.Context, - req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { - - return &cosi.ProvisionerDeleteBucketResponse{}, nil -} - -func (s *ProvisionerServer) ProvisionerGrantBucketAccess(ctx context.Context, - req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { - - return &cosi.ProvisionerGrantBucketAccessResponse{}, nil -} - -func (s *ProvisionerServer) ProvisionerRevokeBucketAccess(ctx context.Context, - req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { - - return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index 3f924213..81af1547 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -33,24 +32,28 @@ spec: app.kubernetes.io/version: main spec: serviceAccountName: objectstorage-provisioner-sa + volumes: + - name: socket + emptyDir: {} containers: - name: minio-cosi-driver - image: quay.io/containerobjectstorage/minio-cosi-driver:latest - args: - - "--driver-addr=$(DRIVER_ADDRESS)" - - "--endpoint=$(ENDPOINT)" - - "--access-key=$(ACCESS_KEY)" - - "--secret-key=$(SECRET_KEY)" + image: $(IMAGE_ORG)/minio-cosi-driver:$(IMAGE_VERSION) envFrom: - secretRef: name: objectstorage-provisioner + volumeMounts: + - mountPath: /var/lib/cosi + name: socket - name: objectstorage-provisioner-sidecar - image: quay.io/containerobjectstorage/objectstorage-sidecar:latest - args: - - "--driver-addr=$(DRIVER_ADDRESS)" + image: $(IMAGE_ORG)/objectstorage-sidecar:$(IMAGE_VERSION) envFrom: - - name: DRIVER_ADDRESS + - secretRef: + name: objectstorage-provisioner + env: + - name: POD_NAMESPACE valueFrom: - secretKeyRef: - name: objectstorage-provisioner - key: DRIVER_ADDRESS + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - mountPath: /var/lib/cosi + name: socket diff --git a/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml b/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml new file mode 100644 index 00000000..3d389397 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml @@ -0,0 +1,3 @@ +varReference: +- path: spec/template/spec/containers/image + kind: Deployment diff --git a/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties b/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties new file mode 100644 index 00000000..4488b8b6 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties @@ -0,0 +1,2 @@ +OBJECTSTORAGE_PROVISIONER_IMAGE_ORG=quay.io/containerobjectstorage +OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION=latest \ No newline at end of file diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml index d7f96fa3..c7f52d55 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml @@ -1,4 +1,3 @@ ---- apiVersion: v1 kind: Secret metadata: @@ -10,9 +9,7 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-provisioner type: Opaque stringData: - DRIVER_ADDRESS: unix:///var/lib/cosi/cosi.sock -data: - # set to space - ENDPOINT: IA== - ACCESS_KEY: IA== - SECRET_KEY: IA== + MINIO_HOST: "http://minio:9000" + MINIO_ACCESS_KEY: "minio" + MINIO_SECRET_KEY: "minio123" + V: "3" From fc066403ae840ec06f5849153df2024fefa7ec2e Mon Sep 17 00:00:00 2001 From: Srini Brahmaroutu Date: Fri, 9 Apr 2021 20:38:12 -0700 Subject: [PATCH 175/299] Code refactoring to make sure Buckets abd BucketAccess Add works correctly --- .../bucketaccessrequest.go | 43 +++---------------- .../pkg/bucketrequest/bucketrequest.go | 28 ++++-------- 2 files changed, 14 insertions(+), 57 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index 860cbec9..ac668fe0 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -7,7 +7,6 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" @@ -78,15 +77,9 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, coreClient := b.kubeClient.CoreV1() name := string(bucketAccessRequest.GetUID()) - _, err := baClient.Get(ctx, name, metav1.GetOptions{}) - if err != nil { - // anything other than 404 - if !errors.IsNotFound(err) { - klog.Errorf("error fetching bucketaccess: %v", err) - return err - } - } else { // if bucket found - return nil + + if bucketAccessRequest.Spec.BucketAccessName != "" { + return util.ErrBucketAccessAlreadyExists } bucketAccessClassName := bucketAccessRequest.Spec.BucketAccessClassName @@ -145,39 +138,15 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketaccess.Spec.Parameters = util.CopySS(bucketAccessClass.Parameters) bucketaccess, err = baClient.Create(context.Background(), bucketaccess, metav1.CreateOptions{}) - if err != nil { - if errors.IsAlreadyExists(err) { - return nil - } + if err != nil && !errors.IsAlreadyExists(err) { return err } - err = retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucketAccessRequest.Spec.BucketAccessName = bucketaccess.Name - _, err := barClient(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - return nil - }) + bucketAccessRequest.Spec.BucketAccessName = bucketaccess.Name + _, err = barClient(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) if err != nil { return err } klog.Infof("Finished creating BucketAccess %v", bucketaccess.Name) return nil } - -func (b *bucketAccessRequestListener) FindBucketAccess(ctx context.Context, bar *v1alpha1.BucketAccessRequest) *v1alpha1.BucketAccess { - bucketAccessList, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) - if err != nil || len(bucketAccessList.Items) <= 0 { - return nil - } - for _, bucketaccess := range bucketAccessList.Items { - if bucketaccess.Spec.BucketAccessRequest.Name == bar.Name && - bucketaccess.Spec.BucketAccessRequest.Namespace == bar.Namespace && - bucketaccess.Spec.BucketAccessRequest.UID == bar.UID { - return &bucketaccess - } - } - return nil -} diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index f6d63d8c..6c3c3641 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -6,7 +6,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" @@ -101,16 +100,12 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont } name = name + string(bucketRequest.GetUID()) - bucket, err := b.Buckets().Get(ctx, name, metav1.GetOptions{}) - if err == nil { + if bucketRequest.Spec.BucketInstanceName != "" { return util.ErrBucketAlreadyExists - } else if !errors.IsNotFound(err) { // anything other than bucket not found error is an internal error - klog.ErrorS(err, "name", name) - return err } // create bucket - bucket = &v1alpha1.Bucket{} + bucket := &v1alpha1.Bucket{} bucket.Name = name bucket.Spec.Provisioner = bucketClass.Provisioner @@ -127,24 +122,17 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) - if err != nil { - if errors.IsAlreadyExists(err) { - return util.ErrBucketAlreadyExists - } + if err != nil && !errors.IsAlreadyExists(err) { klog.ErrorS(err, "name", bucket.Name) return err } - updateBucketRequest := func() error { - bucketRequest.Spec.BucketInstanceName = bucket.Name - _, err := b.BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - return nil + bucketRequest.Spec.BucketInstanceName = bucket.Name + _, err = b.BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) + if err != nil { + return err } - - return retry.RetryOnConflict(retry.DefaultRetry, updateBucketRequest) + return nil } // getBucketClass returns BucketClassName. If no bucket class was in the request it returns empty From a5547f3c4646cff274a68be30fe1c47659ea826b Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Wed, 14 Apr 2021 15:34:56 -0400 Subject: [PATCH 176/299] update api version --- .../.gitignore | 2 ++ .../go.mod | 2 +- .../go.sum | 13 ++++++++---- .../bucketaccessrequest.go | 21 +++++++++++++------ .../bucketaccessrequest_test.go | 10 +++++---- .../pkg/bucketrequest/bucketrequest.go | 21 +++++++++++++------ .../pkg/bucketrequest/bucketrequest_test.go | 13 +++++++++--- .../pkg/util/util.go | 12 +++++------ .../resources/deployment.yaml | 3 ++- .../resources/rbac.yaml | 2 +- 10 files changed, 66 insertions(+), 33 deletions(-) diff --git a/container-object-storage-interface-controller/.gitignore b/container-object-storage-interface-controller/.gitignore index c5f97758..faa1c3ef 100644 --- a/container-object-storage-interface-controller/.gitignore +++ b/container-object-storage-interface-controller/.gitignore @@ -5,3 +5,5 @@ travis.yml release-tools bin +vendor/ +.idea/ \ No newline at end of file diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 65a358ad..48c3e486 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -28,6 +28,6 @@ require ( k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.4.0 k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 824260f5..563f80e6 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -200,6 +200,7 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -221,6 +222,7 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= 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= @@ -269,6 +271,7 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -687,6 +690,7 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= @@ -714,6 +718,7 @@ 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -778,10 +783,10 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd h1:29yp8kNmIAvmVrk49H+CWBa7Yf4fipVLcTyong15tbs= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210315005104-5e1814a6aedd/go.mod h1:yMgeGQDROJIdY1jymECN2ptefmQ4+e3EQB/S8gyIE0o= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18 h1:TIx7kV6/3ZSQ5BETBx1QG1Va28zv1LZAvqRjs28n8ss= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210224211525-dfa3af562c18/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 h1:M2ZMhWdq9Az8TFj8G6ZffFUpR4XG7Qy8h8ZGsZhi9Xg= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7/go.mod h1:5n4lNKN4uOMW2NTqJ9r8qRAiqh5dZRZB7CNOkFihLfM= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19 h1:LrLrBCBqO7O/VjJtTrDSj3/f7hLSQaCIouLZFnHGxFg= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index ac668fe0..f667fb0a 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -7,6 +7,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" @@ -78,7 +79,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, name := string(bucketAccessRequest.GetUID()) - if bucketAccessRequest.Spec.BucketAccessName != "" { + if bucketAccessRequest.Status.BucketAccessName != "" { return util.ErrBucketAccessAlreadyExists } @@ -101,7 +102,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return err } - if bucketRequest.Spec.BucketInstanceName == "" { + if bucketRequest.Status.BucketName == "" || !bucketRequest.Status.BucketAvailable { return util.ErrWaitForBucketProvisioning } @@ -117,7 +118,8 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketaccess := &v1alpha1.BucketAccess{} bucketaccess.Name = name - bucketaccess.Spec.BucketInstanceName = bucketRequest.Spec.BucketInstanceName + bucketaccess.Spec.BucketName = bucketRequest.Status.BucketName + bucketaccess.Spec.BucketAccessRequest = &v1.ObjectReference{ Name: bucketAccessRequest.Name, Namespace: bucketAccessRequest.Namespace, @@ -134,7 +136,7 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return err } // bucketaccess.Spec.Principal - set by the driver - bucketaccess.Spec.Provisioner = bucketAccessClass.Provisioner + bucketaccess.Spec.Parameters = util.CopySS(bucketAccessClass.Parameters) bucketaccess, err = baClient.Create(context.Background(), bucketaccess, metav1.CreateOptions{}) @@ -142,8 +144,15 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return err } - bucketAccessRequest.Spec.BucketAccessName = bucketaccess.Name - _, err = barClient(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}) + err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name + bucketAccessRequest.Status.AccessGranted = true + _, err := barClient(bucketAccessRequest.Namespace).UpdateStatus(ctx, bucketAccessRequest, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil + }) if err != nil { return err } diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go index 212041bd..9a7b05d9 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -55,7 +55,6 @@ var goldAccessClass = types.BucketAccessClass{ ObjectMeta: metav1.ObjectMeta{ Name: "classaccessgold", }, - Provisioner: "provisioner1", PolicyActionsConfigMap: &v1.ObjectReference{Name: "testconfigmap", Namespace: "default"}, Parameters: classGoldAccessParameters, } @@ -71,9 +70,12 @@ var bucketRequest1 = types.BucketRequest{ UID: "br-12345", }, Spec: types.BucketRequestSpec{ - BucketPrefix: "cosi", - BucketClassName: "classgold", - BucketInstanceName: "cosi1234567890", + BucketPrefix: "cosi", + BucketClassName: "classgold", + }, + Status: types.BucketRequestStatus{ + BucketName: "cosi1234567890", + BucketAvailable: true, }, } diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index 6c3c3641..a9ccb77a 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -6,6 +6,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/retry" "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" @@ -100,7 +101,7 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont } name = name + string(bucketRequest.GetUID()) - if bucketRequest.Spec.BucketInstanceName != "" { + if bucketRequest.Status.BucketName != "" { return util.ErrBucketAlreadyExists } @@ -108,10 +109,10 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket := &v1alpha1.Bucket{} bucket.Name = name + bucket.Spec.BucketID = name bucket.Spec.Provisioner = bucketClass.Provisioner - bucket.Spec.RetentionPolicy = bucketClass.RetentionPolicy - bucket.Spec.AnonymousAccessMode = bucketClass.AnonymousAccessMode bucket.Spec.BucketClassName = bucketClass.Name + bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy bucket.Spec.BucketRequest = &v1.ObjectReference{ Name: bucketRequest.Name, Namespace: bucketRequest.Namespace, @@ -127,11 +128,19 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont return err } - bucketRequest.Spec.BucketInstanceName = bucket.Name - _, err = b.BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}) + err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + bucketRequest.Status.BucketName = bucket.Name + bucketRequest.Status.BucketAvailable = true + _, err := b.BucketRequests(bucketRequest.Namespace).UpdateStatus(ctx, bucketRequest, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil + }) if err != nil { return err } + klog.Infof("Finished creating Bucket %v", bucket.Name) return nil } @@ -147,7 +156,7 @@ func (b *bucketRequestListener) getBucketClass(bucketRequest *v1alpha1.BucketReq // cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { - klog.InfoS("Cloning Bucket", "name", bucketRequest.Spec.BucketInstanceName) + klog.InfoS("Cloning Bucket", "name", bucketRequest.Status.BucketName) return util.ErrNotImplemented } diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index 342bb3a5..c07fea21 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -26,9 +26,16 @@ var goldClass = types.BucketClass{ ObjectMeta: metav1.ObjectMeta{ Name: "classgold", }, - AllowedNamespaces: []string{"default", "cosins"}, - Parameters: classGoldParameters, - Protocol: types.Protocol{Name: "s3"}, + AllowedNamespaces: []string{"default", "cosins"}, + Parameters: classGoldParameters, + Protocol: types.Protocol{ + S3: &types.S3Protocol{ + Endpoint: "endpoint", + BucketName: "cosibucket", + Region: "us-east-1", + SignatureVersion: "S3V4", + }, + }, IsDefaultBucketClass: false, } diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index a3a4e1f6..1d14d359 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -165,7 +165,7 @@ func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpect // This is used by bucket request unit tests func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, bucketclass types.BucketClass) bool { if strings.HasPrefix(bucket.Name, bucketrequest.Spec.BucketPrefix) && - bucketrequest.Spec.BucketInstanceName == bucket.Name && + bucketrequest.Status.BucketName == bucket.Name && bucket.Spec.BucketClassName == bucketrequest.Spec.BucketClassName && bucket.Spec.BucketRequest.Name == bucketrequest.Name && bucket.Spec.BucketRequest.Namespace == bucketrequest.Namespace && @@ -173,8 +173,7 @@ func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, buck bucket.Spec.BucketClassName == bucketclass.Name && reflect.DeepEqual(bucket.Spec.Parameters, bucketclass.Parameters) && bucket.Spec.Provisioner == bucketclass.Provisioner && - bucket.Spec.RetentionPolicy == bucketclass.RetentionPolicy && - bucket.Spec.AnonymousAccessMode == bucketclass.AnonymousAccessMode { + bucket.Spec.DeletionPolicy == bucketclass.DeletionPolicy { return true } return false @@ -202,12 +201,11 @@ func GetBucketAccesses(ctx context.Context, client bucketclientset.Interface, nu // Validates the content of the bucket access against bucket access request and backet access class // This is used by bucket access request unit tests func ValidateBucketAccess(bucketaccess types.BucketAccess, bucketaccessrequest types.BucketAccessRequest, bucketaccessclass types.BucketAccessClass) bool { - if bucketaccess.Spec.BucketInstanceName != "" && - bucketaccessrequest.Spec.BucketAccessName == bucketaccess.Name && + if bucketaccess.Spec.BucketName != "" && + bucketaccessrequest.Status.BucketAccessName == bucketaccess.Name && bucketaccess.Spec.BucketAccessRequest.UID == bucketaccessrequest.UID && bucketaccess.Spec.ServiceAccount.Name == bucketaccessrequest.Spec.ServiceAccountName && - bucketaccess.Spec.PolicyActionsConfigMapData != "" && - bucketaccess.Spec.Provisioner == bucketaccessclass.Provisioner { + bucketaccess.Spec.PolicyActionsConfigMapData != "" { return true } return false diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index c48e7487..452ec018 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,6 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: quay.io/containerobjectstorage/objectstorage-controller:latest + image: quay.io/containerobjectstorage/objectstorage-controller:canary + imagePullPolicy: Always args: - "--v=5" diff --git a/container-object-storage-interface-controller/resources/rbac.yaml b/container-object-storage-interface-controller/resources/rbac.yaml index 9b554c3c..1005c358 100644 --- a/container-object-storage-interface-controller/resources/rbac.yaml +++ b/container-object-storage-interface-controller/resources/rbac.yaml @@ -11,7 +11,7 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-controller rules: - apiGroups: ["objectstorage.k8s.io"] - resources: ["bucketrequests", "bucketaccessrequests"] + resources: ["bucketrequests", "bucketaccessrequests", "bucketrequests/status", "bucketaccessrequests/status"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["objectstorage.k8s.io"] resources: ["buckets", "bucketaccesses"] From 2f2a0fc8485233a6b495ea999e6f85fc315d4f3c Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 15 Apr 2021 11:46:36 -0400 Subject: [PATCH 177/299] updates rbac and properties for deployment --- .../resources/objectstorage-provisioner.properties | 2 +- .../resources/rbac.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties b/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties index 4488b8b6..5e9a71bc 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties +++ b/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties @@ -1,2 +1,2 @@ OBJECTSTORAGE_PROVISIONER_IMAGE_ORG=quay.io/containerobjectstorage -OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION=latest \ No newline at end of file +OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION=canary \ No newline at end of file diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml index ffd0cff6..bc96f38b 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml @@ -21,6 +21,9 @@ rules: - apiGroups: ["objectstorage.k8s.io"] resources: ["bucketaccesses"] verbs: ["get", "watch", "list", "delete", "update", "create"] +- apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "delete", "update", "create"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 From 97b3b3251e371a1e49d533b62ed1bef3fbbbd4b4 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 15 Apr 2021 15:41:06 -0400 Subject: [PATCH 178/299] move minio into kustomize --- .../kustomization.yaml | 1 + .../{ => resources}/minio.yaml | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) rename container-object-storage-interface-provisioner-sidecar/{ => resources}/minio.yaml (99%) diff --git a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml index 1c68838d..602e779a 100644 --- a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml +++ b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml @@ -28,6 +28,7 @@ resources: - resources/rbac.yaml - resources/secret.yaml - resources/deployment.yaml +- resources/minio.yaml configurations: - resources/kustomizeconfig.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/minio.yaml b/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml similarity index 99% rename from container-object-storage-interface-provisioner-sidecar/minio.yaml rename to container-object-storage-interface-provisioner-sidecar/resources/minio.yaml index cc359dd6..af524279 100644 --- a/container-object-storage-interface-provisioner-sidecar/minio.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml @@ -10,9 +10,7 @@ spec: protocol: TCP selector: app: minio - --- - apiVersion: apps/v1 kind: Deployment metadata: From d0aa4c89c71421a83c7a9af1db474abed8ed1e1e Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 19 Apr 2021 10:45:03 -0400 Subject: [PATCH 179/299] move to sigs.k8s.io, remove retry logic in cosi-controller --- .../controller-manager/controller-manager.go | 4 ++-- .../go.mod | 4 ++-- .../go.sum | 4 ++-- .../bucketaccessrequest.go | 17 +++++--------- .../bucketaccessrequest_test.go | 6 ++--- .../pkg/bucketrequest/bucketrequest.go | 22 +++++++------------ .../pkg/bucketrequest/bucketrequest_test.go | 6 ++--- 7 files changed, 25 insertions(+), 38 deletions(-) diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index 7d9dc866..026d7022 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -10,9 +10,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketaccessrequest" - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/bucketrequest" bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" + "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketaccessrequest" + "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketrequest" "k8s.io/klog/v2" ) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 48c3e486..c9616b89 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -1,4 +1,4 @@ -module github.com/kubernetes-sigs/container-object-storage-interface-controller +module sigs.k8s.io/container-object-storage-interface-controller go 1.15 @@ -28,6 +28,6 @@ require ( k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.4.0 k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 563f80e6..b8cccccf 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -783,8 +783,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 h1:M2ZMhWdq9Az8TFj8G6ZffFUpR4XG7Qy8h8ZGsZhi9Xg= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7/go.mod h1:5n4lNKN4uOMW2NTqJ9r8qRAiqh5dZRZB7CNOkFihLfM= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f h1:LtkVxN0N+qKHLuYE/N5qxSkJv/3bWkr3+9ZBVwiq1tw= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19 h1:LrLrBCBqO7O/VjJtTrDSj3/f7hLSQaCIouLZFnHGxFg= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index f667fb0a..68836a64 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -7,14 +7,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/retry" + "k8s.io/klog/v2" - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" - "k8s.io/klog/v2" + "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) type bucketAccessRequestListener struct { @@ -144,15 +143,9 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return err } - err = retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name - bucketAccessRequest.Status.AccessGranted = true - _, err := barClient(bucketAccessRequest.Namespace).UpdateStatus(ctx, bucketAccessRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - return nil - }) + bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name + bucketAccessRequest.Status.AccessGranted = true + _, err = barClient(bucketAccessRequest.Namespace).UpdateStatus(ctx, bucketAccessRequest, metav1.UpdateOptions{}) if err != nil { return err } diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go index 9a7b05d9..fb729da0 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go @@ -6,12 +6,12 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + + "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) var sa1 = v1.ServiceAccount{ diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index a9ccb77a..e7fdaaf3 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -6,15 +6,14 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/util/retry" - - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" - "k8s.io/klog/v2" + "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) // bucketRequestListener is a resource handler for bucket requests objects @@ -109,7 +108,7 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont bucket := &v1alpha1.Bucket{} bucket.Name = name - bucket.Spec.BucketID = name + bucket.Status.BucketID = name bucket.Spec.Provisioner = bucketClass.Provisioner bucket.Spec.BucketClassName = bucketClass.Name bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy @@ -128,18 +127,13 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont return err } - err = retry.RetryOnConflict(retry.DefaultRetry, func() error { - bucketRequest.Status.BucketName = bucket.Name - bucketRequest.Status.BucketAvailable = true - _, err := b.BucketRequests(bucketRequest.Namespace).UpdateStatus(ctx, bucketRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - return nil - }) + bucketRequest.Status.BucketName = bucket.Name + bucketRequest.Status.BucketAvailable = true + _, err = b.BucketRequests(bucketRequest.Namespace).UpdateStatus(ctx, bucketRequest, metav1.UpdateOptions{}) if err != nil { return err } + klog.Infof("Finished creating Bucket %v", bucket.Name) return nil } diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index c07fea21..eb13aeb8 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -5,12 +5,12 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - "github.com/kubernetes-sigs/container-object-storage-interface-controller/pkg/util" types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + + "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) var classGoldParameters = map[string]string{ From 2a4dfd57fd718f0b8cadd4ae0c2de2ece3265c62 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Sat, 17 Apr 2021 00:41:07 -0400 Subject: [PATCH 180/299] RBAC cleaning, minor bug fixes, adds minimal logic for grant access --- .../minio-cosi-driver/internal/provisioner.go | 22 +++++++------ .../go.mod | 2 +- .../go.sum | 5 +-- .../pkg/bucket/bucket_controller.go | 16 ++++++---- .../pkg/bucket/bucket_controller_test.go | 2 +- .../bucketaccess/bucketaccess_controller.go | 31 ++++++++++++++----- .../bucketaccess_controller_test.go | 23 ++++++++------ .../resources/deployment.yaml | 2 ++ .../resources/minio.yaml | 10 ++++-- .../resources/rbac.yaml | 10 ++---- 10 files changed, 76 insertions(+), 47 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go index 5342f1a5..26f6b6a8 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go @@ -16,13 +16,14 @@ package internal import ( "context" - "k8s.io/klog/v2" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" - cosi "sigs.k8s.io/container-object-storage-interface-spec" - "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "k8s.io/klog/v2" + + cosi "sigs.k8s.io/container-object-storage-interface-spec" + + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" ) type ProvisionerServer struct { @@ -40,9 +41,6 @@ type ProvisionerServer struct { func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { - bucketName := req.GetName() - klog.V(3).InfoS("Create Bucket", "name", bucketName) - protocol := req.GetProtocol() if protocol == nil { klog.ErrorS(errors.New("Invalid Argument"), "Protocol is nil") @@ -54,6 +52,9 @@ func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, return nil, status.Error(codes.InvalidArgument, "S3 Protocol is nil") } + bucketName := s3.BucketName + klog.V(3).InfoS("Create Bucket", "name", bucketName) + options := minio.MakeBucketOptions{} // MinIO regions, unlike AWS s3 does not strictly require the @@ -91,7 +92,7 @@ func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, klog.InfoS("Bucket already exists", "name", bucketName) return &cosi.ProvisionerCreateBucketResponse{ BucketId: bucketID, - }, status.Error(codes.AlreadyExists, "Bucket already exists") + }, nil } klog.ErrorS(err, "Bucket creation failed") return nil, status.Error(codes.Internal, "Bucket creation failed") @@ -111,7 +112,10 @@ func (s *ProvisionerServer) ProvisionerDeleteBucket(ctx context.Context, func (s *ProvisionerServer) ProvisionerGrantBucketAccess(ctx context.Context, req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { - return &cosi.ProvisionerGrantBucketAccessResponse{}, nil + return &cosi.ProvisionerGrantBucketAccessResponse{ + AccountId: "minio", + CredentialsFileContents: "{\"username\":\"minio\", \"password\": \"minio123\"}", + }, nil } func (s *ProvisionerServer) ProvisionerRevokeBucketAccess(ctx context.Context, diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index aea2c89a..0c6b352b 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -26,6 +26,6 @@ require ( k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 7530133e..d538aa41 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -717,6 +717,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= @@ -726,8 +727,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7 h1:M2ZMhWdq9Az8TFj8G6ZffFUpR4XG7Qy8h8ZGsZhi9Xg= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210330175159-2cdabb1a5dc7/go.mod h1:5n4lNKN4uOMW2NTqJ9r8qRAiqh5dZRZB7CNOkFihLfM= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab h1:mKZ+ua1nJHPYNb5NkyxFsObb0bElpCiwt8k6xeNsH1Y= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 h1:U+M87V77xKotSub2dqNlmxHMbb30QeC7wwTWdPGAhSI= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 2a19b310..78df0444 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -103,6 +103,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "bucket", bucket.Name) return errors.Wrap(err, "Failed to create bucket") } + } if rsp == nil { err := errors.New("ProvisionerCreateBucket returned a nil response") @@ -111,16 +112,17 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if rsp.BucketId != "" { - bucket.Spec.BucketID = rsp.BucketId + bucket.Status.BucketID = rsp.BucketId } + bucket.Status.Message = "Bucket Provisioned" bucket.Status.BucketAvailable = true // if this step fails, then controller will retry with backoff - if _, err := b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucket", + if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucket status", "bucket", bucket.Name) - return errors.Wrap(err, "Failed to update bucket") + return errors.Wrap(err, "Failed to update bucket status") } return nil @@ -158,7 +160,7 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke } req := &cosi.ProvisionerDeleteBucketRequest{ - BucketId: bucket.Spec.BucketID, + BucketId: bucket.Status.BucketID, } if _, err := b.provisionerClient.ProvisionerDeleteBucket(ctx, req); err != nil { @@ -170,10 +172,12 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke } } + // TODO, check bucket.Spec.DeletionPolicy + bucket.Status.BucketAvailable = false // if this step fails, then controller will retry with backoff - if _, err := b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { + if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update bucket", "bucket", bucket.Name) return errors.Wrap(err, "Failed to update bucket") diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 5fbff0cf..42346447 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -139,7 +139,7 @@ func TestBucketDeletion(t *testing.T) { { name: "BucketDeletion", setFields: func(b *v1alpha1.Bucket) { - b.Spec.BucketID = bucketId + b.Status.BucketID = bucketId }, deleteFunc: func(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest, diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 0d392de5..ca7651d3 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -82,7 +82,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "bucket", bucketName, ) - if bucketAccess.Spec.MintedSecretName != "" { + if bucketAccess.Status.MintedSecret != nil { klog.V(5).InfoS("AccessAlreadyGranted", "bucketAccess", bucketAccess.Name, "bucket", bucketName, @@ -112,7 +112,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return nil } - if bucket.Spec.BucketID == "" { + if bucket.Status.BucketID == "" { err := errors.New("BucketID cannot be empty") klog.ErrorS(err, "Invalid arguments", @@ -123,7 +123,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } req := &cosi.ProvisionerGrantBucketAccessRequest{ - BucketId: bucket.Spec.BucketID, + BucketId: bucket.Status.BucketID, AccountName: bucketAccess.Name, AccessPolicy: bucketAccess.Spec.PolicyActionsConfigMapData, } @@ -177,16 +177,19 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } } - bucketAccess.Spec.AccountID = rsp.AccountId + bucketAccess.Status.AccountID = rsp.AccountId + bucketAccess.Status.MintedSecret = &corev1.SecretReference{ + Namespace: bal.namespace, + Name: mintedSecretName, + } bucketAccess.Status.AccessGranted = true - bucketAccess.Spec.MintedSecretName = mintedSecretName // if this step fails, then controller will retry with backoff - if _, err := bal.BucketAccesses().Update(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update BucketAccess", + if _, err := bal.BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.Name, "bucket", bucket.Name) - return errors.Wrap(err, "Failed to update BucketAccess") + return errors.Wrap(err, "Failed to update BucketAccess Status") } return nil @@ -212,6 +215,18 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp "name", bucketAccess.Name, "bucket", bucketAccess.Spec.BucketName, ) + + // TODO, check bucketAccess.Spec.DeletionPolicy + + bucketAccess.Status.AccessGranted = false + + // if this step fails, then controller will retry with backoff + if _, err := bal.BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update BucketAccess Status", + "bucketAccess", bucketAccess.Name) + return errors.Wrap(err, "Failed to update BucketAccess Status") + } + return nil } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index e1571c91..499e5fee 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -21,11 +21,7 @@ import ( "strings" "testing" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - cosi "sigs.k8s.io/container-object-storage-interface-spec" - fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" - + "google.golang.org/grpc" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilversion "k8s.io/apimachinery/pkg/util/version" @@ -33,7 +29,10 @@ import ( fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" - "google.golang.org/grpc" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) func TestInitializeKubeClient(t *testing.T) { @@ -97,7 +96,9 @@ func TestAddWrongProvisioner(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner + "-invalid", Protocol: v1alpha1.Protocol{}, - BucketID: bucketId, + }, + Status: v1alpha1.BucketStatus{ + BucketID: bucketId, }, } @@ -172,7 +173,9 @@ func TestAddBucketAccess(t *testing.T) { Spec: v1alpha1.BucketSpec{ Provisioner: provisioner, Protocol: v1alpha1.Protocol{}, - BucketID: bucketId, + }, + Status: v1alpha1.BucketStatus{ + BucketID: bucketId, }, } @@ -211,8 +214,8 @@ func TestAddBucketAccess(t *testing.T) { if updatedBA.Status.AccessGranted != true { t.Errorf("Expected %t, got %t", true, ba.Status.AccessGranted) } - if !strings.EqualFold(updatedBA.Spec.AccountID, accountId) { - t.Errorf("Expected %s, got %s", accountId, updatedBA.Spec.AccountID) + if !strings.EqualFold(updatedBA.Status.AccountID, accountId) { + t.Errorf("Expected %s, got %s", accountId, updatedBA.Status.AccountID) } secretName := "ba-" + string(ba.UID) diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml index 81af1547..de8ac332 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml @@ -38,6 +38,7 @@ spec: containers: - name: minio-cosi-driver image: $(IMAGE_ORG)/minio-cosi-driver:$(IMAGE_VERSION) + imagePullPolicy: Always envFrom: - secretRef: name: objectstorage-provisioner @@ -46,6 +47,7 @@ spec: name: socket - name: objectstorage-provisioner-sidecar image: $(IMAGE_ORG)/objectstorage-sidecar:$(IMAGE_VERSION) + imagePullPolicy: Always envFrom: - secretRef: name: objectstorage-provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml b/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml index af524279..4b7f38d7 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml @@ -34,6 +34,12 @@ spec: - /data env: - name: MINIO_ACCESS_KEY - value: minio + valueFrom: + secretKeyRef: + name: objectstorage-provisioner + key: MINIO_ACCESS_KEY - name: MINIO_SECRET_KEY - value: minio123 + valueFrom: + secretKeyRef: + name: objectstorage-provisioner + key: MINIO_SECRET_KEY diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml index bc96f38b..b7e4c6a9 100644 --- a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml +++ b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml @@ -10,19 +10,13 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-provisioner rules: - apiGroups: ["objectstorage.k8s.io"] - resources: ["buckets", "bucketaccess"] + resources: ["buckets", "bucketaccesses","buckets/status", "bucketaccesses/status"] verbs: ["get", "list", "watch", "update", "create", "delete"] -- apiGroups: [""] - resources: ["events"] - verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] -- apiGroups: ["objectstorage.k8s.io"] - resources: ["bucketaccesses"] - verbs: ["get", "watch", "list", "delete", "update", "create"] - apiGroups: [""] - resources: ["secrets"] + resources: ["secrets", "events"] verbs: ["get", "delete", "update", "create"] --- kind: ClusterRoleBinding From a7de7bb9b120f67fce5ab779cca1acb47defa652 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Mon, 19 Apr 2021 21:49:48 -0400 Subject: [PATCH 181/299] removes minio sample driver, see: sigs.k8s.io/cosi-driver-minio --- .../Makefile | 2 +- .../README.md | 5 +- .../cmd/minio-cosi-driver/Dockerfile | 6 - .../cmd/minio-cosi-driver/cmd.go | 114 ---------------- .../cmd/minio-cosi-driver/internal/driver.go | 34 ----- .../minio-cosi-driver/internal/identity.go | 42 ------ .../internal/minio/bucket.go | 36 ----- .../internal/minio/client.go | 101 -------------- .../minio-cosi-driver/internal/minio/const.go | 18 --- .../minio-cosi-driver/internal/provisioner.go | 125 ------------------ .../cmd/minio-cosi-driver/main.go | 45 ------- .../go.mod | 4 +- .../go.sum | 13 -- .../kustomization.yaml | 50 ------- .../resources/deployment.yaml | 61 --------- .../resources/kustomizeconfig.yaml | 3 - .../resources/minio.yaml | 45 ------- .../resources/ns.yaml | 10 -- .../objectstorage-provisioner.properties | 2 - .../resources/rbac.yaml | 38 ------ .../resources/sa.yaml | 11 -- .../resources/secret.yaml | 15 --- 22 files changed, 7 insertions(+), 773 deletions(-) delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go delete mode 100644 container-object-storage-interface-provisioner-sidecar/kustomization.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/minio.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/ns.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/sa.yaml delete mode 100644 container-object-storage-interface-provisioner-sidecar/resources/secret.yaml diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index d98e7a81..ccb9c0c8 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -CMDS=objectstorage-sidecar minio-cosi-driver +CMDS=objectstorage-sidecar all: reltools build .PHONY: reltools diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index 929346fb..e9992ebb 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -35,12 +35,15 @@ objectstorage-sidecar:latest sample-driver:latest ``` - In order to run the tests execute: ```bash make test ``` +### Running the Sidecar + +To see an example of running the sidecar, take a look at the [COSI Driver Minio](https://github.com/kubernetes-sigs/cosi-driver-minio) sub-project. + ## References - [Documentation](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/index.md) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile deleted file mode 100644 index 6502d40d..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM gcr.io/distroless/static:latest -LABEL maintainers="Kubernetes COSI Authors" -LABEL description="MinIO COSI driver" - -COPY ./bin/minio-cosi-driver minio-cosi-driver -ENTRYPOINT ["/minio-cosi-driver"] diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go deleted file mode 100644 index f3826b84..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/cmd.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "flag" - "strings" - - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "github.com/spf13/viper" - - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/provisioner" - - "k8s.io/klog/v2" -) - -const provisionerName = "minio.objectstorage.k8s.io" - -var ( - driverAddress = "unix:///var/lib/cosi/cosi.sock" - - minioAccessKey = "" - minioSecretKey = "" - minioHost = "" -) - -var cmd = &cobra.Command{ - Use: "minio-cosi-driver", - Short: "K8s COSI driver for MinIO object storage", - SilenceErrors: true, - SilenceUsage: true, - RunE: func(cmd *cobra.Command, args []string) error { - return run(cmd.Context(), args) - }, - DisableFlagsInUseLine: true, -} - -func init() { - viper.AutomaticEnv() - viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) - - flag.Set("alsologtostderr", "true") - kflags := flag.NewFlagSet("klog", flag.ExitOnError) - klog.InitFlags(kflags) - - persistentFlags := cmd.PersistentFlags() - persistentFlags.AddGoFlagSet(kflags) - - stringFlag := persistentFlags.StringVarP - - stringFlag(&driverAddress, - "driver-addr", - "d", - driverAddress, - "path to unix domain socket where driver should listen") - - stringFlag(&minioHost, - "minio-host", - "m", - minioHost, - "endpoint where minio server is listening") - - stringFlag(&minioAccessKey, - "minio-access-key", - "a", - minioAccessKey, - "access key for minio") - - stringFlag(&minioSecretKey, - "minio-secret-key", - "s", - minioSecretKey, - "secret key for minio") - - viper.BindPFlags(cmd.PersistentFlags()) - cmd.PersistentFlags().VisitAll(func(f *pflag.Flag) { - if viper.IsSet(f.Name) && viper.GetString(f.Name) != "" { - cmd.PersistentFlags().Set(f.Name, viper.GetString(f.Name)) - } - }) -} - -func run(ctx context.Context, args []string) error { - identityServer, bucketProvisioner, err := internal.NewDriver(ctx, - provisionerName, - minioHost, - minioAccessKey, - minioSecretKey) - if err != nil { - return err - } - - server, err := provisioner.NewDefaultCOSIProvisionerServer(driverAddress, - identityServer, - bucketProvisioner) - if err != nil { - return err - } - return server.Run(ctx) -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go deleted file mode 100644 index 9dfe02ef..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/driver.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "context" - - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" -) - -func NewDriver(ctx context.Context, provisioner, minioHost, accessKey, secretKey string) (*IdentityServer, *ProvisionerServer, error) { - mc, err := minio.NewClient(ctx, minioHost, accessKey, secretKey) - if err != nil { - return nil, nil, err - } - - return &IdentityServer{ - provisioner: provisioner, - }, &ProvisionerServer{ - provisioner: provisioner, - mc: mc, - }, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go deleted file mode 100644 index 012d3c48..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/identity.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "context" - - "k8s.io/klog/v2" - cosi "sigs.k8s.io/container-object-storage-interface-spec" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type IdentityServer struct { - provisioner string -} - -func (id *IdentityServer) ProvisionerGetInfo(ctx context.Context, - req *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error) { - - if id.provisioner == "" { - klog.ErrorS(errors.New("provisioner name cannot be empty"), "Invalid argument") - return nil, status.Error(codes.InvalidArgument, "ProvisionerName is empty") - } - - return &cosi.ProvisionerGetInfoResponse{ - Name: id.provisioner, - }, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go deleted file mode 100644 index 37c647db..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/bucket.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package minio - -import ( - "context" - - "github.com/minio/minio-go/v7" - "github.com/pkg/errors" -) - -var ErrBucketAlreadyExists = errors.New("Bucket Already Exists") - -type MakeBucketOptions minio.MakeBucketOptions - -func (x *C) CreateBucket(ctx context.Context, bucketName string, options MakeBucketOptions) (string, error) { - if err := x.client.MakeBucket(ctx, bucketName, minio.MakeBucketOptions(options)); err != nil { - errCode := minio.ToErrorResponse(err).Code - if errCode == "BucketAlreadyExists" || errCode == "BucketAlreadyOwnedByYou" { - return bucketName, ErrBucketAlreadyExists - } - return "", err - } - return bucketName, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go deleted file mode 100644 index ea12eba5..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/client.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package minio - -import ( - "context" - "net/url" - - "github.com/google/uuid" - "github.com/pkg/errors" - - min "github.com/minio/minio-go/v7" - "github.com/minio/minio-go/v7/pkg/credentials" - - "k8s.io/klog/v2" -) - -type C struct { - accessKey string - secretKey string - host *url.URL - - client *min.Client -} - -func NewClient(ctx context.Context, minioHost, accessKey, secretKey string) (*C, error) { - if minioHost == "" { - return nil, errors.New("minio host cannot be empty") - } - host, err := url.Parse(minioHost) - if err != nil { - return nil, err - } - - secure := false - switch host.Scheme { - case "http": - case "https": - secure = true - default: - return nil, errors.New("invalid url scheme for minio endpoint") - } - - clChan := make(chan *min.Client) - errChan := make(chan error) - go func() { - klog.V(3).InfoS("Connecting to MinIO", "endpoint", host.Host) - - cl, err := min.New(host.Host, &min.Options{ - Creds: credentials.NewStaticV4(accessKey, secretKey, ""), - Secure: secure, - }) - if err != nil { - errChan <- err - } - _, err = cl.BucketExists(ctx, uuid.New().String()) - if err != nil { - if errResp, ok := err.(min.ErrorResponse); ok { - if errResp.Code == "NoSuchBucket" { - clChan <- cl - return - } - if errResp.StatusCode == 403 { - errChan <- errors.Wrap(errors.New("Access Denied"), "Connection to MinIO Failed") - return - } - } - errChan <- errors.Wrap(err, "Connection to MinIO Failed") - return - } - - clChan <- cl - klog.InfoS("Successfully connected to MinIO") - }() - - select { - case <-ctx.Done(): - return nil, ctx.Err() - case cl := <-clChan: - return &C{ - accessKey: accessKey, - secretKey: secretKey, - host: host, - - client: cl, - }, nil - case err := <-errChan: - return nil, err - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go deleted file mode 100644 index 56476f83..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio/const.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package minio - -const ( - ObjectLocking = "objectlocking.min.io" -) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go deleted file mode 100644 index 26f6b6a8..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/provisioner.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -import ( - "context" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "k8s.io/klog/v2" - - cosi "sigs.k8s.io/container-object-storage-interface-spec" - - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/internal/minio" -) - -type ProvisionerServer struct { - provisioner string - mc *minio.C -} - -// ProvisionerCreateBucket is an idempotent method for creating buckets -// It is expected to create the same bucket given a bucketName and protocol -// If the bucket already exists, then it MUST return codes.AlreadyExists -// Return values -// nil - Bucket successfully created -// codes.AlreadyExists - Bucket already exists. No more retries -// non-nil err - Internal error [requeue'd with exponential backoff] -func (s *ProvisionerServer) ProvisionerCreateBucket(ctx context.Context, - req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error) { - - protocol := req.GetProtocol() - if protocol == nil { - klog.ErrorS(errors.New("Invalid Argument"), "Protocol is nil") - return nil, status.Error(codes.InvalidArgument, "Protocol is nil") - } - s3 := protocol.GetS3() - if s3 == nil { - klog.ErrorS(errors.New("Invalid Argument"), "S3 protocol is nil") - return nil, status.Error(codes.InvalidArgument, "S3 Protocol is nil") - } - - bucketName := s3.BucketName - klog.V(3).InfoS("Create Bucket", "name", bucketName) - - options := minio.MakeBucketOptions{} - - // MinIO regions, unlike AWS s3 does not strictly require the - // country-direction-index format. Therefore, no validation - // is needed here - options.Region = s3.Region - - // Support for the following two fields will be added - // in the future using which bucket will be provisioned in a - // particular region conforming to a particular signature version - // However, as of now, these will be ignored - - // endpoint := s3.Endpoint - // signatureVersion := s3.SignatureVersion - - // Since 'parameters' is not a typed construct - // it is better to have predefined set of keys - // to parse, rather than treating it as an opaque - // set of keys and values. - parameters := req.GetParameters() - - for k, v := range parameters { - switch k { - case minio.ObjectLocking: - options.ObjectLocking = true - default: - klog.ErrorS(errors.New("Invalid Argument"), "parameter", k, "value", v) - return nil, status.Error(codes.InvalidArgument, "invalid parameter") - } - } - - bucketID, err := s.mc.CreateBucket(ctx, bucketName, options) - if err != nil { - if err == minio.ErrBucketAlreadyExists { - klog.InfoS("Bucket already exists", "name", bucketName) - return &cosi.ProvisionerCreateBucketResponse{ - BucketId: bucketID, - }, nil - } - klog.ErrorS(err, "Bucket creation failed") - return nil, status.Error(codes.Internal, "Bucket creation failed") - } - - return &cosi.ProvisionerCreateBucketResponse{ - BucketId: bucketID, - }, nil -} - -func (s *ProvisionerServer) ProvisionerDeleteBucket(ctx context.Context, - req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error) { - - return &cosi.ProvisionerDeleteBucketResponse{}, nil -} - -func (s *ProvisionerServer) ProvisionerGrantBucketAccess(ctx context.Context, - req *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error) { - - return &cosi.ProvisionerGrantBucketAccessResponse{ - AccountId: "minio", - CredentialsFileContents: "{\"username\":\"minio\", \"password\": \"minio123\"}", - }, nil -} - -func (s *ProvisionerServer) ProvisionerRevokeBucketAccess(ctx context.Context, - req *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { - - return &cosi.ProvisionerRevokeBucketAccessResponse{}, nil -} diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go b/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go deleted file mode 100644 index a08e4b29..00000000 --- a/container-object-storage-interface-provisioner-sidecar/cmd/minio-cosi-driver/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 The Kubernetes Authors. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - "time" - - "k8s.io/klog/v2" -) - -func main() { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) - - go func() { - sig := <-sigs - klog.InfoS("Signal received", "type", sig) - cancel() - - <-time.After(30 * time.Second) - os.Exit(1) - }() - - if err := cmd.ExecuteContext(ctx); err != nil { - klog.ErrorS(err, "Exiting on error") - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 0c6b352b..50463da6 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -4,10 +4,9 @@ go 1.15 require ( github.com/google/go-cmp v0.5.2 // indirect - github.com/google/uuid v1.2.0 + github.com/google/uuid v1.2.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/minio/minio-go/v7 v7.0.10 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 github.com/smartystreets/assertions v1.1.1 // indirect @@ -21,6 +20,7 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/grpc v1.35.0 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect + gopkg.in/ini.v1 v1.57.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index d538aa41..7c893974 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -282,9 +282,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= -github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -311,12 +308,6 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx 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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= -github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio-go/v7 v7.0.10 h1:1oUKe4EOPUEhw2qnPQaPsJ0lmVTYLFu03SiItauXs94= -github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -384,8 +375,6 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 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= @@ -466,7 +455,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -562,7 +550,6 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= diff --git a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml b/container-object-storage-interface-provisioner-sidecar/kustomization.yaml deleted file mode 100644 index 602e779a..00000000 --- a/container-object-storage-interface-provisioner-sidecar/kustomization.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: objectstorage-provisioner-ns - -commonAnnotations: - cosi.storage.k8s.io/authors: "Kubernetes Authors" - cosi.storage.k8s.io/license: "Apache V2" - cosi.storage.k8s.io/support: "https://github.com/kubernetes-sigs/container-object-storage-api" - -commonLabels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner - -configMapGenerator: -- name: objectstorage-provisioner-config - env: resources/objectstorage-provisioner.properties -generatorOptions: - disableNameSuffixHash: true - labels: - generated-by: "kustomize" - -resources: -- resources/ns.yaml -- resources/sa.yaml -- resources/rbac.yaml -- resources/secret.yaml -- resources/deployment.yaml -- resources/minio.yaml - -configurations: - - resources/kustomizeconfig.yaml - -vars: - - name: IMAGE_ORG - objref: - name: objectstorage-provisioner-config - kind: ConfigMap - apiVersion: v1 - fieldref: - fieldpath: data.OBJECTSTORAGE_PROVISIONER_IMAGE_ORG - - name: IMAGE_VERSION - objref: - name: objectstorage-provisioner-config - kind: ConfigMap - apiVersion: v1 - fieldref: - fieldpath: data.OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION diff --git a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml b/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml deleted file mode 100644 index de8ac332..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: objectstorage-provisioner - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner -spec: - replicas: 1 - minReadySeconds: 30 - progressDeadlineSeconds: 600 - revisionHistoryLimit: 3 - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/name: container-object-storage-interface-provisioner - app.kubernetes.io/version: main - template: - metadata: - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/name: container-object-storage-interface-provisioner - app.kubernetes.io/version: main - spec: - serviceAccountName: objectstorage-provisioner-sa - volumes: - - name: socket - emptyDir: {} - containers: - - name: minio-cosi-driver - image: $(IMAGE_ORG)/minio-cosi-driver:$(IMAGE_VERSION) - imagePullPolicy: Always - envFrom: - - secretRef: - name: objectstorage-provisioner - volumeMounts: - - mountPath: /var/lib/cosi - name: socket - - name: objectstorage-provisioner-sidecar - image: $(IMAGE_ORG)/objectstorage-sidecar:$(IMAGE_VERSION) - imagePullPolicy: Always - envFrom: - - secretRef: - name: objectstorage-provisioner - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - mountPath: /var/lib/cosi - name: socket diff --git a/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml b/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml deleted file mode 100644 index 3d389397..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/kustomizeconfig.yaml +++ /dev/null @@ -1,3 +0,0 @@ -varReference: -- path: spec/template/spec/containers/image - kind: Deployment diff --git a/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml b/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml deleted file mode 100644 index 4b7f38d7..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/minio.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: minio -spec: - type: ClusterIP - ports: - - port: 9000 - targetPort: 9000 - protocol: TCP - selector: - app: minio ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: minio - labels: - app: minio -spec: - selector: - matchLabels: - app: minio - template: - metadata: - labels: - app: minio - spec: - containers: - - image: minio/minio:latest - name: image - args: - - server - - /data - env: - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: objectstorage-provisioner - key: MINIO_ACCESS_KEY - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: objectstorage-provisioner - key: MINIO_SECRET_KEY diff --git a/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml b/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml deleted file mode 100644 index 0b56bf7a..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/ns.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: objectstorage-provisioner-ns - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties b/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties deleted file mode 100644 index 5e9a71bc..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/objectstorage-provisioner.properties +++ /dev/null @@ -1,2 +0,0 @@ -OBJECTSTORAGE_PROVISIONER_IMAGE_ORG=quay.io/containerobjectstorage -OBJECTSTORAGE_PROVISIONER_IMAGE_VERSION=canary \ No newline at end of file diff --git a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml b/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml deleted file mode 100644 index b7e4c6a9..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/rbac.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: objectstorage-provisioner-role - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner -rules: -- apiGroups: ["objectstorage.k8s.io"] - resources: ["buckets", "bucketaccesses","buckets/status", "bucketaccesses/status"] - verbs: ["get", "list", "watch", "update", "create", "delete"] -- apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["get", "watch", "list", "delete", "update", "create"] -- apiGroups: [""] - resources: ["secrets", "events"] - verbs: ["get", "delete", "update", "create"] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: objectstorage-provisioner-role-binding - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner -subjects: - - kind: ServiceAccount - name: objectstorage-provisioner-sa - namespace: default # must set to default. see https://github.com/kubernetes-sigs/kustomize/issues/1377#issuecomment-694731163 -roleRef: - kind: ClusterRole - name: objectstorage-provisioner-role - apiGroup: rbac.authorization.k8s.io diff --git a/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml b/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml deleted file mode 100644 index c4304c69..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/sa.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: objectstorage-provisioner-sa - namespace: default # must set to default. see https://github.com/kubernetes-sigs/kustomize/issues/1377#issuecomment-694731163 - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner diff --git a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml b/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml deleted file mode 100644 index c7f52d55..00000000 --- a/container-object-storage-interface-provisioner-sidecar/resources/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: objectstorage-provisioner - labels: - app.kubernetes.io/part-of: container-object-storage-interface - app.kubernetes.io/component: provisioner - app.kubernetes.io/version: main - app.kubernetes.io/name: container-object-storage-interface-provisioner -type: Opaque -stringData: - MINIO_HOST: "http://minio:9000" - MINIO_ACCESS_KEY: "minio" - MINIO_SECRET_KEY: "minio123" - V: "3" From 153c39ac92a20c6622cf6c487bfb7ecfa93bce37 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Tue, 11 May 2021 13:04:30 -0400 Subject: [PATCH 182/299] updated api/controller, adds bar/br finalizer logic --- .../go.mod | 3 ++- .../go.sum | 17 +++++++++++++++-- .../bucketaccessrequest/bucketaccessrequest.go | 15 +++++++++++++-- .../pkg/bucketrequest/bucketrequest.go | 11 +++++++++++ .../pkg/bucketrequest/bucketrequest_test.go | 2 -- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index c9616b89..b73dc9e3 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -28,6 +28,7 @@ require ( k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.4.0 k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d + sigs.k8s.io/controller-runtime v0.6.3 sigs.k8s.io/controller-tools v0.4.1 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index b8cccccf..b42a8434 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -50,12 +50,15 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -121,6 +124,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -321,6 +325,7 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -378,19 +383,23 @@ github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prY github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -467,8 +476,11 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -646,6 +658,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -783,8 +796,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f h1:LtkVxN0N+qKHLuYE/N5qxSkJv/3bWkr3+9ZBVwiq1tw= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210416205422-83cd0d53ce7f/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d h1:4UhPuhdrRuoGmjbrpSBWPP+kT83zj9yBu66mXQLyuQA= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19 h1:LrLrBCBqO7O/VjJtTrDSj3/f7hLSQaCIouLZFnHGxFg= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index 68836a64..ab6e7957 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -8,6 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclientset "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" @@ -16,6 +17,10 @@ import ( "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) +const ( + finalizer = "cosi.objectstorage.k8s.io/bucketaccessrequest-protection" +) + type bucketAccessRequestListener struct { kubeClient kubeclientset.Interface bucketClient bucketclientset.Interface @@ -59,8 +64,9 @@ func (b *bucketAccessRequestListener) Update(ctx context.Context, old, new *v1al return nil } -func (b *bucketAccessRequestListener) Delete(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { - klog.V(1).Infof("Delete called for BucketAccessRequest %v", obj.Name) +func (b *bucketAccessRequestListener) Delete(ctx context.Context, bucketAccessRequest *v1alpha1.BucketAccessRequest) error { + klog.V(1).Infof("Delete called for BucketAccessRequest %v", bucketAccessRequest.Name) + return nil } @@ -143,6 +149,11 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, return err } + controllerutil.AddFinalizer(bucketAccessRequest, finalizer) + if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}); err != nil { + return err + } + bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name bucketAccessRequest.Status.AccessGranted = true _, err = barClient(bucketAccessRequest.Namespace).UpdateStatus(ctx, bucketAccessRequest, metav1.UpdateOptions{}) diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index e7fdaaf3..8488d76f 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -8,6 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclientset "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" @@ -16,6 +17,10 @@ import ( "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) +const ( + finalizer = "cosi.objectstorage.k8s.io/bucketrequest-protection" +) + // bucketRequestListener is a resource handler for bucket requests objects type bucketRequestListener struct { kubeClient kubeclientset.Interface @@ -77,6 +82,7 @@ func (b *bucketRequestListener) Delete(ctx context.Context, bucketRequest *v1alp klog.V(3).Infof("Delete BucketRequest %v", "name", bucketRequest.Name, "ns", bucketRequest.Namespace) + return nil } @@ -127,6 +133,11 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont return err } + controllerutil.AddFinalizer(bucketRequest, finalizer) + if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}); err != nil { + return err + } + bucketRequest.Status.BucketName = bucket.Name bucketRequest.Status.BucketAvailable = true _, err = b.BucketRequests(bucketRequest.Namespace).UpdateStatus(ctx, bucketRequest, metav1.UpdateOptions{}) diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go index eb13aeb8..3a83ebf8 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go @@ -30,8 +30,6 @@ var goldClass = types.BucketClass{ Parameters: classGoldParameters, Protocol: types.Protocol{ S3: &types.S3Protocol{ - Endpoint: "endpoint", - BucketName: "cosibucket", Region: "us-east-1", SignatureVersion: "S3V4", }, From 1efc4a2afea6260c78e9a9ccc438423207c7a2f1 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Tue, 11 May 2021 14:19:54 -0400 Subject: [PATCH 183/299] updates api/controller version, adds br/bar finalizer logic --- .../go.mod | 5 ++-- .../go.sum | 21 ++++++++++++---- .../pkg/bucket/bucket_controller.go | 18 ++++++++++++++ .../bucketaccess/bucketaccess_controller.go | 24 ++++++++++++++----- .../bucketaccess_controller_test.go | 19 +++++---------- 5 files changed, 62 insertions(+), 25 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 50463da6..5629c147 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -26,6 +26,7 @@ require ( k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/klog/v2 v2.2.0 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab - sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d + sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90 + sigs.k8s.io/controller-runtime v0.6.3 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 7c893974..6f96e574 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -47,6 +47,7 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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= @@ -116,6 +117,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -192,6 +194,7 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -306,6 +309,7 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO 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-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -360,17 +364,21 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -438,8 +446,11 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -598,6 +609,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -683,6 +695,7 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= @@ -714,11 +727,11 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab h1:mKZ+ua1nJHPYNb5NkyxFsObb0bElpCiwt8k6xeNsH1Y= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210417043410-0af83d5058ab/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d h1:4UhPuhdrRuoGmjbrpSBWPP+kT83zj9yBu66mXQLyuQA= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4 h1:U+M87V77xKotSub2dqNlmxHMbb30QeC7wwTWdPGAhSI= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210330184956-b0de747ccee4/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90 h1:gC+gbzEMq1EPR+QmXuDmC50USLWLY/8Ci2ezgqhloUs= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 78df0444..8eb1eab6 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -28,12 +28,17 @@ import ( buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" cosi "sigs.k8s.io/container-object-storage-interface-spec" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) +const ( + brFinalizer = "cosi.objectstorage.k8s.io/bucketrequest-protection" +) + // BucketListener manages Bucket objects type BucketListener struct { provisionerClient cosi.ProvisionerClient @@ -183,6 +188,19 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke return errors.Wrap(err, "Failed to update bucket") } + if bucket.Spec.BucketRequest != nil { + ref := bucket.Spec.BucketRequest + bucketRequest, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + controllerutil.RemoveFinalizer(bucketRequest, brFinalizer) + if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}); err != nil { + return err + } + } + return nil } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index ca7651d3..e6dc18df 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -18,6 +18,7 @@ package bucketaccess import ( "context" "os" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "strings" corev1 "k8s.io/api/core/v1" @@ -39,8 +40,8 @@ import ( ) const ( - CredentialsFilePath = "CredentialsFilePath" - CredentialsFileContents = "CredentialsFileContents" + Credentials = "Credentials" + barFinalizer = "cosi.objectstorage.k8s.io/bucketaccessrequest-protection" ) // BucketAccessListener manages Bucket objects @@ -153,8 +154,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } // if secret doesn't exist, create it - credentialsFileContents := rsp.CredentialsFileContents - credentialsFilePath := rsp.CredentialsFilePath + credentials := rsp.Credentials if _, err := bal.Secrets(ns).Create(ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -162,8 +162,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a Namespace: ns, }, StringData: map[string]string{ - CredentialsFilePath: credentialsFilePath, - CredentialsFileContents: credentialsFileContents, + Credentials: credentials, }, Type: corev1.SecretTypeOpaque, }, metav1.CreateOptions{}); err != nil { @@ -227,6 +226,19 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp return errors.Wrap(err, "Failed to update BucketAccess Status") } + if bucketAccess.Spec.BucketAccessRequest != nil { + ref := bucketAccess.Spec.BucketAccessRequest + bucketAccessRequest, err := bal.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + controllerutil.RemoveFinalizer(bucketAccessRequest, barFinalizer) + if _, err := bal.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}); err != nil { + return err + } + } + return nil } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 499e5fee..1bd4433d 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -135,8 +135,7 @@ func TestAddBucketAccess(t *testing.T) { policy := "policy1" accountId := "account1" - credsContents := "credsContents" - credsFile := "credsFile" + creds := "credsContents" ns := "testns" mpc := struct{ fakespec.FakeProvisionerClient }{} @@ -157,9 +156,8 @@ func TestAddBucketAccess(t *testing.T) { opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { return &cosi.ProvisionerGrantBucketAccessResponse{ - AccountId: accountId, - CredentialsFileContents: credsContents, - CredentialsFilePath: credsFile, + AccountId: accountId, + Credentials: creds, }, nil }, }, @@ -224,15 +222,10 @@ func TestAddBucketAccess(t *testing.T) { t.Fatalf("minted secret creation failed: %v", err) } - if secret.StringData["CredentialsFilePath"] != credsFile { + if secret.StringData["Credentials"] != creds { t.Errorf("Expected %s, got %s", - credsFile, - secret.StringData["CredentialsFilePath"]) - } - if secret.StringData["CredentialsFileContents"] != credsContents { - t.Errorf("Expected %s, got %s", - credsContents, - secret.StringData["CredentialsFileContents"]) + creds, + secret.StringData["Credentials"]) } } } From 7591e6df1f5362ef220fb1e6b24ab936a2d9978f Mon Sep 17 00:00:00 2001 From: Yiannis Gkoufas Date: Fri, 21 May 2021 14:30:31 +0100 Subject: [PATCH 184/299] backoff increase --- .../pkg/provisioner/provisioner.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go index 6f34be06..6d7105ad 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go @@ -17,6 +17,7 @@ package provisioner import ( "context" + "google.golang.org/grpc/backoff" "net/url" "time" @@ -28,16 +29,21 @@ import ( ) const ( - maxGrpcBackoff = 30 * time.Second + maxGrpcBackoff = 5 * 30 * time.Second grpcDialTimeout = 30 * time.Second ) func NewDefaultCOSIProvisionerClient(ctx context.Context, address string, debug bool) (*COSIProvisionerClient, error) { + backoffConfiguration := backoff.DefaultConfig + backoffConfiguration.MaxDelay = maxGrpcBackoff + dialOpts := []grpc.DialOption{ grpc.WithInsecure(), // strictly restricting to local Unix domain socket - grpc.WithBackoffMaxDelay(maxGrpcBackoff), + grpc.WithConnectParams(grpc.ConnectParams{ + Backoff: backoffConfiguration, + MinConnectTimeout: grpcDialTimeout, + }), grpc.WithBlock(), // block until connection succeeds - grpc.WithTimeout(grpcDialTimeout), } interceptors := []grpc.UnaryClientInterceptor{} @@ -65,12 +71,14 @@ func NewCOSIProvisionerClient(ctx context.Context, address string, dialOpts []gr dialOpts = append(dialOpts, grpc.WithChainUnaryInterceptor(interceptor)) } + ctx, cancel := context.WithTimeout(ctx, maxGrpcBackoff) + defer cancel() + conn, err := grpc.DialContext(ctx, address, dialOpts...) if err != nil { klog.ErrorS(err, "Connection failed", "address", address) return nil, err } - return &COSIProvisionerClient{ address: address, conn: conn, From 8158c6ef74a222a948e325503e5be0a442c09f5c Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Tue, 25 May 2021 18:01:58 -0400 Subject: [PATCH 185/299] updated README.md --- .../README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 70b61855..1ca66051 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -37,20 +37,16 @@ make test ## References -- [Documentation](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/index.md) -- [Deployment Guide](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/deployment-guide.md) -- [Weekly Meetings](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/meetings.md) -- [Roadmap](https://github.com/orgs/kubernetes-sigs/projects/8) - + - [Documentation](https://container-object-storage-interface.github.io/) + - [Deployment Guide](https://container-object-storage-interface.github.io/docs/deployment-guide) + - [Weekly Meetings](https://container-object-storage-interface.github.io/docs/community/weekly-meetings) + - [Roadmap](https://github.com/orgs/kubernetes-sigs/projects/8) ## Community, discussion, contribution, and support -Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). - You can reach the maintainers of this project at: -- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) - + - [#sig-storage-cosi](https://kubernetes.slack.com/messages/sig-storage-cosi) slack channel + - [container-object-storage-interface](https://groups.google.com/g/container-object-storage-interface-wg?pli=1) mailing list ### Code of conduct Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). From 0f67c6e96d263fd526f40b0123938f90135915c4 Mon Sep 17 00:00:00 2001 From: Tejas Parikh Date: Tue, 25 May 2021 18:04:44 -0400 Subject: [PATCH 186/299] updated README.md --- .../README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index e9992ebb..ab8ab1ea 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -46,20 +46,18 @@ To see an example of running the sidecar, take a look at the [COSI Driver Minio] ## References -- [Documentation](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/index.md) -- [Deployment Guide](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/deployment-guide.md) -- [Weekly Meetings](https://github.com/kubernetes-sigs/container-object-storage-interface-api/tree/master/docs/meetings.md) +- [Documentation](https://container-object-storage-interface.github.io/) +- [Deployment Guide](https://container-object-storage-interface.github.io/docs/deployment-guide) +- [Weekly Meetings](https://container-object-storage-interface.github.io/docs/community/weekly-meetings) - [Roadmap](https://github.com/orgs/kubernetes-sigs/projects/8) ## Community, discussion, contribution, and support -Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). - You can reach the maintainers of this project at: -- [Slack](https://kubernetes.slack.com/messages/sig-storage-cosi) -- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-storage) +- [#sig-storage-cosi](https://kubernetes.slack.com/messages/sig-storage-cosi) slack channel +- [container-object-storage-interface](https://groups.google.com/g/container-object-storage-interface-wg?pli=1) mailing list ### Code of conduct -Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). \ No newline at end of file +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). From 7e0db3afc366e28d15c4611804da329de6d293f9 Mon Sep 17 00:00:00 2001 From: Krish Chowdhary Date: Thu, 3 Jun 2021 15:45:44 -0400 Subject: [PATCH 187/299] bug 54: finalizer update fix --- .../pkg/bucketaccessrequest/bucketaccessrequest.go | 3 --- .../pkg/bucketrequest/bucketrequest.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go index ab6e7957..0cb9db81 100644 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go @@ -150,9 +150,6 @@ func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, } controllerutil.AddFinalizer(bucketAccessRequest, finalizer) - if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}); err != nil { - return err - } bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name bucketAccessRequest.Status.AccessGranted = true diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go index 8488d76f..fdcd4f6c 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go @@ -134,9 +134,6 @@ func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Cont } controllerutil.AddFinalizer(bucketRequest, finalizer) - if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}); err != nil { - return err - } bucketRequest.Status.BucketName = bucket.Name bucketRequest.Status.BucketAvailable = true From 23ef839ff882206b7ae6898216761bbe492680cc Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Tue, 26 Jul 2022 01:02:32 -0700 Subject: [PATCH 188/299] Adding the bucket creation flow --- .../controller-manager/controller-manager.go | 4 +- .../pkg/bucketclaim/bucketclaim.go | 187 +++++++++++++++++ .../bucketclaim_test.go} | 86 ++++---- .../pkg/bucketrequest/bucketrequest.go | 192 ------------------ .../pkg/util/const.go | 19 ++ 5 files changed, 251 insertions(+), 237 deletions(-) create mode 100644 container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go rename container-object-storage-interface-controller/pkg/{bucketrequest/bucketrequest_test.go => bucketclaim/bucketclaim_test.go} (60%) delete mode 100644 container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go create mode 100644 container-object-storage-interface-controller/pkg/util/const.go diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index 026d7022..8c89ccdf 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -12,7 +12,7 @@ import ( bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketaccessrequest" - "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketrequest" + "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketclaim" "k8s.io/klog/v2" ) @@ -67,7 +67,7 @@ func run(ctx context.Context, args []string) error { if err != nil { return err } - ctrl.AddBucketRequestListener(bucketrequest.NewBucketRequestListener()) + ctrl.AddBucketClaimListener(bucketclaim.NewBucketClaimListener()) ctrl.AddBucketAccessRequestListener(bucketaccessrequest.NewListener()) return ctrl.Run(ctx) } diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go new file mode 100644 index 00000000..601a5cca --- /dev/null +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -0,0 +1,187 @@ +package bucketclaim + +import ( + "context" + + "github.com/google/uuid" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" + objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + + "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" +) + +const ( + finalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" +) + +// bucketClaimListener is a resource handler for bucket requests objects +type bucketClaimListener struct { + kubeClient kubeclientset.Interface + bucketClient bucketclientset.Interface +} + +func NewBucketClaimListener() *bucketClaimListener { + return &bucketClaimListener{} +} + +// Add creates a bucket in response to a bucketClaim +func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { + klog.V(3).InfoS("Add BucketClaim", + "name", bucketClaim.Name, + "ns", bucketClaim.Namespace, + "bucketClass", bucketClaim.Spec.BucketClassName, + "bucketPrefix", bucketClaim.Spec.BucketPrefix, + ) + + err := b.provisionBucketClaimOperation(ctx, bucketClaim) + if err != nil { + switch err { + case util.ErrInvalidBucketClass: + klog.ErrorS(util.ErrInvalidBucketClass, + "bucketClaim", bucketClaim.Name, + "ns", bucketClaim.Namespace, + "bucketClassName", bucketClaim.Spec.BucketClassName) + case util.ErrBucketAlreadyExists: + klog.V(3).InfoS("Bucket already exists", + "bucketClaim", bucketClaim.Name, + "ns", bucketClaim.Namespace, + ) + return nil + default: + klog.ErrorS(err, + "name", bucketClaim.Name, + "ns", bucketClaim.Namespace, + "err", err) + } + return err + } + + klog.V(3).InfoS("Add BucketClaim success", + "name", bucketClaim.Name, + "ns", bucketClaim.Namespace) + return nil +} + +// update processes any updates made to the bucket request +func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.BucketClaim) error { + klog.V(3).InfoS("Update BucketClaim", + "name", old.Name, + "ns", old.Namespace) + return nil +} + +// Delete processes a bucket for which bucket request is deleted +func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { + klog.V(3).Infof("Delete BucketClaim %v", + "name", bucketClaim.Name, + "ns", bucketClaim.Namespace) + + return nil +} + +// provisionBucketClaimOperation attempts to provision a bucket for a given bucketClaim. +// Return values +// nil - BucketClaim successfully processed +// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] +// ErrBucketAlreadyExists - BucketClaim already processed +// non-nil err - Internal error [requeue'd with exponential backoff] +func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { + bucketClassName := b.getBucketClass(bucketClaim) + bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) + return util.ErrInvalidBucketClass + } + + if bucketClaim.Status.BucketReady { + return util.ErrBucketAlreadyExists + } + + name = bucketClassName + string(bucketClaim.GetUID()) + + // create bucket + bucket := &v1alpha1.Bucket{} + bucket.Name = name + bucket.Status.BucketReady = false + bucket.Spec.DriverName = bucketClass.DriverName + bucket.Spec.BucketClassName = bucketClassName + bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy + bucket.Spec.BucketClaim = &v1.ObjectReference{ + Name: bucketClaim.Name, + Namespace: bucketClaim.Namespace, + UID: bucketClaim.ObjectMeta.UID, + } + bucket.Spec.Protocols = *bucketClass.Protocol.DeepCopy() + bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) + + bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) + if err != nil && !errors.IsAlreadyExists(err) { + klog.ErrorS(err, "name", bucket.Name) + return err + } + + controllerutil.AddFinalizer(bucketClaim, finalizer) + + bucketClaim.Status.BucketName = bucket.Name + bucketClaim.Status.BucketAvailable = true + _, err = b.BucketClaims(bucketClaim.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + if err != nil { + return err + } + + klog.Infof("Finished creating Bucket %v", bucket.Name) + return nil +} + +// getBucketClass returns BucketClassName. If no bucket class was in the request it returns empty +// TODO this methods can be more sophisticate to address bucketClass overrides using annotations just like SC. +func (b *bucketClaimListener) getBucketClass(bucketClaim *v1alpha1.BucketClaim) string { + if bucketClaim.Spec.BucketClassName != "" { + return bucketClaim.Spec.BucketClassName + } + + return "" +} + +// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. +func (b *bucketClaimListener) cloneTheBucket(bucketClaim *v1alpha1.BucketClaim) error { + klog.InfoS("Cloning Bucket", "name", bucketClaim.Status.BucketName) + return util.ErrNotImplemented +} + +func (b *bucketClaimListener) InitializeKubeClient(k kubeclientset.Interface) { + b.kubeClient = k +} + +func (b *bucketClaimListener) InitializeBucketClient(bc bucketclientset.Interface) { + b.bucketClient = bc +} + +func (b *bucketClaimListener) Buckets() objectstoragev1alpha1.BucketInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().Buckets() + } + panic("uninitialized listener") +} + +func (b *bucketClaimListener) BucketClasses() objectstoragev1alpha1.BucketClassInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() + } + panic("uninitialized listener") +} + +func (b *bucketClaimListener) BucketClaims(namespace string) objectstoragev1alpha1.BucketClaimInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) + } + panic("uninitialized listener") +} diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go similarity index 60% rename from container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go rename to container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 3a83ebf8..27084b7c 100644 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -1,4 +1,4 @@ -package bucketrequest +package bucketclaim import ( "context" @@ -37,33 +37,33 @@ var goldClass = types.BucketClass{ IsDefaultBucketClass: false, } -var bucketRequest1 = types.BucketRequest{ +var bucketClaim1 = types.BucketClaim{ TypeMeta: metav1.TypeMeta{ APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketRequest", + Kind: "BucketClaim", }, ObjectMeta: metav1.ObjectMeta{ - Name: "bucketrequest1", + Name: "bucketclaim1", Namespace: "default", UID: "12345-67890", }, - Spec: types.BucketRequestSpec{ + Spec: types.BucketClaimSpec{ BucketPrefix: "cosi", BucketClassName: "classgold", }, } -var bucketRequest2 = types.BucketRequest{ +var bucketClaim2 = types.BucketClaim{ TypeMeta: metav1.TypeMeta{ APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketRequest", + Kind: "BucketClaim", }, ObjectMeta: metav1.ObjectMeta{ - Name: "bucketrequest2", + Name: "bucketclaim2", Namespace: "default", UID: "abcde-fghijk", }, - Spec: types.BucketRequestSpec{ + Spec: types.BucketClaimSpec{ BucketPrefix: "cosi", BucketClassName: "classgold", }, @@ -91,7 +91,7 @@ func runCreateBucket(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewBucketRequestListener() + listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) @@ -100,30 +100,30 @@ func runCreateBucket(t *testing.T, name string) { t.Fatalf("Error occurred when creating BucketClass: %v", err) } - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + bucketClaim, err := util.CreateBucketClaim(ctx, client, &bucketClaim1) if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) + t.Fatalf("Error occurred when creating BucketClaim: %v", err) } - listener.Add(ctx, bucketrequest) + listener.Add(ctx, bucketClaim) bucketList := util.GetBuckets(ctx, client, 1) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) + defer util.DeleteObjects(ctx, client, *bucketClaim, *bucketclass, bucketList.Items) if len(bucketList.Items) != 1 { t.Fatalf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] - bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + bucketClaim, err = client.ObjectstorageV1alpha1().BucketClaims(bucketClaim.Namespace).Get(ctx, bucketClaim.Name, metav1.GetOptions{}) if err != nil { - t.Fatalf("Error occurred when reading BucketRequest: %v", err) + t.Fatalf("Error occurred when reading BucketClaim: %v", err) } - if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { + if util.ValidateBucket(bucket, *bucketClaim, *bucketclass) { return } else { - t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketClaim %v and BucketClass %v", bucketClaim, bucketclass) } } @@ -134,7 +134,7 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewBucketRequestListener() + listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) @@ -143,41 +143,41 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { t.Fatalf("Error occurred when creating BucketClass: %v", err) } - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + bucketClaim, err := util.CreateBucketClaim(ctx, client, &bucketClaim1) if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) + t.Fatalf("Error occurred when creating BucketClaim: %v", err) } - bucketrequest2, err := util.CreateBucketRequest(ctx, client, &bucketRequest2) + bucketClaim2, err := util.CreateBucketClaim(ctx, client, &bucketClaim2) if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) + t.Fatalf("Error occurred when creating BucketClaim: %v", err) } - listener.Add(ctx, bucketrequest) - listener.Add(ctx, bucketrequest2) + listener.Add(ctx, bucketClaim) + listener.Add(ctx, bucketClaim2) bucketList := util.GetBuckets(ctx, client, 2) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketrequest2, *bucketclass, bucketList.Items) + defer util.DeleteObjects(ctx, client, *bucketClaim, *bucketClaim2, *bucketclass, bucketList.Items) if len(bucketList.Items) != 2 { t.Fatalf("Expecting two Buckets created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] bucket2 := bucketList.Items[1] - bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + bucketClaim, err = client.ObjectstorageV1alpha1().BucketClaims(bucketClaim.Namespace).Get(ctx, bucketClaim.Name, metav1.GetOptions{}) if err != nil { - t.Fatalf("Error occurred when reading BucketRequest: %v", err) + t.Fatalf("Error occurred when reading BucketClaim: %v", err) } - bucketrequest2, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest2.Namespace).Get(ctx, bucketrequest2.Name, metav1.GetOptions{}) + bucketClaim2, err = client.ObjectstorageV1alpha1().BucketClaims(bucketClaim2.Namespace).Get(ctx, bucketClaim2.Name, metav1.GetOptions{}) if err != nil { - t.Fatalf("Error occurred when reading BucketRequest: %v", err) + t.Fatalf("Error occurred when reading BucketClaim: %v", err) } - if (util.ValidateBucket(bucket, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket2, *bucketrequest2, *bucketclass)) || - (util.ValidateBucket(bucket2, *bucketrequest, *bucketclass) && util.ValidateBucket(bucket, *bucketrequest2, *bucketclass)) { + if (util.ValidateBucket(bucket, *bucketClaim, *bucketclass) && util.ValidateBucket(bucket2, *bucketClaim2, *bucketclass)) || + (util.ValidateBucket(bucket2, *bucketClaim, *bucketclass) && util.ValidateBucket(bucket, *bucketClaim2, *bucketclass)) { return } else { - t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketClaim %v and BucketClass %v", bucketClaim, bucketclass) } } @@ -188,7 +188,7 @@ func runCreateBucketIdempotency(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() - listener := NewBucketRequestListener() + listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) @@ -197,34 +197,34 @@ func runCreateBucketIdempotency(t *testing.T, name string) { t.Fatalf("Error occurred when creating BucketClass: %v", err) } - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) + bucketClaim, err := util.CreateBucketClaim(ctx, client, &bucketClaim1) if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) + t.Fatalf("Error occurred when creating BucketClaim: %v", err) } - listener.Add(ctx, bucketrequest) + listener.Add(ctx, bucketClaim) bucketList := util.GetBuckets(ctx, client, 1) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketclass, bucketList.Items) + defer util.DeleteObjects(ctx, client, *bucketClaim, *bucketclass, bucketList.Items) if len(bucketList.Items) != 1 { t.Errorf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } bucket := bucketList.Items[0] - bucketrequest, err = client.ObjectstorageV1alpha1().BucketRequests(bucketrequest.Namespace).Get(ctx, bucketrequest.Name, metav1.GetOptions{}) + bucketClaim, err = client.ObjectstorageV1alpha1().BucketClaims(bucketClaim.Namespace).Get(ctx, bucketClaim.Name, metav1.GetOptions{}) if err != nil { - t.Fatalf("Error occurred when reading BucketRequest: %v", err) + t.Fatalf("Error occurred when reading BucketClaim: %v", err) } - if util.ValidateBucket(bucket, *bucketrequest, *bucketclass) { + if util.ValidateBucket(bucket, *bucketClaim, *bucketclass) { return } else { - t.Fatalf("Failed to compare the resulting Bucket with the BucketRequest %v and BucketClass %v", bucketrequest, bucketclass) + t.Fatalf("Failed to compare the resulting Bucket with the BucketClaim %v and BucketClass %v", bucketClaim, bucketclass) // call the add directly the second time } - listener.Add(ctx, bucketrequest) + listener.Add(ctx, bucketClaim) bucketList = util.GetBuckets(ctx, client, 1) if len(bucketList.Items) != 1 { diff --git a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go b/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go deleted file mode 100644 index fdcd4f6c..00000000 --- a/container-object-storage-interface-controller/pkg/bucketrequest/bucketrequest.go +++ /dev/null @@ -1,192 +0,0 @@ -package bucketrequest - -import ( - "context" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" - - "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" -) - -const ( - finalizer = "cosi.objectstorage.k8s.io/bucketrequest-protection" -) - -// bucketRequestListener is a resource handler for bucket requests objects -type bucketRequestListener struct { - kubeClient kubeclientset.Interface - bucketClient bucketclientset.Interface -} - -func NewBucketRequestListener() *bucketRequestListener { - return &bucketRequestListener{} -} - -// Add creates a bucket in response to a bucketrequest -func (b *bucketRequestListener) Add(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { - klog.V(3).InfoS("Add BucketRequest", - "name", bucketRequest.Name, - "ns", bucketRequest.Namespace, - "bucketClass", bucketRequest.Spec.BucketClassName, - "bucketPrefix", bucketRequest.Spec.BucketPrefix, - ) - - err := b.provisionBucketRequestOperation(ctx, bucketRequest) - if err != nil { - switch err { - case util.ErrInvalidBucketClass: - klog.ErrorS(util.ErrInvalidBucketClass, - "bucketRequest", bucketRequest.Name, - "ns", bucketRequest.Namespace, - "bucketClassName", bucketRequest.Spec.BucketClassName) - case util.ErrBucketAlreadyExists: - klog.V(3).InfoS("Bucket already exists", - "bucketRequest", bucketRequest.Name, - "ns", bucketRequest.Namespace, - ) - return nil - default: - klog.ErrorS(err, - "name", bucketRequest.Name, - "ns", bucketRequest.Namespace, - "err", err) - } - return err - } - - klog.V(3).InfoS("Add BucketRequest success", - "name", bucketRequest.Name, - "ns", bucketRequest.Namespace) - return nil -} - -// update processes any updates made to the bucket request -func (b *bucketRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketRequest) error { - klog.V(3).InfoS("Update BucketRequest", - "name", old.Name, - "ns", old.Namespace) - return nil -} - -// Delete processes a bucket for which bucket request is deleted -func (b *bucketRequestListener) Delete(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { - klog.V(3).Infof("Delete BucketRequest %v", - "name", bucketRequest.Name, - "ns", bucketRequest.Namespace) - - return nil -} - -// provisionBucketRequestOperation attempts to provision a bucket for a given bucketRequest. -// Return values -// nil - BucketRequest successfully processed -// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] -// ErrBucketAlreadyExists - BucketRequest already processed -// non-nil err - Internal error [requeue'd with exponential backoff] -func (b *bucketRequestListener) provisionBucketRequestOperation(ctx context.Context, bucketRequest *v1alpha1.BucketRequest) error { - bucketClassName := b.getBucketClass(bucketRequest) - bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) - if err != nil { - klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) - return util.ErrInvalidBucketClass - } - - name := bucketRequest.Spec.BucketPrefix - if name != "" { - name = name + "-" - } - name = name + string(bucketRequest.GetUID()) - - if bucketRequest.Status.BucketName != "" { - return util.ErrBucketAlreadyExists - } - - // create bucket - bucket := &v1alpha1.Bucket{} - - bucket.Name = name - bucket.Status.BucketID = name - bucket.Spec.Provisioner = bucketClass.Provisioner - bucket.Spec.BucketClassName = bucketClass.Name - bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy - bucket.Spec.BucketRequest = &v1.ObjectReference{ - Name: bucketRequest.Name, - Namespace: bucketRequest.Namespace, - UID: bucketRequest.ObjectMeta.UID, - } - bucket.Spec.AllowedNamespaces = util.CopyStrings(bucketClass.AllowedNamespaces) - bucket.Spec.Protocol = *bucketClass.Protocol.DeepCopy() - bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) - - bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) - if err != nil && !errors.IsAlreadyExists(err) { - klog.ErrorS(err, "name", bucket.Name) - return err - } - - controllerutil.AddFinalizer(bucketRequest, finalizer) - - bucketRequest.Status.BucketName = bucket.Name - bucketRequest.Status.BucketAvailable = true - _, err = b.BucketRequests(bucketRequest.Namespace).UpdateStatus(ctx, bucketRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - - klog.Infof("Finished creating Bucket %v", bucket.Name) - return nil -} - -// getBucketClass returns BucketClassName. If no bucket class was in the request it returns empty -// TODO this methods can be more sophisticate to address bucketClass overrides using annotations just like SC. -func (b *bucketRequestListener) getBucketClass(bucketRequest *v1alpha1.BucketRequest) string { - if bucketRequest.Spec.BucketClassName != "" { - return bucketRequest.Spec.BucketClassName - } - - return "" -} - -// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. -func (b *bucketRequestListener) cloneTheBucket(bucketRequest *v1alpha1.BucketRequest) error { - klog.InfoS("Cloning Bucket", "name", bucketRequest.Status.BucketName) - return util.ErrNotImplemented -} - -func (b *bucketRequestListener) InitializeKubeClient(k kubeclientset.Interface) { - b.kubeClient = k -} - -func (b *bucketRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { - b.bucketClient = bc -} - -func (b *bucketRequestListener) Buckets() objectstoragev1alpha1.BucketInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().Buckets() - } - panic("uninitialized listener") -} - -func (b *bucketRequestListener) BucketClasses() objectstoragev1alpha1.BucketClassInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() - } - panic("uninitialized listener") -} - -func (b *bucketRequestListener) BucketRequests(namespace string) objectstoragev1alpha1.BucketRequestInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().BucketRequests(namespace) - } - panic("uninitialized listener") -} diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go new file mode 100644 index 00000000..d4a1e535 --- /dev/null +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -0,0 +1,19 @@ +package util + +import ( + "errors" +) + +var ( + // Error codes that the central controller will return + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") + ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") + ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") + ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") + ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") + ErrInvalidBucketAccessRequest = errors.New("Invalid bucket access request specified") + ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") + ErrBCUnavailable = errors.New("BucketClass is not available") + ErrNotImplemented = errors.New("Operation Not Implemented") + ErrNilConfigMap = errors.New("ConfigMap cannot be nil") +) \ No newline at end of file From bfa849910c374f886841d8503384920fc04dd9ed Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Tue, 26 Jul 2022 01:04:26 -0700 Subject: [PATCH 189/299] Adding the flow for bucket creation --- .../cmd/objectstorage-sidecar/cmd.go | 2 +- .../pkg/bucket/bucket_controller.go | 61 ++++++++----------- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go index 63c05970..4e500042 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go @@ -84,7 +84,7 @@ func run(ctx context.Context, args []string) error { return err } - info, err := cosiClient.ProvisionerGetInfo(ctx, &cosi.ProvisionerGetInfoRequest{}) + info, err := cosiClient.DriverGetInfo(ctx, &cosi.DriverGetInfoRequest{}) if err != nil { return err } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 8eb1eab6..75c9feac 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -42,7 +42,7 @@ const ( // BucketListener manages Bucket objects type BucketListener struct { provisionerClient cosi.ProvisionerClient - provisionerName string + driverName string kubeClient kube.Interface bucketClient buckets.Interface @@ -50,9 +50,9 @@ type BucketListener struct { } // NewBucketListener returns a resource handler for Bucket objects -func NewBucketListener(provisionerName string, client cosi.ProvisionerClient) *BucketListener { +func NewBucketListener(driverName string, client cosi.ProvisionerClient) *BucketListener { bl := &BucketListener{ - provisionerName: provisionerName, + driverName: driverName, provisionerClient: client, } @@ -71,10 +71,10 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "bucketclass", bucket.Spec.BucketClassName, ) - if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { - klog.V(5).InfoS("Skipping bucket for provisiner", + if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { + klog.V(5).InfoS("Skipping bucket for driver", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } @@ -82,26 +82,17 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Status.BucketAvailable { klog.V(5).InfoS("BucketExists", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } - proto, err := bucket.Spec.Protocol.ConvertToExternal() - if err != nil { - klog.ErrorS(err, "Invalid protocol", - "bucket", bucket.Name) - - return errors.Wrap(err, "Failed to parse protocol for API") - } - - req := &cosi.ProvisionerCreateBucketRequest{ + req := &cosi.DriverCreateBucketRequest{ Parameters: bucket.Spec.Parameters, - Protocol: proto, Name: bucket.Name, } - rsp, err := b.provisionerClient.ProvisionerCreateBucket(ctx, req) + rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { klog.ErrorS(err, "Failed to create bucket", @@ -111,7 +102,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if rsp == nil { - err := errors.New("ProvisionerCreateBucket returned a nil response") + err := errors.New("DriverCreateBucket returned a nil response") klog.ErrorS(err, "Internal Error") return err } @@ -120,8 +111,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucket.Status.BucketID = rsp.BucketId } - bucket.Status.Message = "Bucket Provisioned" - bucket.Status.BucketAvailable = true + bucket.Status.BucketReady = true // if this step fails, then controller will retry with backoff if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { @@ -156,30 +146,33 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke "bucketclass", bucket.Spec.BucketClassName, ) - if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { + if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for provisiner", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } - req := &cosi.ProvisionerDeleteBucketRequest{ - BucketId: bucket.Status.BucketID, - } + // We ask the driver to clean up the bucket from the storage provider + // only when the retain policy is set to Delete + if bucket.Spec.DeletionPolicy == bucketapi.DeletionPolicyDelete { + req := &cosi.DriverDeleteBucketRequest{ + BucketId: bucket.Status.BucketID, + } - if _, err := b.provisionerClient.ProvisionerDeleteBucket(ctx, req); err != nil { - if status.Code(err) != codes.NotFound { - klog.ErrorS(err, "Failed to delete bucket", - "bucket", bucket.Name, - ) - return err + if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { + if status.Code(err) != codes.NotFound { + klog.ErrorS(err, "Failed to delete bucket", + "bucket", bucket.Name, + ) + return err + } } } - // TODO, check bucket.Spec.DeletionPolicy - bucket.Status.BucketAvailable = false + bucket.Status.BucketID = "" // if this step fails, then controller will retry with backoff if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { From 75eee0e2fee94a2d359ba0a99157bdd45b8950c2 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Tue, 26 Jul 2022 01:04:26 -0700 Subject: [PATCH 190/299] Adding the flow for bucket creation --- .../cmd/objectstorage-sidecar/cmd.go | 2 +- .../pkg/bucket/bucket_controller.go | 73 +++++++++---------- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go index 63c05970..4e500042 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go @@ -84,7 +84,7 @@ func run(ctx context.Context, args []string) error { return err } - info, err := cosiClient.ProvisionerGetInfo(ctx, &cosi.ProvisionerGetInfoRequest{}) + info, err := cosiClient.DriverGetInfo(ctx, &cosi.DriverGetInfoRequest{}) if err != nil { return err } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 8eb1eab6..0ccdc735 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -36,13 +36,13 @@ import ( ) const ( - brFinalizer = "cosi.objectstorage.k8s.io/bucketrequest-protection" + brFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" ) // BucketListener manages Bucket objects type BucketListener struct { provisionerClient cosi.ProvisionerClient - provisionerName string + driverName string kubeClient kube.Interface bucketClient buckets.Interface @@ -50,9 +50,9 @@ type BucketListener struct { } // NewBucketListener returns a resource handler for Bucket objects -func NewBucketListener(provisionerName string, client cosi.ProvisionerClient) *BucketListener { +func NewBucketListener(driverName string, client cosi.ProvisionerClient) *BucketListener { bl := &BucketListener{ - provisionerName: provisionerName, + driverName: driverName, provisionerClient: client, } @@ -71,10 +71,10 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "bucketclass", bucket.Spec.BucketClassName, ) - if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { - klog.V(5).InfoS("Skipping bucket for provisiner", + if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { + klog.V(5).InfoS("Skipping bucket for driver", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } @@ -82,26 +82,17 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Status.BucketAvailable { klog.V(5).InfoS("BucketExists", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } - proto, err := bucket.Spec.Protocol.ConvertToExternal() - if err != nil { - klog.ErrorS(err, "Invalid protocol", - "bucket", bucket.Name) - - return errors.Wrap(err, "Failed to parse protocol for API") - } - - req := &cosi.ProvisionerCreateBucketRequest{ + req := &cosi.DriverCreateBucketRequest{ Parameters: bucket.Spec.Parameters, - Protocol: proto, Name: bucket.Name, } - rsp, err := b.provisionerClient.ProvisionerCreateBucket(ctx, req) + rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { klog.ErrorS(err, "Failed to create bucket", @@ -111,7 +102,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if rsp == nil { - err := errors.New("ProvisionerCreateBucket returned a nil response") + err := errors.New("DriverCreateBucket returned a nil response") klog.ErrorS(err, "Internal Error") return err } @@ -120,8 +111,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucket.Status.BucketID = rsp.BucketId } - bucket.Status.Message = "Bucket Provisioned" - bucket.Status.BucketAvailable = true + bucket.Status.BucketReady = true // if this step fails, then controller will retry with backoff if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { @@ -156,30 +146,33 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke "bucketclass", bucket.Spec.BucketClassName, ) - if !strings.EqualFold(bucket.Spec.Provisioner, b.provisionerName) { + if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for provisiner", "bucket", bucket.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucket.Spec.DriverName, ) return nil } - req := &cosi.ProvisionerDeleteBucketRequest{ - BucketId: bucket.Status.BucketID, - } + // We ask the driver to clean up the bucket from the storage provider + // only when the retain policy is set to Delete + if bucket.Spec.DeletionPolicy == bucketapi.DeletionPolicyDelete { + req := &cosi.DriverDeleteBucketRequest{ + BucketId: bucket.Status.BucketID, + } - if _, err := b.provisionerClient.ProvisionerDeleteBucket(ctx, req); err != nil { - if status.Code(err) != codes.NotFound { - klog.ErrorS(err, "Failed to delete bucket", - "bucket", bucket.Name, - ) - return err + if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { + if status.Code(err) != codes.NotFound { + klog.ErrorS(err, "Failed to delete bucket", + "bucket", bucket.Name, + ) + return err + } } } - // TODO, check bucket.Spec.DeletionPolicy - bucket.Status.BucketAvailable = false + bucket.Status.BucketID = "" // if this step fails, then controller will retry with backoff if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { @@ -188,15 +181,15 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke return errors.Wrap(err, "Failed to update bucket") } - if bucket.Spec.BucketRequest != nil { - ref := bucket.Spec.BucketRequest - bucketRequest, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if bucket.Spec.BucketClaim != nil { + ref := bucket.Spec.BucketClaim + bucketClaim, err := b.bucketClient.ObjectstorageV1alpha1().BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { return err } - controllerutil.RemoveFinalizer(bucketRequest, brFinalizer) - if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketRequests(bucketRequest.Namespace).Update(ctx, bucketRequest, metav1.UpdateOptions{}); err != nil { + controllerutil.RemoveFinalizer(bucketClaim, brFinalizer) + if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { return err } } From ffbd20a1d272293ba03b1d593c94acaacf89d364 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Wed, 27 Jul 2022 23:20:41 -0700 Subject: [PATCH 191/299] Removing bucket access request --- .../bucketaccessrequest.go | 162 --------- .../bucketaccessrequest_test.go | 333 ------------------ 2 files changed, 495 deletions(-) delete mode 100644 container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go delete mode 100644 container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go deleted file mode 100644 index 0cb9db81..00000000 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest.go +++ /dev/null @@ -1,162 +0,0 @@ -package bucketaccessrequest - -import ( - "context" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" - - "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" -) - -const ( - finalizer = "cosi.objectstorage.k8s.io/bucketaccessrequest-protection" -) - -type bucketAccessRequestListener struct { - kubeClient kubeclientset.Interface - bucketClient bucketclientset.Interface -} - -func NewListener() bucketcontroller.BucketAccessRequestListener { - return &bucketAccessRequestListener{} -} - -func (b *bucketAccessRequestListener) InitializeKubeClient(k kubeclientset.Interface) { - b.kubeClient = k -} - -func (b *bucketAccessRequestListener) InitializeBucketClient(bc bucketclientset.Interface) { - b.bucketClient = bc -} - -func (b *bucketAccessRequestListener) Add(ctx context.Context, obj *v1alpha1.BucketAccessRequest) error { - klog.V(1).Infof("Add called for BucketAccessRequest %s", obj.Name) - bucketAccessRequest := obj - - err := b.provisionBucketAccess(ctx, bucketAccessRequest) - if err != nil { - // Provisioning is 100% finished / not in progress. - switch err { - case util.ErrBucketAccessAlreadyExists: - klog.V(1).Infof("BucketAccess already exist for this BucketAccessRequest %v.", bucketAccessRequest.Name) - err = nil - default: - klog.V(1).Infof("Error occurred processing BucketAccessRequest %v: %v", bucketAccessRequest.Name, err) - } - return err - } - - klog.V(1).Infof("BucketAccessRequest %v is successfully processed.", bucketAccessRequest.Name) - return nil -} - -func (b *bucketAccessRequestListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccessRequest) error { - klog.V(1).Infof("Update called for BucketAccessRequest %v", old.Name) - return nil -} - -func (b *bucketAccessRequestListener) Delete(ctx context.Context, bucketAccessRequest *v1alpha1.BucketAccessRequest) error { - klog.V(1).Infof("Delete called for BucketAccessRequest %v", bucketAccessRequest.Name) - - return nil -} - -// provisionBucketAccess attempts to provision a BucketAccess for the given bucketAccessRequest. -// Returns nil error only when the bucketaccess was provisioned. An error is return if we cannot create bucket access. -// A normal error is returned when bucket acess was not provisioned and provisioning should be retried (requeue the bucketAccessRequest), -// or a special error errBucketAccessAlreadyExists, errInvalidBucketAccessClass is returned when provisioning was impossible and -// no further attempts to provision should be tried. -func (b *bucketAccessRequestListener) provisionBucketAccess(ctx context.Context, bucketAccessRequest *v1alpha1.BucketAccessRequest) error { - baClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccesses() - bacClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() - brClient := b.bucketClient.ObjectstorageV1alpha1().BucketRequests - barClient := b.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests - coreClient := b.kubeClient.CoreV1() - - name := string(bucketAccessRequest.GetUID()) - - if bucketAccessRequest.Status.BucketAccessName != "" { - return util.ErrBucketAccessAlreadyExists - } - - bucketAccessClassName := bucketAccessRequest.Spec.BucketAccessClassName - bucketAccessClass, err := bacClient.Get(ctx, bucketAccessClassName, metav1.GetOptions{}) - if err != nil { - // bucket access class is invalid or not specified, cannot continue with provisioning. - klog.Errorf("error fetching bucketaccessclass [%v]: %v", bucketAccessClassName, err) - return util.ErrInvalidBucketAccessClass - } - - brName := bucketAccessRequest.Spec.BucketRequestName - // TODO: catch this in a admission controller - if brName == "" { - return util.ErrInvalidBucketAccessRequest - } - bucketRequest, err := brClient(bucketAccessRequest.Namespace).Get(ctx, brName, metav1.GetOptions{}) - if err != nil { - klog.Errorf("error fetching bucket request [%v]: %v", brName, err) - return err - } - - if bucketRequest.Status.BucketName == "" || !bucketRequest.Status.BucketAvailable { - return util.ErrWaitForBucketProvisioning - } - - saName := bucketAccessRequest.Spec.ServiceAccountName - sa := &v1.ServiceAccount{} - if saName != "" { - sa, err = coreClient.ServiceAccounts(bucketAccessRequest.Namespace).Get(ctx, saName, metav1.GetOptions{}) - if err != nil { - return err - } - } - - bucketaccess := &v1alpha1.BucketAccess{} - bucketaccess.Name = name - - bucketaccess.Spec.BucketName = bucketRequest.Status.BucketName - - bucketaccess.Spec.BucketAccessRequest = &v1.ObjectReference{ - Name: bucketAccessRequest.Name, - Namespace: bucketAccessRequest.Namespace, - UID: bucketAccessRequest.ObjectMeta.UID, - } - bucketaccess.Spec.ServiceAccount = &v1.ObjectReference{ - Name: sa.Name, - Namespace: sa.Namespace, - UID: sa.ObjectMeta.UID, - } - // bucketaccess.Spec.MintedSecretName - set by the driver - bucketaccess.Spec.PolicyActionsConfigMapData, err = util.ReadConfigData(b.kubeClient, bucketAccessClass.PolicyActionsConfigMap) - if err != nil { - return err - } - // bucketaccess.Spec.Principal - set by the driver - - bucketaccess.Spec.Parameters = util.CopySS(bucketAccessClass.Parameters) - - bucketaccess, err = baClient.Create(context.Background(), bucketaccess, metav1.CreateOptions{}) - if err != nil && !errors.IsAlreadyExists(err) { - return err - } - - controllerutil.AddFinalizer(bucketAccessRequest, finalizer) - - bucketAccessRequest.Status.BucketAccessName = bucketaccess.Name - bucketAccessRequest.Status.AccessGranted = true - _, err = barClient(bucketAccessRequest.Namespace).UpdateStatus(ctx, bucketAccessRequest, metav1.UpdateOptions{}) - if err != nil { - return err - } - klog.Infof("Finished creating BucketAccess %v", bucketaccess.Name) - return nil -} diff --git a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go b/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go deleted file mode 100644 index fb729da0..00000000 --- a/container-object-storage-interface-controller/pkg/bucketaccessrequest/bucketaccessrequest_test.go +++ /dev/null @@ -1,333 +0,0 @@ -package bucketaccessrequest - -import ( - "context" - "testing" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" - - types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" - - "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" -) - -var sa1 = v1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "sa1", - Namespace: "default", - }, -} - -var sa2 = v1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "sa2", - Namespace: "default", - }, -} - -var cosiConfigMap = v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "testconfigmap", - Namespace: "default", - Labels: map[string]string{ - "cosi-configmap": "test-cred1", - }, - }, - Data: map[string]string{ - "profile": "profile1", - "certfile": "cert1", - }, -} - -var classGoldAccessParameters = map[string]string{ - "param1": "value1", - "param2": "value2", -} - -var goldAccessClass = types.BucketAccessClass{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketAccessClass", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "classaccessgold", - }, - PolicyActionsConfigMap: &v1.ObjectReference{Name: "testconfigmap", Namespace: "default"}, - Parameters: classGoldAccessParameters, -} - -var bucketRequest1 = types.BucketRequest{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketRequest", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "bucketrequest1", - Namespace: "default", - UID: "br-12345", - }, - Spec: types.BucketRequestSpec{ - BucketPrefix: "cosi", - BucketClassName: "classgold", - }, - Status: types.BucketRequestStatus{ - BucketName: "cosi1234567890", - BucketAvailable: true, - }, -} - -var bucketAccessRequest1 = types.BucketAccessRequest{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketAccessRequest", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "bucketaccessrequest1", - Namespace: "default", - UID: "bar-12345", - }, - Spec: types.BucketAccessRequestSpec{ - ServiceAccountName: "sa1", - BucketRequestName: "bucketrequest1", - BucketAccessClassName: "classaccessgold", - }, -} - -var bucketAccessRequest2 = types.BucketAccessRequest{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "objectstorage.k8s.io/v1alpha1", - Kind: "BucketAccessRequest", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "bucketaccessrequest2", - Namespace: "default", - UID: "bar-67890", - }, - Spec: types.BucketAccessRequestSpec{ - ServiceAccountName: "sa2", - BucketRequestName: "bucketrequest1", - BucketAccessClassName: "classaccessgold", - }, -} - -// Test basic add functionality -func TestAddBAR(t *testing.T) { - runCreateBucketAccess(t, "add") -} - -// Test add with multipleBRs -func TestAddWithMultipleBAR(t *testing.T) { - runCreateBucketWithMultipleBA(t, "addWithMultipleBR") -} - -// Test add idempotency -func TestAddBARIdempotency(t *testing.T) { - runCreateBucketIdempotency(t, "addWithMultipleBR") -} - -func runCreateBucketAccess(t *testing.T, name string) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() - - listener := NewListener() - listener.InitializeKubeClient(kubeClient) - listener.InitializeBucketClient(client) - - _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ServiceAccount: %v", err) - } - defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) - - _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ConfigMap: %v", err) - } - defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) - - bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) - } - - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) - } - - bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) - } - - listener.Add(ctx, bucketaccessrequest) - - bucketAccessList := util.GetBucketAccesses(ctx, client, 1) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessclass, bucketAccessList.Items) - - if len(bucketAccessList.Items) != 1 { - t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) - } - bucketaccess := bucketAccessList.Items[0] - - bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) - if err != nil { - t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) - } - - if util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) { - return - } else { - t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) - } -} - -func runCreateBucketWithMultipleBA(t *testing.T, name string) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() - - listener := NewListener() - listener.InitializeKubeClient(kubeClient) - listener.InitializeBucketClient(client) - - _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ServiceAccount: %v", err) - } - defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) - - _, err = kubeClient.CoreV1().ServiceAccounts(sa2.Namespace).Create(ctx, &sa2, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ServiceAccount: %v", err) - } - defer kubeClient.CoreV1().ServiceAccounts(sa2.Namespace).Delete(ctx, sa2.Name, metav1.DeleteOptions{}) - - _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ConfigMap: %v", err) - } - defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) - - bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) - } - - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) - } - - bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) - } - - bucketaccessrequest2, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest2) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) - } - - listener.Add(ctx, bucketaccessrequest) - listener.Add(ctx, bucketaccessrequest2) - - bucketAccessList := util.GetBucketAccesses(ctx, client, 2) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessrequest2, *bucketaccessclass, bucketAccessList.Items) - - if len(bucketAccessList.Items) != 2 { - t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) - } - bucketaccess := bucketAccessList.Items[0] - bucketaccess2 := bucketAccessList.Items[1] - - bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) - if err != nil { - t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) - } - bucketaccessrequest2, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest2.Namespace).Get(ctx, bucketaccessrequest2.Name, metav1.GetOptions{}) - if err != nil { - t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) - } - - if (util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) && util.ValidateBucketAccess(bucketaccess2, *bucketaccessrequest2, *bucketaccessclass)) || - (util.ValidateBucketAccess(bucketaccess2, *bucketaccessrequest, *bucketaccessclass) && util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest2, *bucketaccessclass)) { - return - } else { - t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) - } - -} - -func runCreateBucketIdempotency(t *testing.T, name string) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() - - listener := NewListener() - listener.InitializeKubeClient(kubeClient) - listener.InitializeBucketClient(client) - - _, err := kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Create(ctx, &sa1, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ServiceAccount: %v", err) - } - defer kubeClient.CoreV1().ServiceAccounts(sa1.Namespace).Delete(ctx, sa1.Name, metav1.DeleteOptions{}) - - _, err = kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Create(ctx, &cosiConfigMap, metav1.CreateOptions{}) - if err != nil { - t.Fatalf("Error occurred when creating ConfigMap: %v", err) - } - defer kubeClient.CoreV1().ConfigMaps(cosiConfigMap.Namespace).Delete(ctx, cosiConfigMap.Name, metav1.DeleteOptions{}) - - bucketaccessclass, err := util.CreateBucketAccessClass(ctx, client, &goldAccessClass) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessClass: %v", err) - } - - bucketrequest, err := util.CreateBucketRequest(ctx, client, &bucketRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketRequest: %v", err) - } - - bucketaccessrequest, err := util.CreateBucketAccessRequest(ctx, client, &bucketAccessRequest1) - if err != nil { - t.Fatalf("Error occurred when creating BucketAccessRequest: %v", err) - } - - listener.Add(ctx, bucketaccessrequest) - - bucketAccessList := util.GetBucketAccesses(ctx, client, 1) - defer util.DeleteObjects(ctx, client, *bucketrequest, *bucketaccessrequest, *bucketaccessclass, bucketAccessList.Items) - - if len(bucketAccessList.Items) != 1 { - t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) - } - bucketaccess := bucketAccessList.Items[0] - - bucketaccessrequest, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bucketaccessrequest.Namespace).Get(ctx, bucketaccessrequest.Name, metav1.GetOptions{}) - if err != nil { - t.Fatalf("Error occurred when updating BucketAccessRequest: %v", err) - } - - if !util.ValidateBucketAccess(bucketaccess, *bucketaccessrequest, *bucketaccessclass) { - t.Fatalf("Failed to compare the resulting BucketAccess with the BucketAccessRequest %v and BucketAccessClass %v", bucketaccessrequest, bucketaccessclass) - } - - // call the add directly the second time - listener.Add(ctx, bucketaccessrequest) - bucketAccessList = util.GetBucketAccesses(ctx, client, 1) - if len(bucketAccessList.Items) != 1 { - t.Fatalf("Expecting a single BucketAccess created but found %v", len(bucketAccessList.Items)) - } -} From a052b994ca57f45f81c21b5166ba3ec9abb61531 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 28 Jul 2022 09:16:37 -0700 Subject: [PATCH 192/299] More changes --- .../pkg/bucketclaim/bucketclaim.go | 5 ++--- .../pkg/util/util.go | 14 -------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 601a5cca..1d34e87c 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -3,7 +3,6 @@ package bucketclaim import ( "context" - "github.com/google/uuid" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -128,10 +127,10 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, return err } - controllerutil.AddFinalizer(bucketClaim, finalizer) + // controllerutil.AddFinalizer(bucketClaim, finalizer) bucketClaim.Status.BucketName = bucket.Name - bucketClaim.Status.BucketAvailable = true + bucketClaim.Status.BucketAvailable = false _, err = b.BucketClaims(bucketClaim.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { return err diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index 1d14d359..ba6fa451 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -35,20 +35,6 @@ import ( "k8s.io/klog/v2" ) -var ( - // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") - ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") - ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") - ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") - ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") - ErrInvalidBucketAccessRequest = errors.New("Invalid bucket access request specified") - ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") - ErrBCUnavailable = errors.New("BucketClass is not available") - ErrNotImplemented = errors.New("Operation Not Implemented") - ErrNilConfigMap = errors.New("ConfigMap cannot be nil") -) - func CopySS(m map[string]string) map[string]string { if m == nil { return nil From c4ebe8fabe285c8579ec9a8fa4154873004f67a6 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 28 Jul 2022 09:17:25 -0700 Subject: [PATCH 193/299] Bulk of changes to bucketaccess and bucket controller --- .../pkg/bucket/bucket_controller.go | 27 +++- .../bucketaccess/bucketaccess_controller.go | 124 ++++++++++++------ .../pkg/provisioner/client.go | 38 +++--- 3 files changed, 129 insertions(+), 60 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 0ccdc735..68ab069d 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -120,6 +120,21 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) return errors.Wrap(err, "Failed to update bucket status") } + // Now we update the BucketReady status of BucketClaim + if bucket.Spec.BucketClaim != nil { + ref := bucket.Spec.BucketClaim + bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + bucketClaim.Status.BucketReady = true + + if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + return err + } + } + return nil } @@ -183,13 +198,13 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim - bucketClaim, err := b.bucketClient.ObjectstorageV1alpha1().BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { return err } controllerutil.RemoveFinalizer(bucketClaim, brFinalizer) - if _, err := b.bucketClient.ObjectstorageV1alpha1().BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { return err } } @@ -204,6 +219,14 @@ func (b *BucketListener) Buckets() bucketapi.BucketInterface { panic("uninitialized listener") } +func (b *BucketListener) BucketClaims(namespace string) bucketapi.BucketClaimInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) + } + + panic ("uninitialized listener") +} + // InitializeKubeClient initializes the kubernetes client func (b *BucketListener) InitializeKubeClient(k kube.Interface) { b.kubeClient = k diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index e6dc18df..d5e6ac2b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -47,26 +47,23 @@ const ( // BucketAccessListener manages Bucket objects type BucketAccessListener struct { provisionerClient cosi.ProvisionerClient - provisionerName string + driverName string kubeClient kube.Interface bucketClient buckets.Interface kubeVersion *utilversion.Version - - namespace string } // NewBucketAccessListener returns a resource handler for BucketAccess objects -func NewBucketAccessListener(provisionerName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { +func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { ns := os.Getenv("POD_NAMESPACE") if ns == "" { return nil, errors.New("POD_NAMESPACE env var cannot be empty") } return &BucketAccessListener{ - provisionerName: provisionerName, + driverName: driverName, provisionerClient: client, - namespace: ns, }, nil } @@ -77,60 +74,96 @@ func NewBucketAccessListener(provisionerName string, client cosi.ProvisionerClie func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { bucketAccess := inputBucketAccess.DeepCopy() - bucketName := bucketAccess.Spec.BucketName + bucketClaimName := bucketAccess.Spec.BucketClaimName klog.V(3).InfoS("Add BucketAccess", "name", bucketAccess.Name, - "bucket", bucketName, + "bucketClaim", bucketClaimName, ) - if bucketAccess.Status.MintedSecret != nil { - klog.V(5).InfoS("AccessAlreadyGranted", + bucketAccessClassName := bucketAccess.Spec.BucketAccessClassName + klog.V(3).InfoS("Add BucketAccess", + "name", bucketAccess.Name, + "BucketAccessClassName", bucketAccessClassName, + ) + + secretCredName := bucketAccess.Spec.CredentialsSecretName + if secretCredName == nil { + return errors.New("CredentialsSecretName not defined in the BucketAccess") + } + + authType := cosi.AuthenticationType_UnknownAuthenticationType + if bucketAccess.Spec.AuthenticationType == v1alpha1.AuthenticationTypeKey { + authType = cosi.AuthenticationType_Key + } else if bucketAccess.Spec.AuthenticationType == v1alpha1.AuthenticationTypeIAM { + authType = cosi.AuthenticationType_IAM + } + + if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { + return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") + } + + namespace := bucketAccess.Namespace + bucketClaim, err := bal.BucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) + return errors.Wrap(err, "Failed to fetch bucketClaim") + } + + + if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { + err := errors.New("BucketName cannot be empty or BucketNotReady") + klog.ErrorS(err, + "Invalid arguments", + "bucketClaim", bucketClaim.Name, "bucketAccess", bucketAccess.Name, - "bucket", bucketName, ) - return nil + return errors.Wrap(err, "Invalid arguments") } - bucket, err := bal.Buckets().Get(ctx, bucketName, metav1.GetOptions{}) + bucketAccessClass, err := bal.BucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Failed to fetch bucket", "bucket", bucketName) - return errors.Wrap(err, "Failed to fetch bucket") + klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) + return errors.Wrap(err, "Failed to fetch BucketAccessClass") } - if !strings.EqualFold(bucket.Spec.Provisioner, bal.provisionerName) { + if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { klog.V(5).InfoS("Skipping bucketaccess for provisiner", "bucketAccess", bucketAccess.Name, - "provisioner", bucket.Spec.Provisioner, + "driver", bucketAccessClass.DriverName, ) return nil } - if bucketAccess.Status.AccessGranted { + + if bucketAccess.Status.AccessGranted == true { klog.V(5).InfoS("AccessAlreadyGranted", - "bucketaccess", bucketAccess.Name, - "bucket", bucket.Name, + "bucketAccess", bucketAccess.Name, + "bucketClaim", bucketClaimName, ) return nil } - if bucket.Status.BucketID == "" { - err := errors.New("BucketID cannot be empty") - klog.ErrorS(err, - "Invalid arguments", - "bucket", bucket.Name, - "bucketAccess", bucketAccess.Name, - ) - return errors.Wrap(err, "Invalid arguments") + bucket, err := bal.Buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) + return errors.Wrap(err, "Failed to fetch bucket") } - req := &cosi.ProvisionerGrantBucketAccessRequest{ + if bucket.Status.BucketStatus != true || bucket.Status.BucketID == "" { + return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") + } + + accountName := "ba-" + bucketAccess.UID + + req := &cosi.DriverGrantBucketAccessRequest{ BucketId: bucket.Status.BucketID, - AccountName: bucketAccess.Name, - AccessPolicy: bucketAccess.Spec.PolicyActionsConfigMapData, + AccountName: accountName, + AuthenticationType: authType, + Parameters: bucketAccessClass.Parameters, } // This needs to be idempotent - rsp, err := bal.provisionerClient.ProvisionerGrantBucketAccess(ctx, req) + rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { klog.ErrorS(err, @@ -142,9 +175,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } } - ns := bal.namespace - mintedSecretName := "ba-" + string(bucketAccess.UID) - if _, err := bal.Secrets(ns).Get(ctx, mintedSecretName, metav1.GetOptions{}); err != nil { + + if _, err := bal.Secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { if !kubeerrors.IsNotFound(err) { klog.ErrorS(err, "Failed to create secrets", @@ -156,10 +188,10 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a // if secret doesn't exist, create it credentials := rsp.Credentials - if _, err := bal.Secrets(ns).Create(ctx, &corev1.Secret{ + if _, err := bal.Secrets(namespace).Create(ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: mintedSecretName, - Namespace: ns, + Name: secretCredName, + Namespace: namespace, }, StringData: map[string]string{ Credentials: credentials, @@ -179,7 +211,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccess.Status.AccountID = rsp.AccountId bucketAccess.Status.MintedSecret = &corev1.SecretReference{ Namespace: bal.namespace, - Name: mintedSecretName, + Name: secretCredName, } bucketAccess.Status.AccessGranted = true @@ -263,6 +295,20 @@ func (b *BucketAccessListener) Buckets() bucketapi.BucketInterface { panic("uninitialized listener") } +func (b *BucketAccessListener) BucketClaims(namespace string) bucketapi.BucketClaimInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) + } + panic("uninitialized listener") +} + +func (b *BucketAccessListener) BucketAccessClasses() bucketapi.BucketClaimInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() + } + panic("uninitialized listener") +} + // InitializeKubeClient initializes the kubernetes client func (b *BucketAccessListener) InitializeKubeClient(k kube.Interface) { b.kubeClient = k diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go index ab689309..56dd133b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go @@ -34,37 +34,37 @@ type COSIProvisionerClient struct { provisionerClient cosi.ProvisionerClient } -func (c *COSIProvisionerClient) ProvisionerGetInfo(ctx context.Context, - in *cosi.ProvisionerGetInfoRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerGetInfoResponse, error) { +func (c *COSIProvisionerClient) DriverGetInfo(ctx context.Context, + in *cosi.DriverGetInfoRequest, + opts ...grpc.CallOption) (*cosi.DriverGetInfoResponse, error) { - return c.identityClient.ProvisionerGetInfo(ctx, in, opts...) + return c.identityClient.DriverGetInfo(ctx, in, opts...) } func (c *COSIProvisionerClient) ProvisionerCreateBucket(ctx context.Context, - in *cosi.ProvisionerCreateBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerCreateBucketResponse, error) { + in *cosi.DriverCreateBucketRequest, + opts ...grpc.CallOption) (*cosi.DriverCreateBucketResponse, error) { - return c.provisionerClient.ProvisionerCreateBucket(ctx, in, opts...) + return c.provisionerClient.DriverCreateBucket(ctx, in, opts...) } -func (c *COSIProvisionerClient) ProvisionerDeleteBucket(ctx context.Context, - in *cosi.ProvisionerDeleteBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { +func (c *COSIProvisionerClient) DriverDeleteBucket(ctx context.Context, + in *cosi.DriverDeleteBucketRequest, + opts ...grpc.CallOption) (*cosi.DriverDeleteBucketResponse, error) { - return c.provisionerClient.ProvisionerDeleteBucket(ctx, in, opts...) + return c.provisionerClient.DriverDeleteBucket(ctx, in, opts...) } -func (c *COSIProvisionerClient) ProvisionerGrantBucketAccess(ctx context.Context, - in *cosi.ProvisionerGrantBucketAccessRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { +func (c *COSIProvisionerClient) DriverGrantBucketAccess(ctx context.Context, + in *cosi.DriverGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.DriverGrantBucketAccessResponse, error) { - return c.provisionerClient.ProvisionerGrantBucketAccess(ctx, in, opts...) + return c.provisionerClient.DriverGrantBucketAccess(ctx, in, opts...) } -func (c *COSIProvisionerClient) ProvisionerRevokeBucketAccess(ctx context.Context, - in *cosi.ProvisionerRevokeBucketAccessRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerRevokeBucketAccessResponse, error) { +func (c *COSIProvisionerClient) DriverRevokeBucketAccess(ctx context.Context, + in *cosi.DriverRevokeBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.DriverRevokeBucketAccessResponse, error) { - return c.provisionerClient.ProvisionerRevokeBucketAccess(ctx, in, opts...) + return c.provisionerClient.DriverRevokeBucketAccess(ctx, in, opts...) } From 6251d12ffde758f1f4384fa47aa82470227917eb Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 28 Jul 2022 09:48:00 -0700 Subject: [PATCH 194/299] Handling secrets creation --- .../bucketaccess/bucketaccess_controller.go | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index d5e6ac2b..98556234 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -29,6 +29,7 @@ import ( kubecorev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/klog/v2" + cosiapi "sigs.k8s.io/container-object-storage-interface-api/apis" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" @@ -176,6 +177,24 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } + bucketInfo := cosiapi.BucketInfo { + ObjectMeta: metav1.ObjectMeta { + name: , + }, + BucketInfoSpec: cosiapi.BucketInfoSpec { + BucketName: , + AuthenticationType: , + Endpoint: , + Region: , + Protocol: , + } + } + + srtingData, err := json.Marshal(bucketInfo) + if err != nil { + return errors.New("Error converting bucketinfo into secret") + } + if _, err := bal.Secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { if !kubeerrors.IsNotFound(err) { klog.ErrorS(err, @@ -185,16 +204,13 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "failed to fetch secrets") } - // if secret doesn't exist, create it - credentials := rsp.Credentials - if _, err := bal.Secrets(namespace).Create(ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: secretCredName, Namespace: namespace, }, StringData: map[string]string{ - Credentials: credentials, + BucketInfo: string(stringData), }, Type: corev1.SecretTypeOpaque, }, metav1.CreateOptions{}); err != nil { From 6ffd0182ada70cf9003ba973b73787859c8e4d51 Mon Sep 17 00:00:00 2001 From: aarongalang Date: Fri, 29 Jul 2022 14:32:51 -0400 Subject: [PATCH 195/299] Added push to Cloudbuild.yaml and swapped out quay.io with gcr repo --- container-object-storage-interface-controller/Makefile | 2 +- .../cloudbuild.yaml | 9 +++++++-- container-object-storage-interface-controller/go.sum | 6 ------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 5a49dfd1..7a5a842d 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -27,5 +27,5 @@ CMDS=controller-manager include release-tools/build.make -IMAGE_NAME=quay.io/containerobjectstorage/objectstorage-controller +IMAGE_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-controller IMAGE_TAGS=canary diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 87af11a6..bd575de7 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,9 +1,14 @@ # See https://cloud.google.com/cloud-build/docs/build-config timeout: 3000s +substitutions: + _IMAGE_NAME: 'gcr.io/k8s-staging-sig-storage/objectstorage-controller' + _IMAGE_TAG: 'canary' options: substitution_option: ALLOW_LOOSE steps: - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" entrypoint: make - args: - - build + args: ['build'] +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" + entrypoint: make + args: ['push'] \ No newline at end of file diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index b42a8434..28490716 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -183,7 +183,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -204,7 +203,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -226,7 +224,6 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= 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= @@ -275,7 +272,6 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -703,7 +699,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= @@ -731,7 +726,6 @@ 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 9a8988c48c3646545a8040c4937be981cbb18693 Mon Sep 17 00:00:00 2001 From: aarongalang Date: Mon, 1 Aug 2022 13:35:56 -0400 Subject: [PATCH 196/299] Added push step to cloudbuild.yaml and replaced quay repository with gcr.io repo --- .../Makefile | 2 +- .../cloudbuild.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index ccb9c0c8..2f5e77a4 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -28,5 +28,5 @@ release-tools/build.make: include release-tools/build.make -REGISTRY_NAME=quay.io/containerobjectstorage +REGISTRY_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-sidecar IMAGE_TAGS=canary diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml index 87af11a6..347dde52 100644 --- a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -5,5 +5,7 @@ options: steps: - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" entrypoint: make - args: - - build + args: ['build'] +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" + entrypoint: make + args: ['push'] From ebfe4836e2fc9c800bccd0d99ace31106ee2f28a Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 4 Aug 2022 09:34:01 -0700 Subject: [PATCH 197/299] More updates to the bucket claim controller --- .../controller-manager/controller-manager.go | 2 - .../pkg/bucketclaim/bucketclaim.go | 134 +++++++++++------- .../pkg/util/const.go | 4 + .../pkg/util/util.go | 60 -------- 4 files changed, 90 insertions(+), 110 deletions(-) diff --git a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go index 8c89ccdf..a963ba1a 100644 --- a/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go +++ b/container-object-storage-interface-controller/cmd/controller-manager/controller-manager.go @@ -11,7 +11,6 @@ import ( "github.com/spf13/viper" bucketcontroller "sigs.k8s.io/container-object-storage-interface-api/controller" - "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketaccessrequest" "sigs.k8s.io/container-object-storage-interface-controller/pkg/bucketclaim" "k8s.io/klog/v2" @@ -68,6 +67,5 @@ func run(ctx context.Context, args []string) error { return err } ctrl.AddBucketClaimListener(bucketclaim.NewBucketClaimListener()) - ctrl.AddBucketAccessRequestListener(bucketaccessrequest.NewListener()) return ctrl.Run(ctx) } diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 1d34e87c..efe27d3b 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -17,10 +17,6 @@ import ( "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) -const ( - finalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" -) - // bucketClaimListener is a resource handler for bucket requests objects type bucketClaimListener struct { kubeClient kubeclientset.Interface @@ -34,8 +30,8 @@ func NewBucketClaimListener() *bucketClaimListener { // Add creates a bucket in response to a bucketClaim func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { klog.V(3).InfoS("Add BucketClaim", - "name", bucketClaim.Name, - "ns", bucketClaim.Namespace, + "name", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace, "bucketClass", bucketClaim.Spec.BucketClassName, "bucketPrefix", bucketClaim.Spec.BucketPrefix, ) @@ -45,27 +41,27 @@ func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc switch err { case util.ErrInvalidBucketClass: klog.ErrorS(util.ErrInvalidBucketClass, - "bucketClaim", bucketClaim.Name, - "ns", bucketClaim.Namespace, + "bucketClaim", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace, "bucketClassName", bucketClaim.Spec.BucketClassName) case util.ErrBucketAlreadyExists: klog.V(3).InfoS("Bucket already exists", - "bucketClaim", bucketClaim.Name, - "ns", bucketClaim.Namespace, + "bucketClaim", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace, ) return nil default: klog.ErrorS(err, - "name", bucketClaim.Name, - "ns", bucketClaim.Namespace, + "name", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace, "err", err) } return err } klog.V(3).InfoS("Add BucketClaim success", - "name", bucketClaim.Name, - "ns", bucketClaim.Namespace) + "name", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace) return nil } @@ -74,14 +70,24 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc klog.V(3).InfoS("Update BucketClaim", "name", old.Name, "ns", old.Namespace) + + if !new.GetDeletionTimestamp().IsZero() { + if controllerutil.ContainsFinalizer(bucketClaim, util.BucketClaimFinalizer) { + bucketName := bucketClaim.Status.BucketName + err := b.Buckets().Delete(ctx, bucketName, metav1.DeleteOptions{}) + if err != nil { + return err + } + } + } return nil } // Delete processes a bucket for which bucket request is deleted func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { klog.V(3).Infof("Delete BucketClaim %v", - "name", bucketClaim.Name, - "ns", bucketClaim.Namespace) + "name", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace) return nil } @@ -93,50 +99,82 @@ func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1. // ErrBucketAlreadyExists - BucketClaim already processed // non-nil err - Internal error [requeue'd with exponential backoff] func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { - bucketClassName := b.getBucketClass(bucketClaim) - bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) - if err != nil { - klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) - return util.ErrInvalidBucketClass - } - if bucketClaim.Status.BucketReady { return util.ErrBucketAlreadyExists } - name = bucketClassName + string(bucketClaim.GetUID()) - - // create bucket - bucket := &v1alpha1.Bucket{} - bucket.Name = name - bucket.Status.BucketReady = false - bucket.Spec.DriverName = bucketClass.DriverName - bucket.Spec.BucketClassName = bucketClassName - bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy - bucket.Spec.BucketClaim = &v1.ObjectReference{ - Name: bucketClaim.Name, - Namespace: bucketClaim.Namespace, - UID: bucketClaim.ObjectMeta.UID, + var bucketName string + + if bucketClaim.Spec.ExistingBucketName != "" { + bucketName = bucketClaim.Spec.ExistingBucketName + bucket, err = b.Buckets().Get(ctx, bucketName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Get Bucket with ExistingBucketName error", "name", existingBucketName) + return err + } + + bucket.Spec.BucketClaim = &v1.ObjectReference{ + Name: bucketClaim.ObjectMeta.Name, + Namespace: bucketClaim.ObjectMeta.Namespace, + UID: bucketClaim.ObjectMeta.UID, + } + + _, err = b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if err != nil { + return err + } + + bucketClaim.Status.BucketName = bucketName + bucketClaim.Status.BucketAvailable = true + } else { + bucketClassName := b.getBucketClass(bucketClaim) + bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) + return util.ErrInvalidBucketClass + } + + bucketName = bucketClassName + string(bucketClaim.ObjectMeta.UID) + + // create bucket + bucket := &v1alpha1.Bucket{} + bucket.Name = bucketName + bucket.Spec.DriverName = bucketClass.DriverName + bucket.Status.BucketReady = false + bucket.Spec.BucketClassName = bucketClassName + bucket.Spec.DeletionPolicy = bucketClass.DeletionPolicy + bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) + + bucket.Spec.BucketClaim = &v1.ObjectReference{ + Name: bucketClaim.ObjectMeta.Name, + Namespace: bucketClaim.ObjectMeta.Namespace, + UID: bucketClaim.ObjectMeta.UID, + } + + bucket.Spec.Protocols = *bucketClaim.Spec.Protocol.DeepCopy() + bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) + if err != nil && !errors.IsAlreadyExists(err) { + klog.ErrorS(err, "name", bucketName) + return err + } + + bucketClaim.Status.BucketName = bucketName + bucketClaim.Status.BucketAvailable = false } - bucket.Spec.Protocols = *bucketClass.Protocol.DeepCopy() - bucket.Spec.Parameters = util.CopySS(bucketClass.Parameters) - bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) - if err != nil && !errors.IsAlreadyExists(err) { - klog.ErrorS(err, "name", bucket.Name) + _, err = b.BucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + if err != nil { return err } - // controllerutil.AddFinalizer(bucketClaim, finalizer) - - bucketClaim.Status.BucketName = bucket.Name - bucketClaim.Status.BucketAvailable = false - _, err = b.BucketClaims(bucketClaim.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + // Add the finalizers so that bucketClaim is deleted + // only after the associated bucket is deleted. + controllerutil.AddFinalizer(bucketClaim, util.BucketClaimFinalizer) + _, err = b.BucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { return err } - - klog.Infof("Finished creating Bucket %v", bucket.Name) + klog.Infof("Finished creating Bucket %v", bucketName) return nil } diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go index d4a1e535..5636696d 100644 --- a/container-object-storage-interface-controller/pkg/util/const.go +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -4,6 +4,10 @@ import ( "errors" ) +const ( + BucketClaimFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" +) + var ( // Error codes that the central controller will return ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index ba6fa451..27fa9dc3 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -3,7 +3,6 @@ package util import ( "context" "encoding/json" - "errors" "fmt" "golang.org/x/time/rate" "os" @@ -228,65 +227,6 @@ func DeleteObjects(ctx context.Context, client bucketclientset.Interface, objs . } } -// CreateBucketRequest creates a bucket request object or return an existing bucket request object -// This is used by bucket request unit tests -func CreateBucketRequest(ctx context.Context, client bucketclientset.Interface, br *types.BucketRequest) (*types.BucketRequest, error) { - br, err := client.ObjectstorageV1alpha1().BucketRequests(br.Namespace).Create(ctx, br, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - br, err = client.ObjectstorageV1alpha1().BucketRequests(br.Namespace).Get(ctx, br.Name, metav1.GetOptions{}) - } - return br, err -} - -// CreateBucketAccessRequest creates a bucket access request object or return an existing bucket access request object -// This is used by bucket access request unit tests -func CreateBucketAccessRequest(ctx context.Context, client bucketclientset.Interface, bar *types.BucketAccessRequest) (*types.BucketAccessRequest, error) { - bar, err := client.ObjectstorageV1alpha1().BucketAccessRequests(bar.Namespace).Create(ctx, bar, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - bar, err = client.ObjectstorageV1alpha1().BucketAccessRequests(bar.Namespace).Get(ctx, bar.Name, metav1.GetOptions{}) - } - return bar, err -} - -// CreateBucketClass creates a bucket class object or return an existing bucket class object -// This is used by bucket request unit tests -func CreateBucketClass(ctx context.Context, client bucketclientset.Interface, bc *types.BucketClass) (*types.BucketClass, error) { - bc, err := client.ObjectstorageV1alpha1().BucketClasses().Create(ctx, bc, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - bc, err = client.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bc.Name, metav1.GetOptions{}) - } - return bc, err -} - -// CreateBucketAccessClass creates a bucket access class object or return an existing bucket access class object -// This is used by bucket request unit tests -func CreateBucketAccessClass(ctx context.Context, client bucketclientset.Interface, bac *types.BucketAccessClass) (*types.BucketAccessClass, error) { - bac, err := client.ObjectstorageV1alpha1().BucketAccessClasses().Create(ctx, bac, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - bac, err = client.ObjectstorageV1alpha1().BucketAccessClasses().Get(ctx, bac.Name, metav1.GetOptions{}) - } - return bac, err -} - -// CreateBucket creates a bucket object or return an existing bucket object -// This is used by bucket request unit tests -func CreateBucket(ctx context.Context, client bucketclientset.Interface, b *types.Bucket) (*types.Bucket, error) { - b, err := client.ObjectstorageV1alpha1().Buckets().Create(ctx, b, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - b, err = client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) - } - return b, err -} - -// CreateBucketAccess creates a bucket access object or return an existing bucket access object -// This is used by bucket access request unit tests -func CreateBucketAccess(ctx context.Context, client bucketclientset.Interface, ba *types.BucketAccess) (*types.BucketAccess, error) { - ba, err := client.ObjectstorageV1alpha1().BucketAccesses().Create(ctx, ba, metav1.CreateOptions{}) - if (err != nil) && apierrors.IsAlreadyExists(err) { - ba, err = client.ObjectstorageV1alpha1().BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) - } - return ba, err -} // getCRDClient returns CRD interface for managing CRD objects programmatically // Used by unit tests and functional tests From d4075d3bc4b8049c38dbd7eb003347691903ab36 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 4 Aug 2022 09:44:30 -0700 Subject: [PATCH 198/299] Adding Update and Delete logic for Bucket and BucketAccess --- .../pkg/bucket/bucket_controller.go | 139 +++++++++++------- .../bucketaccess/bucketaccess_controller.go | 114 ++++++++------ 2 files changed, 149 insertions(+), 104 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 68ab069d..29ac1209 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -36,7 +36,7 @@ import ( ) const ( - brFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" + bcFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" ) // BucketListener manages Bucket objects @@ -67,74 +67,83 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucket := inputBucket.DeepCopy() klog.V(3).InfoS("Add Bucket", - "name", bucket.Name, + "name", bucket.ObjectMeta.Name, "bucketclass", bucket.Spec.BucketClassName, ) if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for driver", - "bucket", bucket.Name, + "bucket", bucket.ObjectMeta.Name, "driver", bucket.Spec.DriverName, ) return nil } - if bucket.Status.BucketAvailable { + if bucket.Status.BucketReady { klog.V(5).InfoS("BucketExists", - "bucket", bucket.Name, + "bucket", bucket.ObjectMeta.Name, "driver", bucket.Spec.DriverName, ) - return nil - } - req := &cosi.DriverCreateBucketRequest{ - Parameters: bucket.Spec.Parameters, - Name: bucket.Name, + return nil } - rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) - if err != nil { - if status.Code(err) != codes.AlreadyExists { - klog.ErrorS(err, "Failed to create bucket", - "bucket", bucket.Name) - return errors.Wrap(err, "Failed to create bucket") + if bucket.Spec.ExistingBucketID != nil { + bucket.Status.BucketReady = true + bucket.Status.BucketID = bucket.Spec.ExistingBucketID + } else { + req := &cosi.DriverCreateBucketRequest{ + Parameters: bucket.Spec.Parameters, + Name: bucket.ObjectMeta.Name, } - } - if rsp == nil { - err := errors.New("DriverCreateBucket returned a nil response") - klog.ErrorS(err, "Internal Error") - return err - } - - if rsp.BucketId != "" { - bucket.Status.BucketID = rsp.BucketId - } + rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) + if err != nil { + if status.Code(err) != codes.AlreadyExists { + klog.ErrorS(err, "Failed to create bucket", + "bucket", bucket.ObjectMeta.Name) + return errors.Wrap(err, "Failed to create bucket") + } - bucket.Status.BucketReady = true + } - // if this step fails, then controller will retry with backoff - if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucket status", - "bucket", bucket.Name) - return errors.Wrap(err, "Failed to update bucket status") - } + if rsp == nil { + err = errors.New("DriverCreateBucket returned a nil response") + klog.ErrorS(err, "Internal Error") + return err + } - // Now we update the BucketReady status of BucketClaim - if bucket.Spec.BucketClaim != nil { - ref := bucket.Spec.BucketClaim - bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) - if err != nil { + if rsp.BucketId != "" { + bucket.Status.BucketID = rsp.BucketId + bucket.Status.BucketReady = true + } else { + err = errors.New("DriverCreateBucket returned an empty bucketID") return err } - bucketClaim.Status.BucketReady = true - if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { - return err + // Now we update the BucketReady status of BucketClaim + if bucket.Spec.BucketClaim != nil { + ref := bucket.Spec.BucketClaim + bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + bucketClaim.Status.BucketReady = true + if _, err = b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + return err + } } } + // if this step fails, then controller will retry with backoff + if _, err = b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucket status", + "bucket", bucket.ObjectMeta.Name) + return errors.Wrap(err, "Failed to update bucket status") + } + return nil } @@ -146,6 +155,23 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) klog.V(3).InfoS("Update Bucket", "name", old.Name) + if !new.GetDeletionTimestamp.IsZero() { + if len(new.ObjectMeta.Finalizers) > 0 { + bucketClaimNs := new.Spec.BucketClaim.Namespace + bucketClaimName := new.Spec.BucketClaim.Name + bucketAccessList, err := b.BucketAccesses(bucketClaimNs).List(ctx, ListOptions{}) + + for _, bucketAccess := range bucketAccessList.Items { + if strings.EqualFold(bucketAccess.Spec.BucketClaimName, bucketClaimName) { + err = b.BucketAccesses(bucketClaimNs).Delete(ctx, bucketAccess.Name, metav1.DeleteOptions{}) + if err != nil { + return err + } + } + } + } + } + return nil } @@ -157,13 +183,13 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke bucket := inputBucket.DeepCopy() klog.V(3).InfoS("Delete Bucket", - "name", bucket.Name, + "name", bucket.ObjectMeta.Name, "bucketclass", bucket.Spec.BucketClassName, ) if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for provisiner", - "bucket", bucket.Name, + "bucket", bucket.ObjectMeta.Name, "driver", bucket.Spec.DriverName, ) return nil @@ -179,23 +205,13 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { klog.ErrorS(err, "Failed to delete bucket", - "bucket", bucket.Name, + "bucket", bucket.ObjectMeta.Name, ) return err } } } - bucket.Status.BucketAvailable = false - bucket.Status.BucketID = "" - - // if this step fails, then controller will retry with backoff - if _, err := b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucket", - "bucket", bucket.Name) - return errors.Wrap(err, "Failed to update bucket") - } - if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) @@ -203,9 +219,10 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke return err } - controllerutil.RemoveFinalizer(bucketClaim, brFinalizer) - if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { - return err + if controllerutil.RemoveFinalizer(bucketClaim, bcFinalizer) { + if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + return err + } } } @@ -227,6 +244,14 @@ func (b *BucketListener) BucketClaims(namespace string) bucketapi.BucketClaimInt panic ("uninitialized listener") } + +func (b *BucketListener) BucketAccesses(namespace string) bucketapi.BucketAccessInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketAccesses(namespace) + } + panic("uninitialized listener") +} + // InitializeKubeClient initializes the kubernetes client func (b *BucketListener) InitializeKubeClient(k kube.Interface) { b.kubeClient = k diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 98556234..aa6da435 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -41,8 +41,9 @@ import ( ) const ( - Credentials = "Credentials" - barFinalizer = "cosi.objectstorage.k8s.io/bucketaccessrequest-protection" + accountNamePrefix = "ba-" + baFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection-" + secretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" ) // BucketAccessListener manages Bucket objects @@ -57,11 +58,6 @@ type BucketAccessListener struct { // NewBucketAccessListener returns a resource handler for BucketAccess objects func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { - ns := os.Getenv("POD_NAMESPACE") - if ns == "" { - return nil, errors.New("POD_NAMESPACE env var cannot be empty") - } - return &BucketAccessListener{ driverName: driverName, provisionerClient: client, @@ -75,15 +71,20 @@ func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) ( func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { bucketAccess := inputBucketAccess.DeepCopy() + if bucketAccess.Status.AccessGranted && bucketAccess.Status.AccountID != nil { + klog.V(3).InfoS("BucketAccess already exists", bucketAccess.ObjectMeta.Name) + return nil + } + bucketClaimName := bucketAccess.Spec.BucketClaimName klog.V(3).InfoS("Add BucketAccess", - "name", bucketAccess.Name, + "name", bucketAccess.ObjectMeta.Name, "bucketClaim", bucketClaimName, ) bucketAccessClassName := bucketAccess.Spec.BucketAccessClassName klog.V(3).InfoS("Add BucketAccess", - "name", bucketAccess.Name, + "name", bucketAccess.ObjectMeta.Name, "BucketAccessClassName", bucketAccessClassName, ) @@ -103,7 +104,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } - namespace := bucketAccess.Namespace + namespace := bucketAccess.ObjectMeta.Namespace bucketClaim, err := bal.BucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) if err != nil { klog.ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) @@ -112,11 +113,11 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { - err := errors.New("BucketName cannot be empty or BucketNotReady") + err := errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") klog.ErrorS(err, "Invalid arguments", "bucketClaim", bucketClaim.Name, - "bucketAccess", bucketAccess.Name, + "bucketAccess", bucketAccess.ObjectMeta.Name, ) return errors.Wrap(err, "Invalid arguments") } @@ -128,8 +129,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { - klog.V(5).InfoS("Skipping bucketaccess for provisiner", - "bucketAccess", bucketAccess.Name, + klog.V(5).InfoS("Skipping bucketaccess for driver", + "bucketAccess", bucketAccess.ObjectMeta.Name, "driver", bucketAccessClass.DriverName, ) return nil @@ -138,7 +139,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if bucketAccess.Status.AccessGranted == true { klog.V(5).InfoS("AccessAlreadyGranted", - "bucketAccess", bucketAccess.Name, + "bucketAccess", bucketAccess.ObjectMeta.Name, "bucketClaim", bucketClaimName, ) return nil @@ -154,7 +155,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } - accountName := "ba-" + bucketAccess.UID + accountName := accountNamePrefix + string(bucketAccess.UID) req := &cosi.DriverGrantBucketAccessRequest{ BucketId: bucket.Status.BucketID, @@ -169,21 +170,26 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if status.Code(err) != codes.AlreadyExists { klog.ErrorS(err, "Failed to grant access", - "bucketAccess", bucketAccess.Name, - "bucket", bucket.Name, + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucketClaim", bucketClaimName, ) return errors.Wrap(err, "failed to grant access") } } + if rsp.AccountId == nil { + klog.ErrorS("AccountId not defined in DriverGrantBucketAccess") + return errors.New("Failed to grant access. AccountId not defined in DriverGrantBucketAccess.") + } + bucketInfo := cosiapi.BucketInfo { ObjectMeta: metav1.ObjectMeta { - name: , + name: secretCredName, }, BucketInfoSpec: cosiapi.BucketInfoSpec { - BucketName: , - AuthenticationType: , + BucketName: bucket.ObjectMeta.Name, + AuthenticationType: bucketAccess.Spec.AuthenticationType, Endpoint: , Region: , Protocol: , @@ -199,8 +205,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if !kubeerrors.IsNotFound(err) { klog.ErrorS(err, "Failed to create secrets", - "bucketAccess", bucketAccess.Name, - "bucket", bucket.Name) + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "failed to fetch secrets") } @@ -208,6 +214,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a ObjectMeta: metav1.ObjectMeta{ Name: secretCredName, Namespace: namespace, + Finalizers: []string{secretFinalizer}, }, StringData: map[string]string{ BucketInfo: string(stringData), @@ -217,25 +224,30 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if !kubeerrors.IsAlreadyExists(err) { klog.ErrorS(err, "Failed to create minted secret", - "bucketAccess", bucketAccess.Name, - "bucket", bucket.Name) + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to create minted secret") } } } - bucketAccess.Status.AccountID = rsp.AccountId - bucketAccess.Status.MintedSecret = &corev1.SecretReference{ - Namespace: bal.namespace, - Name: secretCredName, + bucketFinalizer := baFinalizer + string(bucketAccess.ObjectMeta.UID) + finalizers := bucket.ObjectMeta.Finalizers + finalizers = append(finalizers, bucketFinalizer) + bucket.ObjectMeta.Finalizers = finalizers + _, err = bal.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if err != nil { + return err } + + bucketAccess.Status.AccountID = rsp.AccountId bucketAccess.Status.AccessGranted = true // if this step fails, then controller will retry with backoff if _, err := bal.BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update BucketAccess Status", - "bucketAccess", bucketAccess.Name, - "bucket", bucket.Name) + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to update BucketAccess Status") } @@ -248,7 +260,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a // non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Update BucketAccess", - "name", old.Name) + "name", old.ObjectMeta.Name) return nil } @@ -259,30 +271,38 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. // non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Delete BucketAccess", - "name", bucketAccess.Name, + "name", bucketAccess.ObjectMeta.Name, "bucket", bucketAccess.Spec.BucketName, ) - // TODO, check bucketAccess.Spec.DeletionPolicy - - bucketAccess.Status.AccessGranted = false - - // if this step fails, then controller will retry with backoff - if _, err := bal.BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update BucketAccess Status", - "bucketAccess", bucketAccess.Name) - return errors.Wrap(err, "Failed to update BucketAccess Status") + credSecretName := bucketAccess.Spec.CredentialsSecretName + secret, err := bal.Secrets(bucketAccess.ObjectMeta.Namespace).Get(ctx, credSecretName, metav1.GetOptions{}) + if err != nil { + return err } - if bucketAccess.Spec.BucketAccessRequest != nil { - ref := bucketAccess.Spec.BucketAccessRequest - bucketAccessRequest, err := bal.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if controllerutil.RemoveFinalizer(secret, secretFinalizer) { + _, err = bal.Secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, credSecretName, metav1.UpdateOptions{}) if err != nil { return err } + } - controllerutil.RemoveFinalizer(bucketAccessRequest, barFinalizer) - if _, err := bal.bucketClient.ObjectstorageV1alpha1().BucketAccessRequests(bucketAccessRequest.Namespace).Update(ctx, bucketAccessRequest, metav1.UpdateOptions{}); err != nil { + bucketClaimName = bucketAccess.Spec.BucketClaimName + bucketClaim, err := bal.BucketClaims(bucketAccess.ObjectMeta.Namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) + if err != nil { + return err + } + + bucket, err := bal.Buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) + if err != nil { + return err + } + + bucketFinalizer := baFinalizer + string(bucketAccess.ObjectMeta.UID) + if controllerutil.RemoveFinalizer(bucketFinalizer) { + _, err = bal.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if err != nil { return err } } From de22fb1ba1585ba48c80021519712c64a31c75cd Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 4 Aug 2022 10:01:30 -0700 Subject: [PATCH 199/299] Introducing the const pkg --- .../pkg/bucket/bucket_controller.go | 9 +++----- .../bucketaccess/bucketaccess_controller.go | 17 +++++--------- .../pkg/const/const.go | 23 +++++++++++++++++++ 3 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 container-object-storage-interface-provisioner-sidecar/pkg/const/const.go diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 29ac1209..e6dfaa20 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -27,6 +27,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/const" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -35,10 +36,6 @@ import ( "google.golang.org/grpc/status" ) -const ( - bcFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" -) - // BucketListener manages Bucket objects type BucketListener struct { provisionerClient cosi.ProvisionerClient @@ -155,7 +152,7 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) klog.V(3).InfoS("Update Bucket", "name", old.Name) - if !new.GetDeletionTimestamp.IsZero() { + if !new.GetDeletionTimestamp().IsZero() { if len(new.ObjectMeta.Finalizers) > 0 { bucketClaimNs := new.Spec.BucketClaim.Namespace bucketClaimName := new.Spec.BucketClaim.Name @@ -219,7 +216,7 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke return err } - if controllerutil.RemoveFinalizer(bucketClaim, bcFinalizer) { + if controllerutil.RemoveFinalizer(bucketClaim, const.BcFinalizer) { if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { return err } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index aa6da435..891f86a6 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -33,6 +33,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/const" cosi "sigs.k8s.io/container-object-storage-interface-spec" "github.com/pkg/errors" @@ -40,12 +41,6 @@ import ( "google.golang.org/grpc/status" ) -const ( - accountNamePrefix = "ba-" - baFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection-" - secretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" -) - // BucketAccessListener manages Bucket objects type BucketAccessListener struct { provisionerClient cosi.ProvisionerClient @@ -155,7 +150,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } - accountName := accountNamePrefix + string(bucketAccess.UID) + accountName := const.AccountNamePrefix + string(bucketAccess.UID) req := &cosi.DriverGrantBucketAccessRequest{ BucketId: bucket.Status.BucketID, @@ -214,7 +209,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a ObjectMeta: metav1.ObjectMeta{ Name: secretCredName, Namespace: namespace, - Finalizers: []string{secretFinalizer}, + Finalizers: []string{const.SecretFinalizer}, }, StringData: map[string]string{ BucketInfo: string(stringData), @@ -231,7 +226,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } } - bucketFinalizer := baFinalizer + string(bucketAccess.ObjectMeta.UID) + bucketFinalizer := const.BaFinalizer + string(bucketAccess.ObjectMeta.UID) finalizers := bucket.ObjectMeta.Finalizers finalizers = append(finalizers, bucketFinalizer) bucket.ObjectMeta.Finalizers = finalizers @@ -281,7 +276,7 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp return err } - if controllerutil.RemoveFinalizer(secret, secretFinalizer) { + if controllerutil.RemoveFinalizer(secret, const.SecretFinalizer) { _, err = bal.Secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, credSecretName, metav1.UpdateOptions{}) if err != nil { return err @@ -299,7 +294,7 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp return err } - bucketFinalizer := baFinalizer + string(bucketAccess.ObjectMeta.UID) + bucketFinalizer := const.BaFinalizer + string(bucketAccess.ObjectMeta.UID) if controllerutil.RemoveFinalizer(bucketFinalizer) { _, err = bal.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) if err != nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/const/const.go b/container-object-storage-interface-provisioner-sidecar/pkg/const/const.go new file mode 100644 index 00000000..12aa28ea --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/pkg/const/const.go @@ -0,0 +1,23 @@ +/* Copyright 2022 The Kubernetes Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package const + +const ( + AccountNamePrefix = "ba-" + BaFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection-" + BcFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" + SecretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" +) From 95fc3e1ed0c8c1a1eb3fa960c543e7176cfdba51 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 5 Aug 2022 01:06:54 -0700 Subject: [PATCH 200/299] Updating the go mod and go sum and fixing compilation --- .../go.mod | 94 +- .../go.sum | 843 +++++++++++------- .../pkg/bucketclaim/bucketclaim.go | 63 +- .../pkg/bucketclaim/bucketclaim_test.go | 20 +- .../pkg/util/const.go | 13 +- .../pkg/util/util.go | 281 +----- 6 files changed, 653 insertions(+), 661 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index b73dc9e3..4470f16f 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -1,34 +1,76 @@ module sigs.k8s.io/container-object-storage-interface-controller -go 1.15 +go 1.18 require ( - github.com/google/go-cmp v0.5.2 // indirect - github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect - github.com/kr/text v0.2.0 // indirect + github.com/spf13/cobra v1.4.0 + github.com/spf13/viper v1.12.0 + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 + k8s.io/api v0.24.2 + k8s.io/apiextensions-apiserver v0.24.2 + k8s.io/apimachinery v0.24.2 + k8s.io/client-go v0.24.2 + k8s.io/klog/v2 v2.70.1 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e + sigs.k8s.io/controller-runtime v0.12.3 + sigs.k8s.io/controller-tools v0.9.2 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/go-logr/logr v1.2.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/gobuffalo/flect v0.2.5 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/smartystreets/assertions v1.1.1 // indirect - github.com/spf13/cobra v1.1.1 - github.com/spf13/viper v1.7.1 - github.com/stretchr/testify v1.6.1 // indirect - golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect - golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect - golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect - golang.org/x/text v0.3.4 // indirect - golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.3.0 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/tools v0.1.10 // indirect + golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect - gopkg.in/ini.v1 v1.57.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect - k8s.io/api v0.19.4 - k8s.io/apiextensions-apiserver v0.19.4 - k8s.io/apimachinery v0.19.4 - k8s.io/client-go v0.19.4 - k8s.io/klog/v2 v2.4.0 - k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d - sigs.k8s.io/controller-runtime v0.6.3 - sigs.k8s.io/controller-tools v0.4.1 + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0 // indirect + k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index b42a8434..bab02282 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -3,253 +3,265 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= 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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.12 h1:OO9WrvhDwtiMY/Opr1j1iFZzirI3JW4/bxNFRcntAr4= -github.com/go-openapi/spec v0.19.12/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.11 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= -github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.5 h1:H6vvsv2an0lalEaCDRThvtBfmg44W/QHXBCYUXf/6S4= +github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f h1:4Gslotqbs16iAg+1KR/XdabIfq8TlAWHdwS5QJFksLc= -github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -265,8 +277,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -275,55 +285,51 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/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/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-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= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -335,46 +341,54 @@ 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/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= -github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 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 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -383,8 +397,10 @@ github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prY github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -393,117 +409,145 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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 v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/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/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= -github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -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/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -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.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -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= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= -golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -514,19 +558,26 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -534,40 +585,73 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/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-20200520182314-0ba52f642ac2/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-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= -golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -575,58 +659,91 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -636,42 +753,90 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e h1:Z2uDrs8MyXUWJbwGc4V+nGjV4Ygo+oubBbWSVQw21/I= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -681,20 +846,67 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -703,24 +915,27 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -729,86 +944,66 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD 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.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= -k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= -k8s.io/apiextensions-apiserver v0.19.4 h1:D9ak9T012tb3vcGFWYmbQuj9SCC8YM4zhA4XZqsAQC4= -k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= -k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= -k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/apiserver v0.19.4/go.mod h1:X8WRHCR1UGZDd7HpV0QDc1h/6VbbpAeAGyxSh8yzZXw= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= -k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= +k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= +k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= +k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= +k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= +k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= +k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= +k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= +k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 h1:yEQKdMCjzAOvGeiTwG4hO/hNVNtDOuUFvMUZ0OlaIzs= +k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8/go.mod h1:mbJ+NSUoAhuR14N0S63bPkh8MGVSo3VYSGZtH/mfMe0= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d h1:4UhPuhdrRuoGmjbrpSBWPP+kT83zj9yBu66mXQLyuQA= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19 h1:LrLrBCBqO7O/VjJtTrDSj3/f7hLSQaCIouLZFnHGxFg= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= -sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= -sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= -sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w= -sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e h1:FMupf2xGqbZaE89eeF0gUKbm82wzRpd2u9atmyuajIw= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= +sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= +sigs.k8s.io/controller-tools v0.9.2 h1:AkTE3QAdz9LS4iD3EJvHyYxBkg/g9fTbgiYsrcsFCcM= +sigs.k8s.io/controller-tools v0.9.2/go.mod h1:NUkn8FTV3Sad3wWpSK7dt/145qfuQ8CKJV6j4jHC5rM= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -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/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index efe27d3b..9eb33c42 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -10,9 +10,9 @@ import ( "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" + objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) @@ -33,7 +33,6 @@ func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace, "bucketClass", bucketClaim.Spec.BucketClassName, - "bucketPrefix", bucketClaim.Spec.BucketPrefix, ) err := b.provisionBucketClaimOperation(ctx, bucketClaim) @@ -71,10 +70,12 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc "name", old.Name, "ns", old.Namespace) + bucketClaim := new.DeepCopy() + if !new.GetDeletionTimestamp().IsZero() { if controllerutil.ContainsFinalizer(bucketClaim, util.BucketClaimFinalizer) { bucketName := bucketClaim.Status.BucketName - err := b.Buckets().Delete(ctx, bucketName, metav1.DeleteOptions{}) + err := b.buckets().Delete(ctx, bucketName, metav1.DeleteOptions{}) if err != nil { return err } @@ -104,12 +105,13 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, } var bucketName string + var err error if bucketClaim.Spec.ExistingBucketName != "" { bucketName = bucketClaim.Spec.ExistingBucketName - bucket, err = b.Buckets().Get(ctx, bucketName, metav1.GetOptions{}) + bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Get Bucket with ExistingBucketName error", "name", existingBucketName) + klog.ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) return err } @@ -119,16 +121,20 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, UID: bucketClaim.ObjectMeta.UID, } - _, err = b.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) if err != nil { return err } bucketClaim.Status.BucketName = bucketName - bucketClaim.Status.BucketAvailable = true + bucketClaim.Status.BucketReady = true } else { - bucketClassName := b.getBucketClass(bucketClaim) - bucketClass, err := b.BucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) + bucketClassName := bucketClaim.Spec.BucketClassName + if bucketClassName == "" { + return util.ErrInvalidBucketClass + } + + bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if err != nil { klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) return util.ErrInvalidBucketClass @@ -151,18 +157,21 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, UID: bucketClaim.ObjectMeta.UID, } - bucket.Spec.Protocols = *bucketClaim.Spec.Protocol.DeepCopy() - bucket, err = b.Buckets().Create(ctx, bucket, metav1.CreateOptions{}) + protocolCopy := make([]v1alpha1.Protocol, len(bucketClaim.Spec.Protocols)) + copy(protocolCopy, bucketClaim.Spec.Protocols) + + bucket.Spec.Protocols = protocolCopy + bucket, err = b.buckets().Create(ctx, bucket, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { klog.ErrorS(err, "name", bucketName) return err } bucketClaim.Status.BucketName = bucketName - bucketClaim.Status.BucketAvailable = false + bucketClaim.Status.BucketReady = false } - _, err = b.BucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { return err } @@ -170,7 +179,7 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, // Add the finalizers so that bucketClaim is deleted // only after the associated bucket is deleted. controllerutil.AddFinalizer(bucketClaim, util.BucketClaimFinalizer) - _, err = b.BucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) + _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { return err } @@ -178,22 +187,6 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, return nil } -// getBucketClass returns BucketClassName. If no bucket class was in the request it returns empty -// TODO this methods can be more sophisticate to address bucketClass overrides using annotations just like SC. -func (b *bucketClaimListener) getBucketClass(bucketClaim *v1alpha1.BucketClaim) string { - if bucketClaim.Spec.BucketClassName != "" { - return bucketClaim.Spec.BucketClassName - } - - return "" -} - -// cloneTheBucket clones a bucket to a different namespace when a BR is for brownfield. -func (b *bucketClaimListener) cloneTheBucket(bucketClaim *v1alpha1.BucketClaim) error { - klog.InfoS("Cloning Bucket", "name", bucketClaim.Status.BucketName) - return util.ErrNotImplemented -} - func (b *bucketClaimListener) InitializeKubeClient(k kubeclientset.Interface) { b.kubeClient = k } @@ -202,21 +195,21 @@ func (b *bucketClaimListener) InitializeBucketClient(bc bucketclientset.Interfac b.bucketClient = bc } -func (b *bucketClaimListener) Buckets() objectstoragev1alpha1.BucketInterface { +func (b *bucketClaimListener) buckets() objectstoragev1alpha1.BucketInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().Buckets() } panic("uninitialized listener") } -func (b *bucketClaimListener) BucketClasses() objectstoragev1alpha1.BucketClassInterface { +func (b *bucketClaimListener) bucketClasses() objectstoragev1alpha1.BucketClassInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() } panic("uninitialized listener") } -func (b *bucketClaimListener) BucketClaims(namespace string) objectstoragev1alpha1.BucketClaimInterface { +func (b *bucketClaimListener) bucketClaims(namespace string) objectstoragev1alpha1.BucketClaimInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) } diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 27084b7c..83cbcedb 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -7,8 +7,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/fake" - types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) @@ -26,15 +26,9 @@ var goldClass = types.BucketClass{ ObjectMeta: metav1.ObjectMeta{ Name: "classgold", }, - AllowedNamespaces: []string{"default", "cosins"}, - Parameters: classGoldParameters, - Protocol: types.Protocol{ - S3: &types.S3Protocol{ - Region: "us-east-1", - SignatureVersion: "S3V4", - }, - }, - IsDefaultBucketClass: false, + DriverName: "sample.cosi.driver", + Parameters: classGoldParameters, + DeletionPolicy: types.DeletionPolicyDelete, } var bucketClaim1 = types.BucketClaim{ @@ -48,8 +42,8 @@ var bucketClaim1 = types.BucketClaim{ UID: "12345-67890", }, Spec: types.BucketClaimSpec{ - BucketPrefix: "cosi", BucketClassName: "classgold", + Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolS3}, }, } @@ -64,8 +58,8 @@ var bucketClaim2 = types.BucketClaim{ UID: "abcde-fghijk", }, Spec: types.BucketClaimSpec{ - BucketPrefix: "cosi", BucketClassName: "classgold", + Protocols: []types.Protocol{types.ProtocolAzure, types.GCS}, }, } diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go index 5636696d..3557ac07 100644 --- a/container-object-storage-interface-controller/pkg/util/const.go +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -10,14 +10,7 @@ const ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket request") - ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket request") - ErrBucketAccessAlreadyExists = errors.New("A bucket access already existing that matches the bucket access request") - ErrInvalidBucketAccessClass = errors.New("Cannot find bucket access class with the name specified in the bucket access request") - ErrInvalidBucketRequest = errors.New("Invalid bucket request specified in the bucket access request") - ErrInvalidBucketAccessRequest = errors.New("Invalid bucket access request specified") - ErrWaitForBucketProvisioning = errors.New("Bucket instance specified in the bucket request is not available to provision bucket access") - ErrBCUnavailable = errors.New("BucketClass is not available") + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket claim") + ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket claim") ErrNotImplemented = errors.New("Operation Not Implemented") - ErrNilConfigMap = errors.New("ConfigMap cannot be nil") -) \ No newline at end of file +) diff --git a/container-object-storage-interface-controller/pkg/util/util.go b/container-object-storage-interface-controller/pkg/util/util.go index 27fa9dc3..cdbfe18b 100644 --- a/container-object-storage-interface-controller/pkg/util/util.go +++ b/container-object-storage-interface-controller/pkg/util/util.go @@ -2,34 +2,14 @@ package util import ( "context" - "encoding/json" - "fmt" - "golang.org/x/time/rate" - "os" "reflect" - "strings" "time" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensions "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/uuid" - kubeclientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/workqueue" - types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset" - "sigs.k8s.io/container-object-storage-interface-api/controller" - - "sigs.k8s.io/controller-tools/pkg/crd" - crdmarkers "sigs.k8s.io/controller-tools/pkg/crd/markers" - "sigs.k8s.io/controller-tools/pkg/genall" - "sigs.k8s.io/controller-tools/pkg/loader" - "sigs.k8s.io/controller-tools/pkg/markers" + types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" "k8s.io/klog/v2" ) @@ -45,86 +25,6 @@ func CopySS(m map[string]string) map[string]string { return copy } -func CopyStrings(s []string) []string { - if s == nil { - return nil - } - c := make([]string, len(s)) - copy(c, s) - return c -} - -func GetUUID() string { - return string(uuid.NewUUID()) -} - -func ReadConfigData(kubeClient kubeclientset.Interface, configMapRef *v1.ObjectReference) (string, error) { - if configMapRef == nil { - return "", ErrNilConfigMap - } - configMap, err := kubeClient.CoreV1().ConfigMaps(configMapRef.Namespace).Get(context.TODO(), configMapRef.Name, metav1.GetOptions{}) - if err != nil { - return "", err - } - payload := make(map[string]string) - for name, data := range configMap.Data { - payload[name] = data - } - cData, err := json.Marshal(payload) - if err != nil { - return "", err - } - return string(cData), nil -} - -// SetupTest is utility function to create clients and controller -// This is used by bucket request and bucket access request unit tests -func SetupTest(ctx context.Context) (bucketclientset.Interface, kubeclientset.Interface, *controller.ObjectStorageController) { - - // Initialize the clients - config, err := func() (*rest.Config, error) { - kubeConfig := os.Getenv("KUBECONFIG") - if kubeConfig != "" { - return clientcmd.BuildConfigFromFlags("", kubeConfig) - } - return rest.InClusterConfig() - }() - if err != nil { - klog.Fatalf("Failed to create clients: %v", err) - } - - kubeClient, err := kubeclientset.NewForConfig(config) - if err != nil { - klog.Fatalf("Failed to create Kubernetes client: %v", err) - } - client, err := bucketclientset.NewForConfig(config) - if err != nil { - klog.Fatalf("Failed to create ObjectStorage client: %v", err) - } - - crdClientset, err := apiextensions.NewForConfig(config) - if err != nil { - klog.Fatalf("Failed to create CRD client: %v", err) - } - - err = RegisterCRDs(ctx, crdClientset.CustomResourceDefinitions()) - if err != nil { - klog.Fatalf("Failed to register CRDs: %v", err) - } - - rateLimit := workqueue.NewMaxOfRateLimiter( - workqueue.NewItemExponentialFailureRateLimiter(100*time.Millisecond, 600*time.Second), - &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, - ) - ctrl, err := controller.NewObjectStorageControllerWithClientset("controller-manager", "leader-lock", 40, rateLimit, kubeClient, client) - if err != nil { - klog.Fatalf("Failed to create ObjectStorage Controller: %v", err) - } - - go ctrl.Run(ctx) - return client, kubeClient, ctrl -} - // GetBuckets will wait and fetch expected number of buckets created by the test // This is used by bucket request unit tests func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpected int) *types.BucketList { @@ -148,52 +48,16 @@ func GetBuckets(ctx context.Context, client bucketclientset.Interface, numExpect // Validates the content of the bucket against bucket request and backet class // This is used by bucket request unit tests -func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, bucketclass types.BucketClass) bool { - if strings.HasPrefix(bucket.Name, bucketrequest.Spec.BucketPrefix) && - bucketrequest.Status.BucketName == bucket.Name && - bucket.Spec.BucketClassName == bucketrequest.Spec.BucketClassName && - bucket.Spec.BucketRequest.Name == bucketrequest.Name && - bucket.Spec.BucketRequest.Namespace == bucketrequest.Namespace && - bucket.Spec.BucketRequest.UID == bucketrequest.ObjectMeta.UID && - bucket.Spec.BucketClassName == bucketclass.Name && - reflect.DeepEqual(bucket.Spec.Parameters, bucketclass.Parameters) && - bucket.Spec.Provisioner == bucketclass.Provisioner && - bucket.Spec.DeletionPolicy == bucketclass.DeletionPolicy { - return true - } - return false -} - -// Validates the content of the bucket against bucket request and backet class -// This is used by bucket access request unit tests -func GetBucketAccesses(ctx context.Context, client bucketclientset.Interface, numExpected int) *types.BucketAccessList { - bucketaccessList, _ := client.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) - if len(bucketaccessList.Items) > 0 { - return bucketaccessList - } - numtimes := 0 - for numtimes < 10 { - bucketaccessList, _ = client.ObjectstorageV1alpha1().BucketAccesses().List(ctx, metav1.ListOptions{}) - if len(bucketaccessList.Items) >= numExpected { - return bucketaccessList - } - numtimes++ - <-time.After(time.Duration(numtimes) * time.Second) - } - return &types.BucketAccessList{} -} - -// Validates the content of the bucket access against bucket access request and backet access class -// This is used by bucket access request unit tests -func ValidateBucketAccess(bucketaccess types.BucketAccess, bucketaccessrequest types.BucketAccessRequest, bucketaccessclass types.BucketAccessClass) bool { - if bucketaccess.Spec.BucketName != "" && - bucketaccessrequest.Status.BucketAccessName == bucketaccess.Name && - bucketaccess.Spec.BucketAccessRequest.UID == bucketaccessrequest.UID && - bucketaccess.Spec.ServiceAccount.Name == bucketaccessrequest.Spec.ServiceAccountName && - bucketaccess.Spec.PolicyActionsConfigMapData != "" { - return true - } - return false +func ValidateBucket(bucket types.Bucket, bucketClaim types.BucketClaim, bucketClass types.BucketClass) bool { + return (bucketClaim.Status.BucketName == bucket.ObjectMeta.Name && + bucket.Spec.BucketClassName == bucketClaim.Spec.BucketClassName && + bucket.Spec.BucketClaim.Name == bucketClaim.ObjectMeta.Name && + bucket.Spec.BucketClaim.Namespace == bucketClaim.ObjectMeta.Namespace && + bucket.Spec.BucketClaim.UID == bucketClaim.ObjectMeta.UID && + bucket.Spec.BucketClassName == bucketClass.ObjectMeta.Name && + reflect.DeepEqual(bucket.Spec.Parameters, bucketClass.Parameters) && + bucket.Spec.DriverName == bucketClass.DriverName && + bucket.Spec.DeletionPolicy == bucketClass.DeletionPolicy) } // Deletes any bucket api object or an array of bucket or bucket access objects. @@ -203,125 +67,36 @@ func DeleteObjects(ctx context.Context, client bucketclientset.Interface, objs . switch t := obj.(type) { case types.Bucket: client.ObjectstorageV1alpha1().Buckets().Delete(ctx, obj.(types.Bucket).Name, metav1.DeleteOptions{}) - case types.BucketRequest: - client.ObjectstorageV1alpha1().BucketRequests(obj.(types.BucketRequest).Namespace).Delete(ctx, obj.(types.BucketRequest).Name, metav1.DeleteOptions{}) + case types.BucketClaim: + client.ObjectstorageV1alpha1().BucketClaims(obj.(types.BucketClaim).Namespace).Delete(ctx, obj.(types.BucketClaim).Name, metav1.DeleteOptions{}) case types.BucketClass: client.ObjectstorageV1alpha1().BucketClasses().Delete(ctx, obj.(types.BucketClass).Name, metav1.DeleteOptions{}) case []types.Bucket: for _, a := range obj.([]types.Bucket) { DeleteObjects(ctx, client, a) } - case types.BucketAccess: - client.ObjectstorageV1alpha1().BucketAccesses().Delete(ctx, obj.(types.BucketAccess).Name, metav1.DeleteOptions{}) - case types.BucketAccessRequest: - client.ObjectstorageV1alpha1().BucketAccessRequests(obj.(types.BucketAccessRequest).Namespace).Delete(ctx, obj.(types.BucketAccessRequest).Name, metav1.DeleteOptions{}) - case types.BucketAccessClass: - client.ObjectstorageV1alpha1().BucketAccessClasses().Delete(ctx, obj.(types.BucketAccessClass).Name, metav1.DeleteOptions{}) - case []types.BucketAccess: - for _, a := range obj.([]types.BucketAccess) { - DeleteObjects(ctx, client, a) - } default: klog.Errorf("Unknown Obj of type %v", t) } } } - -// getCRDClient returns CRD interface for managing CRD objects programmatically -// Used by unit tests and functional tests -func getCRDClient() (apiextensions.CustomResourceDefinitionInterface, error) { - config, err := func() (*rest.Config, error) { - kubeConfig := os.Getenv("KUBECONFIG") - - if kubeConfig != "" { - return clientcmd.BuildConfigFromFlags("", kubeConfig) - } - return rest.InClusterConfig() - }() - - crdClientset, err := apiextensions.NewForConfig(config) - if err != nil { - klog.Fatalf("could not initialize crd client: %v", err) - return nil, err +// CreateBucketClaim creates a bucket claim object or return an existing bucket request object +// This is used by bucket claim unit tests +func CreateBucketClaim(ctx context.Context, client bucketclientset.Interface, bc *types.BucketClaim) (*types.BucketClaim, error) { + bc, err := client.ObjectstorageV1alpha1().BucketClaims(bc.Namespace).Create(ctx, bc, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + bc, err = client.ObjectstorageV1alpha1().BucketClaims(bc.Namespace).Get(ctx, bc.Name, metav1.GetOptions{}) } - return crdClientset.CustomResourceDefinitions(), err + return bc, err } -// RegisterCRDs registers the CRD so that unit tests can use the CRD to perform bucket API testing -func RegisterCRDs(ctx context.Context, client apiextensions.CustomResourceDefinitionInterface) error { - var err error - if client == nil { - client, err = getCRDClient() - } - if err != nil { - return err - } - - roots, err := loader.LoadRoots("sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1") - if err != nil { - return err - } - - defn := markers.Must(markers.MakeDefinition("crd", markers.DescribesPackage, crd.Generator{})) - optionsRegistry := &markers.Registry{} - if err := optionsRegistry.Register(defn); err != nil { - return err - } - - if err := genall.RegisterOptionsMarkers(optionsRegistry); err != nil { - return err - } - - if err := crdmarkers.Register(optionsRegistry); err != nil { - return err - } - - parser := &crd.Parser{ - Collector: &markers.Collector{ - Registry: optionsRegistry, - }, - Checker: &loader.TypeChecker{}, - } - crd.AddKnownTypes(parser) - for _, root := range roots { - parser.NeedPackage(root) - } - - metav1Pkg := crd.FindMetav1(roots) - if metav1Pkg == nil { - // no objects in the roots, since nothing imported metav1 - return fmt.Errorf("no objects found in all roots") - } - - // TODO: allow selecting a specific object - kubeKinds := crd.FindKubeKinds(parser, metav1Pkg) - if len(kubeKinds) == 0 { - // no objects in the roots - return fmt.Errorf("no kube kind-objects found in all roots") - } - - //crdClient := utils.GetCRDClient() - crdClient := client - - for groupKind := range kubeKinds { - parser.NeedCRDFor(groupKind, func() *int { - i := 256 - return &i - }()) - crdRaw := parser.CustomResourceDefinitions[groupKind] - klog.Infof("creating CRD: %v", groupKind) - if crdRaw.ObjectMeta.Annotations == nil { - crdRaw.ObjectMeta.Annotations = map[string]string{} - } - if _, ok := crdRaw.ObjectMeta.Annotations[apiextensionsv1.KubeAPIApprovedAnnotation]; !ok { - crdRaw.ObjectMeta.Annotations[apiextensionsv1.KubeAPIApprovedAnnotation] = "https://github.com/kubernetes/kubernetes/pull/78458" - } - if _, err := crdClient.Create(ctx, &crdRaw, metav1.CreateOptions{}); err != nil { - if !apierrors.IsAlreadyExists(err) { - return err - } - } +// CreateBucketClass creates a bucket class object or return an existing bucket class object +// This is used by bucket claim unit tests +func CreateBucketClass(ctx context.Context, client bucketclientset.Interface, bc *types.BucketClass) (*types.BucketClass, error) { + bc, err := client.ObjectstorageV1alpha1().BucketClasses().Create(ctx, bc, metav1.CreateOptions{}) + if (err != nil) && apierrors.IsAlreadyExists(err) { + bc, err = client.ObjectstorageV1alpha1().BucketClasses().Get(ctx, bc.Name, metav1.GetOptions{}) } - return nil + return bc, err } From 7f8bd628a052d4d906594080111c4ca8b02bf039 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 5 Aug 2022 09:48:25 -0700 Subject: [PATCH 201/299] Compilation fix --- .../pkg/bucketclaim/bucketclaim_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 83cbcedb..318be9f6 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -59,7 +59,7 @@ var bucketClaim2 = types.BucketClaim{ }, Spec: types.BucketClaimSpec{ BucketClassName: "classgold", - Protocols: []types.Protocol{types.ProtocolAzure, types.GCS}, + Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolGCP}, }, } From 3530ffedd4d3cc6ebd69c9e8c043aca535ecd307 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 5 Aug 2022 13:22:27 -0700 Subject: [PATCH 202/299] Fixing fo dfiles and gofmt --- .../go.mod | 9 +- .../go.sum | 289 ------------------ .../pkg/bucketclaim/bucketclaim_test.go | 8 +- .../pkg/util/const.go | 6 +- 4 files changed, 8 insertions(+), 304 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 4470f16f..1cbf4915 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -5,15 +5,12 @@ go 1.18 require ( github.com/spf13/cobra v1.4.0 github.com/spf13/viper v1.12.0 - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 k8s.io/api v0.24.2 - k8s.io/apiextensions-apiserver v0.24.2 k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e sigs.k8s.io/controller-runtime v0.12.3 - sigs.k8s.io/controller-tools v0.9.2 ) require ( @@ -25,14 +22,12 @@ require ( github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.15 // indirect - github.com/gobuffalo/flect v0.2.5 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -53,14 +48,12 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.3.0 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.10 // indirect - golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index bab02282..3da7cc83 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -28,7 +28,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -40,7 +39,6 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= @@ -51,39 +49,13 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -91,28 +63,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -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-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -123,13 +79,9 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= @@ -138,23 +90,15 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -166,18 +110,9 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/flect v0.2.5 h1:H6vvsv2an0lalEaCDRThvtBfmg44W/QHXBCYUXf/6S4= -github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -212,8 +147,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -253,36 +186,13 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.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/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -291,29 +201,16 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -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.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -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= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -321,50 +218,31 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/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.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -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/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -375,94 +253,40 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -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/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -471,30 +295,13 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -502,40 +309,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -561,7 +344,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -573,15 +355,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -589,7 +365,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -612,16 +387,12 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= @@ -637,7 +408,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= @@ -652,17 +422,11 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -671,11 +435,9 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -689,34 +451,24 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= @@ -737,30 +489,23 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -796,17 +541,11 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -858,10 +597,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -870,7 +607,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -882,9 +618,6 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -898,15 +631,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -922,7 +651,6 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -933,20 +661,13 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/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.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -956,8 +677,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -968,16 +687,11 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= -k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= -k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/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.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -992,13 +706,10 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e h1:FMupf2xGqbZaE89eeF0gUKbm82wzRpd2u9atmyuajIw= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= -sigs.k8s.io/controller-tools v0.9.2 h1:AkTE3QAdz9LS4iD3EJvHyYxBkg/g9fTbgiYsrcsFCcM= -sigs.k8s.io/controller-tools v0.9.2/go.mod h1:NUkn8FTV3Sad3wWpSK7dt/145qfuQ8CKJV6j4jHC5rM= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 318be9f6..f377a78d 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -26,8 +26,8 @@ var goldClass = types.BucketClass{ ObjectMeta: metav1.ObjectMeta{ Name: "classgold", }, - DriverName: "sample.cosi.driver", - Parameters: classGoldParameters, + DriverName: "sample.cosi.driver", + Parameters: classGoldParameters, DeletionPolicy: types.DeletionPolicyDelete, } @@ -43,7 +43,7 @@ var bucketClaim1 = types.BucketClaim{ }, Spec: types.BucketClaimSpec{ BucketClassName: "classgold", - Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolS3}, + Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolS3}, }, } @@ -59,7 +59,7 @@ var bucketClaim2 = types.BucketClaim{ }, Spec: types.BucketClaimSpec{ BucketClassName: "classgold", - Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolGCP}, + Protocols: []types.Protocol{types.ProtocolAzure, types.ProtocolGCP}, }, } diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go index 3557ac07..0aa9bf7d 100644 --- a/container-object-storage-interface-controller/pkg/util/const.go +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -10,7 +10,7 @@ const ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket claim") - ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket claim") - ErrNotImplemented = errors.New("Operation Not Implemented") + ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket claim") + ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket claim") + ErrNotImplemented = errors.New("Operation Not Implemented") ) From e63c6e44890e9ebffc2af6d997f8a09e7019b97b Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 5 Aug 2022 14:02:46 -0700 Subject: [PATCH 203/299] Fixing a bunch of issues --- .../go.mod | 32 +- .../go.sum | 1056 ++++++++++++----- .../pkg/bucket/bucket_controller.go | 108 +- .../pkg/bucket/bucket_controller_test.go | 4 +- .../bucketaccess/bucketaccess_controller.go | 159 ++- .../bucketaccess_controller_test.go | 4 +- .../pkg/{const/const.go => consts/consts.go} | 16 +- .../pkg/provisioner/client.go | 2 +- 8 files changed, 968 insertions(+), 413 deletions(-) rename container-object-storage-interface-provisioner-sidecar/pkg/{const/const.go => consts/consts.go} (55%) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 5629c147..2c592dd8 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -3,30 +3,18 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.15 require ( - github.com/google/go-cmp v0.5.2 // indirect github.com/google/uuid v1.2.0 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pkg/errors v0.9.1 - github.com/smartystreets/assertions v1.1.1 // indirect - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.7.0 - github.com/stretchr/testify v1.6.1 // indirect - golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect - golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/grpc v1.35.0 + github.com/spf13/viper v1.12.0 + google.golang.org/grpc v1.46.2 gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect - gopkg.in/ini.v1 v1.57.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect - k8s.io/api v0.19.4 - k8s.io/apimachinery v0.19.4 - k8s.io/client-go v0.19.4 - k8s.io/klog/v2 v2.2.0 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d - sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90 - sigs.k8s.io/controller-runtime v0.6.3 + k8s.io/api v0.24.2 + k8s.io/apimachinery v0.24.2 + k8s.io/client-go v0.24.2 + k8s.io/klog/v2 v2.70.1 + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e + sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 + sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 6f96e574..06391e2d 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -3,250 +3,335 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/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/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= 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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.12 h1:OO9WrvhDwtiMY/Opr1j1iFZzirI3JW4/bxNFRcntAr4= -github.com/go-openapi/spec v0.19.12/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.11 h1:RFTu/dlFySpyVvJDfp/7674JY4SDglYWKztbiIGFpmc= -github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -254,118 +339,165 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/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/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/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/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/protoc-gen-go-json v1.1.0/go.mod h1:pACAKlMtBf4SMFbVswcjwNwWwlci6Vn841H5jPRcE9I= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= -github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= 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 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -373,107 +505,161 @@ github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 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 v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= 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/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= -github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -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/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -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= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= -golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -484,16 +670,27 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -501,35 +698,89 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/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-20200520182314-0ba52f642ac2/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-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY= -golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -537,53 +788,114 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -593,36 +905,115 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -632,19 +1023,112 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -654,22 +1138,26 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -678,66 +1166,76 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD 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.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= -k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= -k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= -k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= -k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= -k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= +k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= +k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= +k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKVjkq+MIdg84cM= +k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= +k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= +k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= +k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= +k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= +k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= +k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= +k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= +k8s.io/code-generator v0.24.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= +k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU= +k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= -k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 h1:yEQKdMCjzAOvGeiTwG4hO/hNVNtDOuUFvMUZ0OlaIzs= +k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8/go.mod h1:mbJ+NSUoAhuR14N0S63bPkh8MGVSo3VYSGZtH/mfMe0= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d h1:4UhPuhdrRuoGmjbrpSBWPP+kT83zj9yBu66mXQLyuQA= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20210507174303-fac7c5076c3d/go.mod h1:WTzZGS4Q6MdQqDihJdMh2kCvqMx9Amhx0KIainA4lXQ= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210329232956-3bbacbbc9c19/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90 h1:gC+gbzEMq1EPR+QmXuDmC50USLWLY/8Ci2ezgqhloUs= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20210507203703-a97f2e98ac90/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= -sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= -sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e h1:FMupf2xGqbZaE89eeF0gUKbm82wzRpd2u9atmyuajIw= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220211001052-50e143052de8/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 h1:rIQHvH08W4Q887mQs1BCQWf32MYkQJNER3ZvxGjL6sc= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= +sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= +sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= +sigs.k8s.io/controller-tools v0.9.2/go.mod h1:NUkn8FTV3Sad3wWpSK7dt/145qfuQ8CKJV6j4jHC5rM= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index e6dfaa20..fc9be286 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -24,10 +24,10 @@ import ( kube "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" - bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/const" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + buckets "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" + bucketapi "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -63,6 +63,8 @@ func NewBucketListener(driverName string, client cosi.ProvisionerClient) *Bucket func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) error { bucket := inputBucket.DeepCopy() + var err error + klog.V(3).InfoS("Add Bucket", "name", bucket.ObjectMeta.Name, "bucketclass", bucket.Spec.BucketClassName, @@ -85,9 +87,10 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) return nil } - if bucket.Spec.ExistingBucketID != nil { + if bucket.Spec.ExistingBucketID != "" { bucket.Status.BucketReady = true bucket.Status.BucketID = bucket.Spec.ExistingBucketID + } else { req := &cosi.DriverCreateBucketRequest{ Parameters: bucket.Spec.Parameters, @@ -122,20 +125,26 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) // Now we update the BucketReady status of BucketClaim if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim - bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { return err } bucketClaim.Status.BucketReady = true - if _, err = b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + if _, err = b.bucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { return err } } } + controllerutil.AddFinalizer(bucket, consts.BucketFinalizer) + if _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) + return errors.Wrap(err, "Failed to update bucket finalizers") + } + // if this step fails, then controller will retry with backoff - if _, err = b.Buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { + if _, err = b.buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update bucket status", "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to update bucket status") @@ -152,20 +161,33 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) klog.V(3).InfoS("Update Bucket", "name", old.Name) - if !new.GetDeletionTimestamp().IsZero() { - if len(new.ObjectMeta.Finalizers) > 0 { - bucketClaimNs := new.Spec.BucketClaim.Namespace - bucketClaimName := new.Spec.BucketClaim.Name - bucketAccessList, err := b.BucketAccesses(bucketClaimNs).List(ctx, ListOptions{}) + bucket := new.DeepCopy() + + var err error + + if !bucket.GetDeletionTimestamp().IsZero() { + if controllerutil.ContainsFinalizer(bucket, consts.BABucketFinalizer) { + bucketClaimNs := bucket.Spec.BucketClaim.Namespace + bucketClaimName := bucket.Spec.BucketClaim.Name + bucketAccessList, err := b.bucketAccesses(bucketClaimNs).List(ctx, metav1.ListOptions{}) for _, bucketAccess := range bucketAccessList.Items { if strings.EqualFold(bucketAccess.Spec.BucketClaimName, bucketClaimName) { - err = b.BucketAccesses(bucketClaimNs).Delete(ctx, bucketAccess.Name, metav1.DeleteOptions{}) + err = b.bucketAccesses(bucketClaimNs).Delete(ctx, bucketAccess.Name, metav1.DeleteOptions{}) if err != nil { return err } } } + + controllerutil.RemoveFinalizer(bucket, consts.BABucketFinalizer) + } + + if controllerutil.ContainsFinalizer(bucket, consts.BucketFinalizer) { + err = b.deleteBucketOp(ctx, bucket) + if err != nil { + return err + } } } @@ -177,13 +199,33 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) // nil - Bucket successfully deleted // non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error { - bucket := inputBucket.DeepCopy() - klog.V(3).InfoS("Delete Bucket", - "name", bucket.ObjectMeta.Name, - "bucketclass", bucket.Spec.BucketClassName, + "name", inputBucket.ObjectMeta.Name, + "bucketclass", inputBucket.Spec.BucketClassName, ) + return nil + +} + +// InitializeKubeClient initializes the kubernetes client +func (b *BucketListener) InitializeKubeClient(k kube.Interface) { + b.kubeClient = k + + serverVersion, err := k.Discovery().ServerVersion() + if err != nil { + klog.ErrorS(err, "Cannot determine server version") + } else { + b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + } +} + +// InitializeBucketClient initializes the object storage bucket client +func (b *BucketListener) InitializeBucketClient(bc buckets.Interface) { + b.bucketClient = bc +} + +func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bucket) error { if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for provisiner", "bucket", bucket.ObjectMeta.Name, @@ -194,7 +236,7 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke // We ask the driver to clean up the bucket from the storage provider // only when the retain policy is set to Delete - if bucket.Spec.DeletionPolicy == bucketapi.DeletionPolicyDelete { + if bucket.Spec.DeletionPolicy == v1alpha1.DeletionPolicyDelete { req := &cosi.DriverDeleteBucketRequest{ BucketId: bucket.Status.BucketID, } @@ -211,13 +253,13 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim - bucketClaim, err := b.BucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + bucketClaim, err := b.bucketClaims(ref.ObjectMeta.Namespace).Get(ctx, ref.ObjectMeta.Name, metav1.GetOptions{}) if err != nil { return err } - if controllerutil.RemoveFinalizer(bucketClaim, const.BcFinalizer) { - if _, err := b.BucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + if controllerutil.RemoveFinalizer(bucketClaim, consts.BCFinalizer) { + if _, err := b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { return err } } @@ -226,14 +268,14 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke return nil } -func (b *BucketListener) Buckets() bucketapi.BucketInterface { +func (b *BucketListener) buckets() bucketapi.BucketInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().Buckets() } panic("uninitialized listener") } -func (b *BucketListener) BucketClaims(namespace string) bucketapi.BucketClaimInterface { +func (b *BucketListener) bucketClaims(namespace string) bucketapi.BucketClaimInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) } @@ -242,26 +284,10 @@ func (b *BucketListener) BucketClaims(namespace string) bucketapi.BucketClaimInt } -func (b *BucketListener) BucketAccesses(namespace string) bucketapi.BucketAccessInterface { +func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccessInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketAccesses(namespace) } panic("uninitialized listener") } -// InitializeKubeClient initializes the kubernetes client -func (b *BucketListener) InitializeKubeClient(k kube.Interface) { - b.kubeClient = k - - serverVersion, err := k.Discovery().ServerVersion() - if err != nil { - klog.ErrorS(err, "Cannot determine server version") - } else { - b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) - } -} - -// InitializeBucketClient initializes the object storage bucket client -func (b *BucketListener) InitializeBucketClient(bc buckets.Interface) { - b.bucketClient = bc -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 42346447..eef95d0c 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -20,8 +20,8 @@ import ( "reflect" "testing" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 891f86a6..447c0e79 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -30,10 +30,10 @@ import ( "k8s.io/klog/v2" cosiapi "sigs.k8s.io/container-object-storage-interface-api/apis" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - buckets "sigs.k8s.io/container-object-storage-interface-api/clientset" - bucketapi "sigs.k8s.io/container-object-storage-interface-api/clientset/typed/objectstorage.k8s.io/v1alpha1" - "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/const" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + buckets "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" + bucketapi "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "github.com/pkg/errors" @@ -66,7 +66,7 @@ func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) ( func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { bucketAccess := inputBucketAccess.DeepCopy() - if bucketAccess.Status.AccessGranted && bucketAccess.Status.AccountID != nil { + if bucketAccess.Status.AccessGranted && bucketAccess.Status.AccountID != "" { klog.V(3).InfoS("BucketAccess already exists", bucketAccess.ObjectMeta.Name) return nil } @@ -100,7 +100,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } namespace := bucketAccess.ObjectMeta.Namespace - bucketClaim, err := bal.BucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) + bucketClaim, err := bal.bucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) if err != nil { klog.ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) return errors.Wrap(err, "Failed to fetch bucketClaim") @@ -117,7 +117,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Invalid arguments") } - bucketAccessClass, err := bal.BucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) + bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) return errors.Wrap(err, "Failed to fetch BucketAccessClass") @@ -140,7 +140,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return nil } - bucket, err := bal.Buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) + bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) if err != nil { klog.ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) return errors.Wrap(err, "Failed to fetch bucket") @@ -150,7 +150,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } - accountName := const.AccountNamePrefix + string(bucketAccess.UID) + accountName := consts.AccountNamePrefix + string(bucketAccess.UID) req := &cosi.DriverGrantBucketAccessRequest{ BucketId: bucket.Status.BucketID, @@ -173,9 +173,15 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } - if rsp.AccountId == nil { + if rsp.AccountId == "" { klog.ErrorS("AccountId not defined in DriverGrantBucketAccess") - return errors.New("Failed to grant access. AccountId not defined in DriverGrantBucketAccess.") + return errors.New("Failed to grant access. AccountId or Credentials not defined in DriverGrantBucketAccessResponse for BucketAccess: ", bucketAccess.ObjectMeta.Name) + } + + credentials := rsp.Credentials + if len(credentials) != 1 { + klog.ErrorS("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") + return errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1 for BucketAccess: ", bucketAccess.ObjectMeta.Name) } bucketInfo := cosiapi.BucketInfo { @@ -185,18 +191,39 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a BucketInfoSpec: cosiapi.BucketInfoSpec { BucketName: bucket.ObjectMeta.Name, AuthenticationType: bucketAccess.Spec.AuthenticationType, - Endpoint: , - Region: , - Protocol: , + Protocols: []v1alpha1.Protocol[bucketAccess.Spec.Protocol], } } + var val cosi.CredentialDetails + var ok bool + + if val, ok = credentials[consts.S3Key]; ok { + secretS3 := &cosiapi.SecretS3 { + Endpoint: "", + Region: "", + AccessKeyID: val[consts.S3SecretAccessKeyID], + AccessSecretKey: val[consts.S3SecretAccessSecretKey], + } + + bucketInfo.S3 = secretS3 + } else if val, ok = credentials[consts.AzureKey]; ok { + expiryTs := val[consts.AzureSecretExpiryTimeStamp] + expiryTimestamp := time.Parse(consts.DefaultTimeFormat, expiryTs) + secretAzure := &cosi.SecretAzure { + AccessToken: val[consts.AzureSecretAccessToken], + Expiry: expiryTs, + } + + bucketInfo.Azure = secretAzure + } + srtingData, err := json.Marshal(bucketInfo) if err != nil { return errors.New("Error converting bucketinfo into secret") } - if _, err := bal.Secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { + if _, err := bal.secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { if !kubeerrors.IsNotFound(err) { klog.ErrorS(err, "Failed to create secrets", @@ -205,11 +232,11 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "failed to fetch secrets") } - if _, err := bal.Secrets(namespace).Create(ctx, &corev1.Secret{ + if _, err := bal.secrets(namespace).Create(ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: secretCredName, Namespace: namespace, - Finalizers: []string{const.SecretFinalizer}, + Finalizers: []string{consts.SecretFinalizer}, }, StringData: map[string]string{ BucketInfo: string(stringData), @@ -226,24 +253,31 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } } - bucketFinalizer := const.BaFinalizer + string(bucketAccess.ObjectMeta.UID) - finalizers := bucket.ObjectMeta.Finalizers - finalizers = append(finalizers, bucketFinalizer) - bucket.ObjectMeta.Finalizers = finalizers - _, err = bal.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) - if err != nil { - return err + if controllerutil.AddFinalizer(bucket, consts.BABucketFinalizer) { + _, err = bal.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if err != nil { + return err + } + } + + if controllerutil.AddFinalizer(bucketAccess, consts.BAFinalizer) { + if _, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update BucketAccess finalizer", + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucket", bucket.ObjectMeta.Name) + return errors.Wrap(err, "Failed to update BucketAccess finalizer", bucketAccess.ObjectMeta.Name) + } } bucketAccess.Status.AccountID = rsp.AccountId bucketAccess.Status.AccessGranted = true // if this step fails, then controller will retry with backoff - if _, err := bal.BucketAccesses().UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + if _, err := bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to update BucketAccess Status") + return errors.Wrap(err, "Failed to update BucketAccess Status", bucketAccess.ObjectMeta.Name) } return nil @@ -257,6 +291,13 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. klog.V(3).InfoS("Update BucketAccess", "name", old.ObjectMeta.Name) + new := bucketAccess.DeepCopy() + + err := bal.deleteBucketAccessOp(ctx, bucketAccess) + if err != nil { + return err + } + return nil } @@ -270,79 +311,71 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp "bucket", bucketAccess.Spec.BucketName, ) + return nil +} + +func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { credSecretName := bucketAccess.Spec.CredentialsSecretName - secret, err := bal.Secrets(bucketAccess.ObjectMeta.Namespace).Get(ctx, credSecretName, metav1.GetOptions{}) + secret, err := bal.secrets(bucketAccess.ObjectMeta.Namespace).Get(ctx, credSecretName, metav1.GetOptions{}) if err != nil { return err } - if controllerutil.RemoveFinalizer(secret, const.SecretFinalizer) { - _, err = bal.Secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, credSecretName, metav1.UpdateOptions{}) + if controllerutil.RemoveFinalizer(secret, consts.SecretFinalizer) { + _, err = bal.secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, credSecretName, metav1.UpdateOptions{}) if err != nil { return err } } - bucketClaimName = bucketAccess.Spec.BucketClaimName - bucketClaim, err := bal.BucketClaims(bucketAccess.ObjectMeta.Namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) - if err != nil { - return err - } - - bucket, err := bal.Buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) - if err != nil { - return err - } - - bucketFinalizer := const.BaFinalizer + string(bucketAccess.ObjectMeta.UID) - if controllerutil.RemoveFinalizer(bucketFinalizer) { - _, err = bal.Buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if controllerutil.RemoveFinalizer(bucketAccess, consts.BAFinalizer) { + _, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}) if err != nil { return err } - } + } return nil } -func (b *BucketAccessListener) Secrets(ns string) kubecorev1.SecretInterface { - if b.kubeClient != nil { - return b.kubeClient.CoreV1().Secrets(ns) +func (bal *BucketAccessListener) secrets(ns string) kubecorev1.SecretInterface { + if bal.kubeClient != nil { + return bal.kubeClient.CoreV1().Secrets(ns) } panic("uninitialized listener") } -func (b *BucketAccessListener) BucketAccesses() bucketapi.BucketAccessInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().BucketAccesses() +func (bal *BucketAccessListener) bucketAccesses(ns string) bucketapi.BucketAccessInterface { + if bal.bucketClient != nil { + return bal.bucketClient.ObjectstorageV1alpha1().BucketAccesses(ns) } panic("uninitialized listener") } -func (b *BucketAccessListener) Buckets() bucketapi.BucketInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().Buckets() +func (bal *BucketAccessListener) buckets() bucketapi.BucketInterface { + if bal.bucketClient != nil { + return bal.bucketClient.ObjectstorageV1alpha1().Buckets() } panic("uninitialized listener") } -func (b *BucketAccessListener) BucketClaims(namespace string) bucketapi.BucketClaimInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) +func (bal *BucketAccessListener) bucketClaims(namespace string) bucketapi.BucketClaimInterface { + if bal.bucketClient != nil { + return bal.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) } panic("uninitialized listener") } -func (b *BucketAccessListener) BucketAccessClasses() bucketapi.BucketClaimInterface { - if b.bucketClient != nil { - return b.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() +func (bal *BucketAccessListener) bucketAccessClasses() bucketapi.BucketClaimInterface { + if bal.bucketClient != nil { + return bal.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() } panic("uninitialized listener") } // InitializeKubeClient initializes the kubernetes client -func (b *BucketAccessListener) InitializeKubeClient(k kube.Interface) { - b.kubeClient = k +func (bal *BucketAccessListener) InitializeKubeClient(k kube.Interface) { + bal.kubeClient = k serverVersion, err := k.Discovery().ServerVersion() if err != nil { @@ -353,6 +386,6 @@ func (b *BucketAccessListener) InitializeKubeClient(k kube.Interface) { } // InitializeBucketClient initializes the object storage bucket client -func (b *BucketAccessListener) InitializeBucketClient(bc buckets.Interface) { - b.bucketClient = bc +func (bal *BucketAccessListener) InitializeBucketClient(bc buckets.Interface) { + bal.bucketClient = bc } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 1bd4433d..2722cf7e 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -29,8 +29,8 @@ import ( fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage.k8s.io/v1alpha1" - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/clientset/fake" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/const/const.go b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go similarity index 55% rename from container-object-storage-interface-provisioner-sidecar/pkg/const/const.go rename to container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go index 12aa28ea..5c456a90 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/const/const.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go @@ -13,11 +13,21 @@ * limitations under the License. */ -package const +package consts const ( AccountNamePrefix = "ba-" - BaFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection-" - BcFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" + BABucketFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-bucket-protection" + BAFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection" + BCFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" + BucketFinalizer = "cosi.objectstorage.k8s.io/bucket-protection" SecretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" + + S3Key = "s3" + AzureKey = "azure" + S3SecretAccessKeyID = "accessKeyID" + S3SecretAccessSecretKey = "accessSecretKey" + AzureSecretAccessToken = "accessToken" + AzureSecretExpiryTimeStamp = "expiryTs" + DefaultTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" ) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go index 56dd133b..627d1dea 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/client.go @@ -41,7 +41,7 @@ func (c *COSIProvisionerClient) DriverGetInfo(ctx context.Context, return c.identityClient.DriverGetInfo(ctx, in, opts...) } -func (c *COSIProvisionerClient) ProvisionerCreateBucket(ctx context.Context, +func (c *COSIProvisionerClient) DriverCreateBucket(ctx context.Context, in *cosi.DriverCreateBucketRequest, opts ...grpc.CallOption) (*cosi.DriverCreateBucketResponse, error) { From 4c8b1306267a0f1a5a38d21530e5c9f51abbccd4 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Sat, 6 Aug 2022 00:20:40 -0700 Subject: [PATCH 204/299] Fixing the go mod and sum file --- .../go.mod | 60 ++- .../go.sum | 504 +----------------- 2 files changed, 58 insertions(+), 506 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 2c592dd8..6b1e7ea7 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -1,20 +1,72 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar -go 1.15 +go 1.18 require ( - github.com/google/uuid v1.2.0 // indirect github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.12.0 google.golang.org/grpc v1.46.2 - gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 sigs.k8s.io/controller-runtime v0.12.3 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/go-logr/logr v1.2.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.2.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/subosito/gotenv v1.3.0 // indirect + golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0 // indirect + k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 06391e2d..6383b9e6 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -20,30 +20,14 @@ cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPT cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -55,7 +39,6 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= @@ -65,84 +48,35 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -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-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= @@ -151,46 +85,27 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -198,23 +113,13 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -228,7 +133,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -247,12 +151,9 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -267,7 +168,6 @@ github.com/google/go-cmp v0.5.3/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -276,7 +176,6 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -289,67 +188,21 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.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.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -358,212 +211,92 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -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= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/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.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -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/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/protoc-gen-go-json v1.1.0/go.mod h1:pACAKlMtBf4SMFbVswcjwNwWwlci6Vn841H5jPRcE9I= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -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/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -572,35 +305,13 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -608,48 +319,19 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -673,8 +355,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -686,15 +366,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -702,13 +376,10 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -727,25 +398,14 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -759,14 +419,7 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -780,39 +433,24 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -824,53 +462,26 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -889,31 +500,23 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -945,28 +548,16 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -988,24 +579,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1035,7 +608,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1047,7 +619,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1059,42 +630,6 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1116,19 +651,9 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1144,7 +669,6 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1155,20 +679,14 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/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.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1178,8 +696,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1187,27 +703,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= -k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKVjkq+MIdg84cM= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= -k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= -k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= -k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= -k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= -k8s.io/code-generator v0.24.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= -k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU= -k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/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.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1222,15 +725,12 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e h1:FMupf2xGqbZaE89eeF0gUKbm82wzRpd2u9atmyuajIw= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220211001052-50e143052de8/go.mod h1:kafkL5l/lTUrZXhVi/9p1GzpEE/ts29BkWkL3Ao33WU= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 h1:rIQHvH08W4Q887mQs1BCQWf32MYkQJNER3ZvxGjL6sc= sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= -sigs.k8s.io/controller-tools v0.9.2/go.mod h1:NUkn8FTV3Sad3wWpSK7dt/145qfuQ8CKJV6j4jHC5rM= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From 16a6ef4c0becb7b8ce2edc15b10c99ac7a082187 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Sat, 6 Aug 2022 01:55:39 -0700 Subject: [PATCH 205/299] Test fixes and compilation fixes --- .../pkg/bucket/bucket_controller.go | 9 +- .../pkg/bucket/bucket_controller_test.go | 102 +----------- .../bucketaccess/bucketaccess_controller.go | 136 +++++++-------- .../bucketaccess_controller_test.go | 157 +++++++++++------- .../pkg/consts/consts.go | 28 ++-- 5 files changed, 194 insertions(+), 238 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index fc9be286..b5040baf 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -39,7 +39,7 @@ import ( // BucketListener manages Bucket objects type BucketListener struct { provisionerClient cosi.ProvisionerClient - driverName string + driverName string kubeClient kube.Interface bucketClient buckets.Interface @@ -121,7 +121,6 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) return err } - // Now we update the BucketReady status of BucketClaim if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim @@ -253,7 +252,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim - bucketClaim, err := b.bucketClaims(ref.ObjectMeta.Namespace).Get(ctx, ref.ObjectMeta.Name, metav1.GetOptions{}) + bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { return err } @@ -280,14 +279,12 @@ func (b *BucketListener) bucketClaims(namespace string) bucketapi.BucketClaimInt return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) } - panic ("uninitialized listener") + panic("uninitialized listener") } - func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccessInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketAccesses(namespace) } panic("uninitialized listener") } - diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index eef95d0c..68d75ce2 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -25,7 +25,6 @@ import ( cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" @@ -71,23 +70,23 @@ func TestInitializeBucketClient(t *testing.T) { } func TestAddWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" + driver := "driver1" mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerCreateBucket = func(ctx context.Context, - in *cosi.ProvisionerCreateBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerCreateBucketResponse, error) { + mpc.FakeDriverCreateBucket = func(ctx context.Context, + in *cosi.DriverCreateBucketRequest, + opts ...grpc.CallOption) (*cosi.DriverCreateBucketResponse, error) { t.Errorf("grpc client called") return nil, nil } bl := BucketListener{ - provisionerName: provisioner, + driverName: driver, provisionerClient: &mpc, } b := v1alpha1.Bucket{ Spec: v1alpha1.BucketSpec{ - Provisioner: "provisioner2", + DriverName: "driver2", }, } ctx := context.TODO() @@ -96,92 +95,3 @@ func TestAddWrongProvisioner(t *testing.T) { t.Errorf("Error returned: %+v", err) } } - -func TestDeleteWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerDeleteBucket = func(ctx context.Context, - in *cosi.ProvisionerDeleteBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { - t.Errorf("grpc client called") - return nil, nil - } - - bl := BucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - } - - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - Provisioner: "provisioner2", - }, - } - ctx := context.TODO() - err := bl.Delete(ctx, &b) - if err != nil { - t.Errorf("error returned: %+v", err) - } -} - -func TestBucketDeletion(t *testing.T) { - provisioner := "provisioner1" - bucketId := "bucket1" - mpc := struct{ fakespec.FakeProvisionerClient }{} - - testCases := []struct { - name string - setFields func(*v1alpha1.Bucket) - deleteFunc func(ctx context.Context, - in *cosi.ProvisionerDeleteBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) - }{ - { - name: "BucketDeletion", - setFields: func(b *v1alpha1.Bucket) { - b.Status.BucketID = bucketId - }, - deleteFunc: func(ctx context.Context, - req *cosi.ProvisionerDeleteBucketRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerDeleteBucketResponse, error) { - inBucketId := req.BucketId - if inBucketId != bucketId { - t.Errorf("expected %s, got %s", bucketId, inBucketId) - } - return &cosi.ProvisionerDeleteBucketResponse{}, nil - }, - }, - } - - for _, tc := range testCases { - b := v1alpha1.Bucket{ - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - }, - Status: v1alpha1.BucketStatus{ - BucketAvailable: true, - }, - } - - ctx := context.TODO() - client := fakebucketclientset.NewSimpleClientset(&b) - mpc.FakeProvisionerDeleteBucket = tc.deleteFunc - bl := BucketListener{ - provisionerName: provisioner, - provisionerClient: &mpc, - bucketClient: client, - } - - tc.setFields(&b) - t.Logf(tc.name) - err := bl.Delete(ctx, &b) - if err != nil { - t.Errorf("Error running TestBucketDeletion: %v", err) - } - - updatedB, _ := client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{}) - if updatedB.Status.BucketAvailable != false { - t.Errorf("Expected %t, got %t", false, b.Status.BucketAvailable) - } - } -} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 447c0e79..50e54090 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -17,9 +17,10 @@ package bucketaccess import ( "context" - "os" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "encoding/json" + "fmt" "strings" + "time" corev1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" @@ -35,6 +36,7 @@ import ( bucketapi "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/pkg/errors" "google.golang.org/grpc/codes" @@ -44,7 +46,7 @@ import ( // BucketAccessListener manages Bucket objects type BucketAccessListener struct { provisionerClient cosi.ProvisionerClient - driverName string + driverName string kubeClient kube.Interface bucketClient buckets.Interface @@ -54,7 +56,7 @@ type BucketAccessListener struct { // NewBucketAccessListener returns a resource handler for BucketAccess objects func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { return &BucketAccessListener{ - driverName: driverName, + driverName: driverName, provisionerClient: client, }, nil } @@ -84,19 +86,22 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a ) secretCredName := bucketAccess.Spec.CredentialsSecretName - if secretCredName == nil { + if secretCredName == "" { return errors.New("CredentialsSecretName not defined in the BucketAccess") } - authType := cosi.AuthenticationType_UnknownAuthenticationType - if bucketAccess.Spec.AuthenticationType == v1alpha1.AuthenticationTypeKey { - authType = cosi.AuthenticationType_Key - } else if bucketAccess.Spec.AuthenticationType == v1alpha1.AuthenticationTypeIAM { - authType = cosi.AuthenticationType_IAM + bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) + if err != nil { + klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) + return errors.Wrap(err, "Failed to fetch BucketAccessClass") } - if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { - return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") + if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { + klog.V(5).InfoS("Skipping bucketaccess for driver", + "bucketAccess", bucketAccess.ObjectMeta.Name, + "driver", bucketAccessClass.DriverName, + ) + return nil } namespace := bucketAccess.ObjectMeta.Namespace @@ -106,7 +111,6 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Failed to fetch bucketClaim") } - if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { err := errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") klog.ErrorS(err, @@ -117,21 +121,17 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Invalid arguments") } - bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) - if err != nil { - klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) - return errors.Wrap(err, "Failed to fetch BucketAccessClass") + authType := cosi.AuthenticationType_UnknownAuthenticationType + if bucketAccessClass.AuthenticationType == v1alpha1.AuthenticationTypeKey { + authType = cosi.AuthenticationType_Key + } else if bucketAccessClass.AuthenticationType == v1alpha1.AuthenticationTypeIAM { + authType = cosi.AuthenticationType_IAM } - if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { - klog.V(5).InfoS("Skipping bucketaccess for driver", - "bucketAccess", bucketAccess.ObjectMeta.Name, - "driver", bucketAccessClass.DriverName, - ) - return nil + if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { + return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } - if bucketAccess.Status.AccessGranted == true { klog.V(5).InfoS("AccessAlreadyGranted", "bucketAccess", bucketAccess.ObjectMeta.Name, @@ -146,17 +146,17 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Failed to fetch bucket") } - if bucket.Status.BucketStatus != true || bucket.Status.BucketID == "" { + if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } accountName := consts.AccountNamePrefix + string(bucketAccess.UID) req := &cosi.DriverGrantBucketAccessRequest{ - BucketId: bucket.Status.BucketID, - AccountName: accountName, + BucketId: bucket.Status.BucketID, + Name: accountName, AuthenticationType: authType, - Parameters: bucketAccessClass.Parameters, + Parameters: bucketAccessClass.Parameters, } // This needs to be idempotent @@ -174,51 +174,56 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if rsp.AccountId == "" { - klog.ErrorS("AccountId not defined in DriverGrantBucketAccess") - return errors.New("Failed to grant access. AccountId or Credentials not defined in DriverGrantBucketAccessResponse for BucketAccess: ", bucketAccess.ObjectMeta.Name) + err = errors.New("AccountId not defined in DriverGrantBucketAccess") + klog.ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) + return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } credentials := rsp.Credentials if len(credentials) != 1 { - klog.ErrorS("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") - return errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1 for BucketAccess: ", bucketAccess.ObjectMeta.Name) + err = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") + klog.ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) + return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } - bucketInfo := cosiapi.BucketInfo { - ObjectMeta: metav1.ObjectMeta { - name: secretCredName, + bucketInfoName := consts.BucketInfoPrefix + string(bucketAccess.ObjectMeta.UID) + + bucketInfo := cosiapi.BucketInfo{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketInfoName, + }, + Spec: cosiapi.BucketInfoSpec{ + BucketName: bucket.ObjectMeta.Name, + AuthenticationType: bucketAccessClass.AuthenticationType, + Protocols: []v1alpha1.Protocol{bucketAccess.Spec.Protocol}, }, - BucketInfoSpec: cosiapi.BucketInfoSpec { - BucketName: bucket.ObjectMeta.Name, - AuthenticationType: bucketAccess.Spec.AuthenticationType, - Protocols: []v1alpha1.Protocol[bucketAccess.Spec.Protocol], - } } - var val cosi.CredentialDetails + var val *cosi.CredentialDetails var ok bool if val, ok = credentials[consts.S3Key]; ok { - secretS3 := &cosiapi.SecretS3 { - Endpoint: "", - Region: "", - AccessKeyID: val[consts.S3SecretAccessKeyID], - AccessSecretKey: val[consts.S3SecretAccessSecretKey], + secretS3 := &cosiapi.SecretS3{ + Endpoint: "https://s3.amazonaws.com", + Region: "us-west-1", + AccessKeyID: val.Secrets[consts.S3SecretAccessKeyID], + AccessSecretKey: val.Secrets[consts.S3SecretAccessSecretKey], } - bucketInfo.S3 = secretS3 + bucketInfo.Spec.S3 = secretS3 } else if val, ok = credentials[consts.AzureKey]; ok { - expiryTs := val[consts.AzureSecretExpiryTimeStamp] - expiryTimestamp := time.Parse(consts.DefaultTimeFormat, expiryTs) - secretAzure := &cosi.SecretAzure { - AccessToken: val[consts.AzureSecretAccessToken], - Expiry: expiryTs, + expiryTs := val.Secrets[consts.AzureSecretExpiryTimeStamp] + expiryTimestamp, _ := time.Parse(consts.DefaultTimeFormat, expiryTs) + metav1Time := &metav1.Time{Time: expiryTimestamp} + secretAzure := &cosiapi.SecretAzure{ + AccessToken: val.Secrets[consts.AzureSecretAccessToken], + ExpiryTimeStamp: metav1Time, } - bucketInfo.Azure = secretAzure + bucketInfo.Spec.Azure = secretAzure } - srtingData, err := json.Marshal(bucketInfo) + stringData, err := json.Marshal(bucketInfo) if err != nil { return errors.New("Error converting bucketinfo into secret") } @@ -234,12 +239,12 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if _, err := bal.secrets(namespace).Create(ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: secretCredName, - Namespace: namespace, + Name: secretCredName, + Namespace: namespace, Finalizers: []string{consts.SecretFinalizer}, }, StringData: map[string]string{ - BucketInfo: string(stringData), + "BucketInfo": string(stringData), }, Type: corev1.SecretTypeOpaque, }, metav1.CreateOptions{}); err != nil { @@ -265,7 +270,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.ErrorS(err, "Failed to update BucketAccess finalizer", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to update BucketAccess finalizer", bucketAccess.ObjectMeta.Name) + return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess finalizer. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) } } @@ -277,7 +282,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to update BucketAccess Status", bucketAccess.ObjectMeta.Name) + return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess Status. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) } return nil @@ -291,8 +296,7 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. klog.V(3).InfoS("Update BucketAccess", "name", old.ObjectMeta.Name) - new := bucketAccess.DeepCopy() - + bucketAccess := new.DeepCopy() err := bal.deleteBucketAccessOp(ctx, bucketAccess) if err != nil { return err @@ -308,7 +312,7 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Delete BucketAccess", "name", bucketAccess.ObjectMeta.Name, - "bucket", bucketAccess.Spec.BucketName, + "bucketClaim", bucketAccess.Spec.BucketClaimName, ) return nil @@ -322,7 +326,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke } if controllerutil.RemoveFinalizer(secret, consts.SecretFinalizer) { - _, err = bal.secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, credSecretName, metav1.UpdateOptions{}) + _, err = bal.secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) if err != nil { return err } @@ -333,7 +337,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke if err != nil { return err } - } + } return nil } @@ -366,7 +370,7 @@ func (bal *BucketAccessListener) bucketClaims(namespace string) bucketapi.Bucket panic("uninitialized listener") } -func (bal *BucketAccessListener) bucketAccessClasses() bucketapi.BucketClaimInterface { +func (bal *BucketAccessListener) bucketAccessClasses() bucketapi.BucketAccessClassInterface { if bal.bucketClient != nil { return bal.bucketClient.ObjectstorageV1alpha1().BucketAccessClasses() } @@ -381,7 +385,7 @@ func (bal *BucketAccessListener) InitializeKubeClient(k kube.Interface) { if err != nil { klog.ErrorS(err, "Cannot determine server version") } else { - b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) + bal.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 2722cf7e..567ed7f4 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -20,9 +20,9 @@ import ( "reflect" "strings" "testing" + "time" "google.golang.org/grpc" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" @@ -72,49 +72,56 @@ func TestInitializeBucketClient(t *testing.T) { } func TestAddWrongProvisioner(t *testing.T) { - provisioner := "provisioner1" - bucketName := "bucket1" - bucketId := "bucketId1" + driver := "driver1" + bucketAccessClassName := "bucketAccessClass1" + bucketClaimName := "bucketClaim1" accountId := "accountId1" - bucketAccessRequestName := "bar1" - policy := "policy1" + secretName := "secret1" + timeNow := time.Now() + secret := map[string]string{ + "accessToken": "randomValue", + "expiryTs": timeNow.String(), + } + + credentialDetails := &cosi.CredentialDetails{ + Secrets: secret, + } + credential := map[string]*cosi.CredentialDetails{ + "azure": credentialDetails, + } mpc := struct{ fakespec.FakeProvisionerClient }{} - mpc.FakeProvisionerGrantBucketAccess = func(ctx context.Context, - in *cosi.ProvisionerGrantBucketAccessRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + mpc.FakeDriverGrantBucketAccess = func(ctx context.Context, + in *cosi.DriverGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.DriverGrantBucketAccessResponse, error) { t.Errorf("grpc client called") - return &cosi.ProvisionerGrantBucketAccessResponse{ - AccountId: accountId, + return &cosi.DriverGrantBucketAccessResponse{ + AccountId: accountId, + Credentials: credential, }, nil } - b := v1alpha1.Bucket{ + b := v1alpha1.BucketAccessClass{ ObjectMeta: metav1.ObjectMeta{ - Name: bucketName, - }, - Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner + "-invalid", - Protocol: v1alpha1.Protocol{}, - }, - Status: v1alpha1.BucketStatus{ - BucketID: bucketId, + Name: bucketAccessClassName, }, + DriverName: driver + "-invalid", + AuthenticationType: v1alpha1.AuthenticationTypeKey, } ba := v1alpha1.BucketAccess{ Spec: v1alpha1.BucketAccessSpec{ - BucketName: bucketName, - BucketAccessRequest: &corev1.ObjectReference{ - Name: bucketAccessRequestName, - }, - PolicyActionsConfigMapData: policy, + BucketClaimName: bucketClaimName, + Protocol: v1alpha1.ProtocolAzure, + BucketAccessClassName: bucketAccessClassName, + CredentialsSecretName: secretName, }, } + client := fakebucketclientset.NewSimpleClientset(&ba, &b) kubeClient := fakekubeclientset.NewSimpleClientset() bal := BucketAccessListener{ - provisionerName: provisioner, + driverName: driver, provisionerClient: &mpc, bucketClient: client, kubeClient: kubeClient, @@ -128,23 +135,39 @@ func TestAddWrongProvisioner(t *testing.T) { } func TestAddBucketAccess(t *testing.T) { - provisioner := "provisioner" + driver := "driver" bucketName := "bucket1" bucketId := "bucketId1" - bucketAccessRequestName := "bar1" + bucketClaimName := "bucketClaim1" + bucketClassName := "bucketClass1" + bucketAccessClassName := "bucketAccessClass1" + bucketAccessName := "bucketAccess1" + secretName := "secret1" - policy := "policy1" accountId := "account1" - creds := "credsContents" ns := "testns" + + timeNow := time.Now() + secret := map[string]string{ + "accessToken": "randomValue", + "expiryTs": timeNow.String(), + } + + credentialDetails := &cosi.CredentialDetails{ + Secrets: secret, + } + creds := map[string]*cosi.CredentialDetails{ + "azure": credentialDetails, + } + mpc := struct{ fakespec.FakeProvisionerClient }{} testCases := []struct { name string setFields func(ba *v1alpha1.BucketAccess) grantFunc func(ctx context.Context, - in *cosi.ProvisionerGrantBucketAccessRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) + in *cosi.DriverGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.DriverGrantBucketAccessResponse, error) }{ { name: "TestAddBucketAccess", @@ -152,10 +175,10 @@ func TestAddBucketAccess(t *testing.T) { }, grantFunc: func(ctx context.Context, - req *cosi.ProvisionerGrantBucketAccessRequest, - opts ...grpc.CallOption) (*cosi.ProvisionerGrantBucketAccessResponse, error) { + req *cosi.DriverGrantBucketAccessRequest, + opts ...grpc.CallOption) (*cosi.DriverGrantBucketAccessResponse, error) { - return &cosi.ProvisionerGrantBucketAccessResponse{ + return &cosi.DriverGrantBucketAccessResponse{ AccountId: accountId, Credentials: creds, }, nil @@ -169,37 +192,64 @@ func TestAddBucketAccess(t *testing.T) { Name: bucketName, }, Spec: v1alpha1.BucketSpec{ - Provisioner: provisioner, - Protocol: v1alpha1.Protocol{}, + DriverName: driver, + Protocols: []v1alpha1.Protocol{v1alpha1.ProtocolAzure}, + DeletionPolicy: v1alpha1.DeletionPolicyRetain, }, Status: v1alpha1.BucketStatus{ - BucketID: bucketId, + BucketID: bucketId, + BucketReady: true, + }, + } + + bc := v1alpha1.BucketClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketClaimName, + Namespace: ns, + }, + Spec: v1alpha1.BucketClaimSpec{ + BucketClassName: bucketClassName, + Protocols: []v1alpha1.Protocol{v1alpha1.ProtocolAzure}, + }, + Status: v1alpha1.BucketClaimStatus{ + BucketReady: true, + BucketName: bucketName, }, } + bac := v1alpha1.BucketAccessClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketAccessClassName, + }, + DriverName: driver, + AuthenticationType: v1alpha1.AuthenticationTypeKey, + } + ba := v1alpha1.BucketAccess{ + ObjectMeta: metav1.ObjectMeta{ + Name: bucketAccessName, + Namespace: ns, + }, Spec: v1alpha1.BucketAccessSpec{ - BucketName: bucketName, - BucketAccessRequest: &corev1.ObjectReference{ - Name: bucketAccessRequestName, - }, - PolicyActionsConfigMapData: policy, + BucketClaimName: bucketClaimName, + Protocol: v1alpha1.ProtocolAzure, + BucketAccessClassName: bucketAccessClassName, + CredentialsSecretName: secretName, }, } ctx := context.TODO() tc.setFields(&ba) - client := fakebucketclientset.NewSimpleClientset(&ba, &b) + client := fakebucketclientset.NewSimpleClientset(&b, &bc, &bac, &ba) kubeClient := fakekubeclientset.NewSimpleClientset() - mpc.FakeProvisionerGrantBucketAccess = tc.grantFunc + mpc.FakeDriverGrantBucketAccess = tc.grantFunc bal := BucketAccessListener{ - provisionerName: provisioner, + driverName: driver, provisionerClient: &mpc, bucketClient: client, kubeClient: kubeClient, - namespace: ns, } t.Logf(tc.name) @@ -208,7 +258,7 @@ func TestAddBucketAccess(t *testing.T) { t.Errorf("Add returned: %+v", err) } - updatedBA, _ := bal.BucketAccesses().Get(ctx, ba.Name, metav1.GetOptions{}) + updatedBA, _ := bal.bucketAccesses(ns).Get(ctx, ba.ObjectMeta.Name, metav1.GetOptions{}) if updatedBA.Status.AccessGranted != true { t.Errorf("Expected %t, got %t", true, ba.Status.AccessGranted) } @@ -216,16 +266,9 @@ func TestAddBucketAccess(t *testing.T) { t.Errorf("Expected %s, got %s", accountId, updatedBA.Status.AccountID) } - secretName := "ba-" + string(ba.UID) - secret, err := bal.Secrets(ns).Get(ctx, secretName, metav1.GetOptions{}) + _, err = bal.secrets(ns).Get(ctx, secretName, metav1.GetOptions{}) if err != nil { - t.Fatalf("minted secret creation failed: %v", err) - } - - if secret.StringData["Credentials"] != creds { - t.Errorf("Expected %s, got %s", - creds, - secret.StringData["Credentials"]) + t.Fatalf("Secret creation failed: %v", err) } } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go index 5c456a90..df365982 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go @@ -16,18 +16,20 @@ package consts const ( - AccountNamePrefix = "ba-" - BABucketFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-bucket-protection" - BAFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection" - BCFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" - BucketFinalizer = "cosi.objectstorage.k8s.io/bucket-protection" - SecretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" + AccountNamePrefix = "ba-" + BucketInfoPrefix = "bc-" - S3Key = "s3" - AzureKey = "azure" - S3SecretAccessKeyID = "accessKeyID" - S3SecretAccessSecretKey = "accessSecretKey" - AzureSecretAccessToken = "accessToken" - AzureSecretExpiryTimeStamp = "expiryTs" - DefaultTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" + BABucketFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-bucket-protection" + BAFinalizer = "cosi.objectstorage.k8s.io/bucketaccess-protection" + BCFinalizer = "cosi.objectstorage.k8s.io/bucketclaim-protection" + BucketFinalizer = "cosi.objectstorage.k8s.io/bucket-protection" + SecretFinalizer = "cosi.objectstorage.k8s.io/secret-protection" + + S3Key = "s3" + AzureKey = "azure" + S3SecretAccessKeyID = "accessKeyID" + S3SecretAccessSecretKey = "accessSecretKey" + AzureSecretAccessToken = "accessToken" + AzureSecretExpiryTimeStamp = "expiryTs" + DefaultTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" ) From 9fe980b84e9589baa9ab37749a5c446501df03db Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 8 Aug 2022 01:48:52 -0700 Subject: [PATCH 206/299] Fixing the updated api version and rbac rules --- container-object-storage-interface-controller/go.mod | 2 +- container-object-storage-interface-controller/go.sum | 4 ++-- .../resources/rbac.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 1cbf4915..fd0cdf1a 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -9,7 +9,7 @@ require ( k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e + sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 3da7cc83..65ae442c 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -706,8 +706,8 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e h1:FMupf2xGqbZaE89eeF0gUKbm82wzRpd2u9atmyuajIw= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220727205553-02ff3dd25b5e/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= +sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= diff --git a/container-object-storage-interface-controller/resources/rbac.yaml b/container-object-storage-interface-controller/resources/rbac.yaml index 1005c358..8123e1aa 100644 --- a/container-object-storage-interface-controller/resources/rbac.yaml +++ b/container-object-storage-interface-controller/resources/rbac.yaml @@ -11,10 +11,10 @@ metadata: app.kubernetes.io/name: container-object-storage-interface-controller rules: - apiGroups: ["objectstorage.k8s.io"] - resources: ["bucketrequests", "bucketaccessrequests", "bucketrequests/status", "bucketaccessrequests/status"] + resources: ["bucketclaims", "bucketaccesses", "bucketclaims/status", "bucketaccesses/status"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["objectstorage.k8s.io"] - resources: ["buckets", "bucketaccesses"] + resources: ["buckets"] verbs: ["get", "list", "watch", "update", "create", "delete"] - apiGroups: ["objectstorage.k8s.io"] resources: ["bucketclasses","bucketaccessclasses"] From 92e0492ee9f7248a8ed6d0b2c5eae21e6a8f91cb Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 11 Aug 2022 11:06:17 -0700 Subject: [PATCH 207/299] Fixing the text in deployment guide --- .../docs/deployment-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/docs/deployment-guide.md b/container-object-storage-interface-controller/docs/deployment-guide.md index 7373d6ab..12682051 100644 --- a/container-object-storage-interface-controller/docs/deployment-guide.md +++ b/container-object-storage-interface-controller/docs/deployment-guide.md @@ -1,4 +1,4 @@ -# Deploying Container Object Storage Interface (COSI) Controller On Kubernetes +# Deployment guide for Container Object Storage Interface (COSI) Controller On Kubernetes This document describes steps for Kubernetes administrators to setup Container Object Storage Interface Controller (COSI) Controller onto a Kubernetes cluster. From b3312b432724fc9d9fbe73fb0b9bead7e625f4ed Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 11 Aug 2022 11:30:51 -0700 Subject: [PATCH 208/299] Doc changes --- .../docs/deployment-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/docs/deployment-guide.md b/container-object-storage-interface-controller/docs/deployment-guide.md index 12682051..32c3e575 100644 --- a/container-object-storage-interface-controller/docs/deployment-guide.md +++ b/container-object-storage-interface-controller/docs/deployment-guide.md @@ -1,4 +1,4 @@ -# Deployment guide for Container Object Storage Interface (COSI) Controller On Kubernetes +# Deployment guide This document describes steps for Kubernetes administrators to setup Container Object Storage Interface Controller (COSI) Controller onto a Kubernetes cluster. From 921f8f5b84960f301c14df0950a651e9f0394220 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 11 Aug 2022 11:37:15 -0700 Subject: [PATCH 209/299] Updating the k8s-testimages --- container-object-storage-interface-controller/cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index bd575de7..fa8784be 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -6,9 +6,9 @@ substitutions: options: substitution_option: ALLOW_LOOSE steps: -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['build'] -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['push'] \ No newline at end of file From ba32039afb21beac59f63ed9994fadde048706c0 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 11 Aug 2022 11:47:11 -0700 Subject: [PATCH 210/299] Fixing the build image push --- .../cloudbuild.yaml | 4 ++-- container-object-storage-interface-provisioner-sidecar/go.mod | 2 +- container-object-storage-interface-provisioner-sidecar/go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml index 347dde52..7ccfb9d4 100644 --- a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -3,9 +3,9 @@ timeout: 3000s options: substitution_option: ALLOW_LOOSE steps: -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['build'] -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db" +- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['push'] diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 6b1e7ea7..84fc76e0 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -13,7 +13,7 @@ require ( k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 - sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 + sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830 sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 6383b9e6..ae66e2e3 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -727,8 +727,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3 h1:rIQHvH08W4Q887mQs1BCQWf32MYkQJNER3ZvxGjL6sc= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220804173401-3154aa8927e3/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830 h1:o8/7mIJCflt33epl4TZNS/+M5MktS8fQvcNuN8p235k= +sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= From bd8f3165a5b688c88f4a4ad4824713e28a0d9a88 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Mon, 15 Aug 2022 14:47:12 -0700 Subject: [PATCH 211/299] Create CHANGELOG-0.1.md --- .../CHANGELOG/CHANGELOG-0.1.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 container-object-storage-interface-controller/CHANGELOG/CHANGELOG-0.1.md diff --git a/container-object-storage-interface-controller/CHANGELOG/CHANGELOG-0.1.md b/container-object-storage-interface-controller/CHANGELOG/CHANGELOG-0.1.md new file mode 100644 index 00000000..60d975be --- /dev/null +++ b/container-object-storage-interface-controller/CHANGELOG/CHANGELOG-0.1.md @@ -0,0 +1,7 @@ +# First Release v0.1.0 + + ### New Features + + - Listen on Bucket* events + - Create Buckets in response to BucketClaim creation + - Enable lifecycle of Buckets and BucketAccesses From 6dd7c3981c88f9ee2b3420d53f22095513cbd310 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Mon, 15 Aug 2022 15:08:37 -0700 Subject: [PATCH 212/299] Create CHANGELOG-0.1.md --- .../CHANGELOG/CHANGELOG-0.1.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/CHANGELOG/CHANGELOG-0.1.md diff --git a/container-object-storage-interface-provisioner-sidecar/CHANGELOG/CHANGELOG-0.1.md b/container-object-storage-interface-provisioner-sidecar/CHANGELOG/CHANGELOG-0.1.md new file mode 100644 index 00000000..d19a96d8 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/CHANGELOG/CHANGELOG-0.1.md @@ -0,0 +1,7 @@ +# First Release v0.1.0 + + ### New Features + + - Listen for Bucket* resources + - Call driver APIs to create and manage buckets + - Call driver APIs to create and manage credentials From e7c8973986d8531e9316028c35a4208f92553811 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Mon, 15 Aug 2022 17:51:59 -0700 Subject: [PATCH 213/299] Update cloudbuild.yaml Update image tag --- .../cloudbuild.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index fa8784be..bacbd1d7 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -2,13 +2,20 @@ timeout: 3000s substitutions: _IMAGE_NAME: 'gcr.io/k8s-staging-sig-storage/objectstorage-controller' - _IMAGE_TAG: 'canary' + _GIT_TAG: '12345' + _PULL_BASE_REF: 'master' options: substitution_option: ALLOW_LOOSE steps: - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['build'] + env: + - GIT_TAG=${_GIT_TAG} + - PULL_BASE_REF=${_PULL_BASE_REF} - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make - args: ['push'] \ No newline at end of file + args: ['push'] + env: + - GIT_TAG=${_GIT_TAG} + - PULL_BASE_REF=${_PULL_BASE_REF} From 098c30a0ee20437ef28bc0ccd0de1cd4a75e17dd Mon Sep 17 00:00:00 2001 From: Niu Lechuan Date: Fri, 2 Sep 2022 11:53:19 +0800 Subject: [PATCH 214/299] update CRDs url, and remove deleted test file in README.md Signed-off-by: Niu Lechuan --- container-object-storage-interface-controller/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/README.md b/container-object-storage-interface-controller/README.md index 1ca66051..436ae7a7 100644 --- a/container-object-storage-interface-controller/README.md +++ b/container-object-storage-interface-controller/README.md @@ -15,13 +15,12 @@ and generates the associated CRDs: Before diving into the code of this repo, we suggest that you familiarize yourself with: -- The Spec of CRDs in [objectstorage.k8s.io/v1alpha1/types.go](https://github.com/kubernetes-sigs/container-object-storage-interface-api/blob/master/apis/objectstorage.k8s.io/v1alpha1/types.go) +- The Spec of CRDs in [objectstorage.k8s.io/v1alpha1/types.go](https://github.com/kubernetes-sigs/container-object-storage-interface-api/blob/master/apis/objectstorage/v1alpha1/types.go) - The Spec of the COSI objects [sigs.k8s.io/container-object-storage-interface-spec](https://github.com/kubernetes-sigs/container-object-storage-interface-spec) A good starting point towards understanding the functionality of this repo would be to study the tests: -- [BucketRequest Test](./pkg/bucketrequest/bucketrequest_test.go) -- [BucketAccessRequest Test](./pkg/bucketaccessrequest/bucketaccessrequest_test.go) +- [BucketClaim Test](./pkg/bucketclaim/bucketclaim_test.go) ### Build and Test From 70aa06a930acf88493c795f4b003b5a1eb885c2c Mon Sep 17 00:00:00 2001 From: Niu Lechuan Date: Fri, 2 Sep 2022 13:56:46 +0800 Subject: [PATCH 215/299] fix test file path in README.md Signed-off-by: Niu Lechuan --- .../README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/README.md b/container-object-storage-interface-provisioner-sidecar/README.md index ab8ab1ea..60d3d2f4 100644 --- a/container-object-storage-interface-provisioner-sidecar/README.md +++ b/container-object-storage-interface-provisioner-sidecar/README.md @@ -20,8 +20,8 @@ Before diving into the code of this repo, we suggest that you familiarize yourse A good starting point towards understanding the functionality of this repo would be to study the tests: -- [Bucket Controller Test](./pkg/controller/bucket/bucket_controller_test.go) -- [Bucket Access Controller Test](./pkg/controller/bucketaccess/bucket_access_controller_test.go) +- [Bucket Controller Test](./pkg/bucket/bucket_controller_test.go) +- [Bucket Access Controller Test](./pkg/bucketaccess/bucketaccess_controller_test.go) ### Build and Test From 5fc811ff6b25b621c629611177ed8e286efebef0 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Thu, 8 Sep 2022 10:20:31 -0700 Subject: [PATCH 216/299] Update Makefile Remove tag override --- container-object-storage-interface-controller/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 7a5a842d..970f5f32 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -28,4 +28,3 @@ CMDS=controller-manager include release-tools/build.make IMAGE_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-controller -IMAGE_TAGS=canary From eea1bc135e3fc815e8b7c0a92ec2bfe7d9429786 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Thu, 15 Sep 2022 10:15:54 -0700 Subject: [PATCH 217/299] Update Makefile Set `git tab` --- container-object-storage-interface-controller/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 970f5f32..c8fb281e 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -28,3 +28,4 @@ CMDS=controller-manager include release-tools/build.make IMAGE_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-controller +IMAGE_TAGS=$(GIT_TAG) From 4d6cb85d3c024ba218140c1db1bb02dbffecab2f Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Thu, 15 Sep 2022 12:26:19 -0700 Subject: [PATCH 218/299] Update Makefile --- container-object-storage-interface-provisioner-sidecar/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 2f5e77a4..833dad59 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -29,4 +29,4 @@ release-tools/build.make: include release-tools/build.make REGISTRY_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-sidecar -IMAGE_TAGS=canary +IMAGE_TAGS=$(GIT_TAG) From 4655fbd615cfb86a29b8aeb15a0d397fb95afc53 Mon Sep 17 00:00:00 2001 From: Sidhartha Mani Date: Thu, 15 Sep 2022 12:27:39 -0700 Subject: [PATCH 219/299] Update cloudbuild.yaml --- .../cloudbuild.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml index 7ccfb9d4..fd7f0514 100644 --- a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -6,6 +6,12 @@ steps: - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['build'] + env: + - GIT_TAG=${_GIT_TAG} + - PULL_BASE_REF=${_PULL_BASE_REF} - name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" entrypoint: make args: ['push'] + env: + - GIT_TAG=${_GIT_TAG} + - PULL_BASE_REF=${_PULL_BASE_REF} From 1fbaac9bfd022c5d09687dfee8d762b54af6f5ca Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Sun, 18 Sep 2022 18:30:52 -0700 Subject: [PATCH 220/299] Fixing a bucketclaim object updation bug --- .../pkg/bucketclaim/bucketclaim.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 9eb33c42..fb20d0f9 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -99,7 +99,8 @@ func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1. // ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] // ErrBucketAlreadyExists - BucketClaim already processed // non-nil err - Internal error [requeue'd with exponential backoff] -func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { +func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, inputBucketClaim *v1alpha1.BucketClaim) error { + bucketClaim := inputBucketClaim.DeepCopy() if bucketClaim.Status.BucketReady { return util.ErrBucketAlreadyExists } From a39cb368fa01f307f3a15ed6a3cc32d19df1dd66 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 19 Sep 2022 00:44:19 -0700 Subject: [PATCH 221/299] Fixing a couple of update bugs --- .../pkg/bucketclaim/bucketclaim.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index fb20d0f9..7cb532df 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -86,7 +86,7 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc // Delete processes a bucket for which bucket request is deleted func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { - klog.V(3).Infof("Delete BucketClaim %v", + klog.V(3).Infof("Delete BucketClaim", "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace) @@ -172,8 +172,11 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClaim.Status.BucketReady = false } - _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + // Fetching the updated bucketClaim again, so that the update + // operation doesn't happen on an outdated version of the bucketClaim. + bucketClaim, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { + klog.ErrorS(err, "Failed to update status of BucketClaim", "name", bucketClaim.ObjectMeta.Name) return err } @@ -182,8 +185,10 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, controllerutil.AddFinalizer(bucketClaim, util.BucketClaimFinalizer) _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { + klog.ErrorS(err, "Failed to update BucketClaim", "name", bucketClaim.ObjectMeta.Name) return err } + klog.Infof("Finished creating Bucket %v", bucketName) return nil } From 3671a20c37f6764ec8655008972e8da442a92917 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 19 Sep 2022 01:09:15 -0700 Subject: [PATCH 222/299] Adding a few logs and some fixes --- .../pkg/bucket/bucket_controller.go | 24 ++++++++++++++----- .../bucketaccess/bucketaccess_controller.go | 3 ++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index b5040baf..e7476f0a 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -87,10 +87,12 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) return nil } - if bucket.Spec.ExistingBucketID != "" { - bucket.Status.BucketReady = true - bucket.Status.BucketID = bucket.Spec.ExistingBucketID + bucketReady := false + var bucketID string + if bucket.Spec.ExistingBucketID != "" { + bucketReady = true + bucketID = bucket.Spec.ExistingBucketID } else { req := &cosi.DriverCreateBucketRequest{ Parameters: bucket.Spec.Parameters, @@ -114,8 +116,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if rsp.BucketId != "" { - bucket.Status.BucketID = rsp.BucketId - bucket.Status.BucketReady = true + bucketID = rsp.BucketId + bucketReady = true } else { err = errors.New("DriverCreateBucket returned an empty bucketID") return err @@ -126,22 +128,32 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) ref := bucket.Spec.BucketClaim bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { + klog.ErrorS(err, "Failed to get bucketClaim", + "bucketClaim", ref.Name, + "bucket", bucket.ObjectMeta.Name) return err } bucketClaim.Status.BucketReady = true if _, err = b.bucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + klog.ErrorS(err, "Failed to update bucketClaim", + "bucketClaim", ref.Name, + "bucket", bucket.ObjectMeta.Name) return err } } } controllerutil.AddFinalizer(bucket, consts.BucketFinalizer) - if _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { + if bucket, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to update bucket finalizers") } + // Setting the status here so that the updated object is used + bucket.Status.BucketReady = bucketReady + bucket.Status.BucketID = bucketID + // if this step fails, then controller will retry with backoff if _, err = b.buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update bucket status", diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 50e54090..1db40ab9 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -266,7 +266,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if controllerutil.AddFinalizer(bucketAccess, consts.BAFinalizer) { - if _, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { + bucketAccess, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}) + if err != nil { klog.ErrorS(err, "Failed to update BucketAccess finalizer", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) From 299025dff6841be5d3b6d4a384ac90c69663044f Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 19 Sep 2022 02:18:06 -0700 Subject: [PATCH 223/299] Fixing the update of bucketclaim to updatestatus --- .../pkg/bucket/bucket_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index e7476f0a..22e09071 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -135,7 +135,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } bucketClaim.Status.BucketReady = true - if _, err = b.bucketClaims(bucketClaim.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + if _, err = b.bucketClaims(bucketClaim.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { klog.ErrorS(err, "Failed to update bucketClaim", "bucketClaim", ref.Name, "bucket", bucket.ObjectMeta.Name) From 8e89176f6f16e9ebd1e2ca2eee719e4745eef26f Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 19 Sep 2022 11:22:23 -0700 Subject: [PATCH 224/299] Improving some logs --- .../pkg/bucketclaim/bucketclaim.go | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 7cb532df..387fb50e 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -39,7 +39,7 @@ func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc if err != nil { switch err { case util.ErrInvalidBucketClass: - klog.ErrorS(util.ErrInvalidBucketClass, + klog.V(3).ErrorS(util.ErrInvalidBucketClass, "bucketClaim", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace, "bucketClassName", bucketClaim.Spec.BucketClassName) @@ -50,7 +50,7 @@ func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc ) return nil default: - klog.ErrorS(err, + klog.V(3).ErrorS(err, "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace, "err", err) @@ -77,10 +77,19 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc bucketName := bucketClaim.Status.BucketName err := b.buckets().Delete(ctx, bucketName, metav1.DeleteOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error deleting bucket", + "bucket", bucketName, + "bucketClaim", bucketClaim.ObjectMeta.Name) return err } + + klog.V(5).Infof("Successfully deleted bucket: %s from bucketClaim: %s", bucketName, bucketClaim.ObjectMeta.Name) } } + + klog.V(3).InfoS("Update BucketClaim success", + "name", bucketClaim.ObjectMeta.Name, + "ns", bucketClaim.ObjectMeta.Namespace) return nil } @@ -112,7 +121,7 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) + klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) return err } @@ -124,6 +133,9 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error updating existing bucket", + "bucket", bucket.ObjectMeta.Name, + "bucketClaim", bucketClaim.ObjectMeta.Name) return err } @@ -137,7 +149,7 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) + klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) return util.ErrInvalidBucketClass } @@ -164,7 +176,9 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucket.Spec.Protocols = protocolCopy bucket, err = b.buckets().Create(ctx, bucket, metav1.CreateOptions{}) if err != nil && !errors.IsAlreadyExists(err) { - klog.ErrorS(err, "name", bucketName) + klog.V(3).ErrorS(err, "Error creationg bucket", + "bucket", bucketName, + "bucketClaim", bucketClaim.ObjectMeta.Name) return err } @@ -176,7 +190,7 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, // operation doesn't happen on an outdated version of the bucketClaim. bucketClaim, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { - klog.ErrorS(err, "Failed to update status of BucketClaim", "name", bucketClaim.ObjectMeta.Name) + klog.V(3).ErrorS(err, "Failed to update status of BucketClaim", "name", bucketClaim.ObjectMeta.Name) return err } @@ -185,11 +199,11 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, controllerutil.AddFinalizer(bucketClaim, util.BucketClaimFinalizer) _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { - klog.ErrorS(err, "Failed to update BucketClaim", "name", bucketClaim.ObjectMeta.Name) + klog.V(3).ErrorS(err, "Failed to add finalizer BucketClaim", "name", bucketClaim.ObjectMeta.Name) return err } - klog.Infof("Finished creating Bucket %v", bucketName) + klog.V(3).Infof("Finished creating Bucket %v", bucketName) return nil } From e9c0a4edb680e1be3fa73d38fdb07bce77ea137e Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 19 Sep 2022 11:21:55 -0700 Subject: [PATCH 225/299] Improving logs and fixing a delete scenario --- .../pkg/bucket/bucket_controller.go | 49 +++++++++++++++---- .../bucketaccess/bucketaccess_controller.go | 41 ++++++++++------ 2 files changed, 67 insertions(+), 23 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 22e09071..63a40ee1 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -102,7 +102,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - klog.ErrorS(err, "Failed to create bucket", + klog.V(3).ErrorS(err, "Driver failed to create bucket", "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to create bucket") } @@ -111,7 +111,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if rsp == nil { err = errors.New("DriverCreateBucket returned a nil response") - klog.ErrorS(err, "Internal Error") + klog.V(3).ErrorS(err, "Internal Error from driver", + "bucket", bucket.ObjectMeta.Name) return err } @@ -119,6 +120,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucketID = rsp.BucketId bucketReady = true } else { + klog.V(3).ErrorS(err, "DriverCreateBucket returned an empty bucketID", + "bucket", bucket.ObjectMeta.Name) err = errors.New("DriverCreateBucket returned an empty bucketID") return err } @@ -128,7 +131,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) ref := bucket.Spec.BucketClaim bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Failed to get bucketClaim", + klog.V(3).ErrorS(err, "Failed to get bucketClaim", "bucketClaim", ref.Name, "bucket", bucket.ObjectMeta.Name) return err @@ -136,31 +139,40 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucketClaim.Status.BucketReady = true if _, err = b.bucketClaims(bucketClaim.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucketClaim", + klog.V(3).ErrorS(err, "Failed to update bucketClaim", "bucketClaim", ref.Name, "bucket", bucket.ObjectMeta.Name) return err } + + klog.V(5).Infof("Successfully updated status of bucketClaim: %s, bucket: %s", bucketClaim.ObjectMeta.Name, bucket.ObjectMeta.Name) } } controllerutil.AddFinalizer(bucket, consts.BucketFinalizer) if bucket, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) + klog.V(3).ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to update bucket finalizers") } + klog.V(5).Infof("Successfully added finalizer to bucket: %s", bucket.ObjectMeta.Name) + // Setting the status here so that the updated object is used bucket.Status.BucketReady = bucketReady bucket.Status.BucketID = bucketID // if this step fails, then controller will retry with backoff if _, err = b.buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update bucket status", + klog.V(3).ErrorS(err, "Failed to update bucket status", "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, "Failed to update bucket status") } + klog.V(3).InfoS("Add Bucket success", + "bucket", bucket.ObjectMeta.Name, + "bucketID", bucketID, + "ns", bucket.ObjectMeta.Namespace) + return nil } @@ -186,12 +198,18 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) if strings.EqualFold(bucketAccess.Spec.BucketClaimName, bucketClaimName) { err = b.bucketAccesses(bucketClaimNs).Delete(ctx, bucketAccess.Name, metav1.DeleteOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error deleting BucketAccess", + "name", bucketAccess.Name, + "bucket", bucket.ObjectMeta.Name) return err } } } + klog.V(5).Infof("Successfully deleted dependent bucketAccess of bucket:%s", bucket.ObjectMeta.Name) + controllerutil.RemoveFinalizer(bucket, consts.BABucketFinalizer) + klog.V(5).Infof("Successfully removed finalizer: %s of bucket: %s", consts.BABucketFinalizer, bucket.ObjectMeta.Name) } if controllerutil.ContainsFinalizer(bucket, consts.BucketFinalizer) { @@ -202,6 +220,9 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) } } + klog.V(3).InfoS("Update Bucket success", + "name", bucket.ObjectMeta.Name, + "ns", bucket.ObjectMeta.Namespace) return nil } @@ -225,7 +246,7 @@ func (b *BucketListener) InitializeKubeClient(k kube.Interface) { serverVersion, err := k.Discovery().ServerVersion() if err != nil { - klog.ErrorS(err, "Cannot determine server version") + klog.V(3).ErrorS(err, "Cannot determine server version") } else { b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) } @@ -238,7 +259,7 @@ func (b *BucketListener) InitializeBucketClient(bc buckets.Interface) { func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bucket) error { if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { - klog.V(5).InfoS("Skipping bucket for provisiner", + klog.V(5).InfoS("Skipping bucket for provisioner", "bucket", bucket.ObjectMeta.Name, "driver", bucket.Spec.DriverName, ) @@ -254,26 +275,36 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - klog.ErrorS(err, "Failed to delete bucket", + klog.V(3).ErrorS(err, "Failed to delete bucket", "bucket", bucket.ObjectMeta.Name, ) return err } } + + klog.V(5).Infof("Successfully deleted bucketID: %s from the object storage for bucket: %s", bucket.Status.BucketID, bucket.ObjectMeta.Name) } if bucket.Spec.BucketClaim != nil { ref := bucket.Spec.BucketClaim bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error fetching bucketClaim", + "bucketClaim", ref.Name, + "bucket", bucket.ObjectMeta.Name) return err } if controllerutil.RemoveFinalizer(bucketClaim, consts.BCFinalizer) { if _, err := b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}); err != nil { + klog.V(3).ErrorS(err, "Error removing finalizer from bucketClaim", + "bucketClaim", bucketClaim.ObjectMeta.Name, + "bucket", bucket.ObjectMeta.Name) return err } } + + klog.V(5).Infof("Successfully removed finalizer: %s from bucketClaim: %s for bucket: %s", consts.BCFinalizer, bucketClaim.ObjectMeta.Name, bucket.ObjectMeta.Name) } return nil diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 1db40ab9..8dde3c54 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -107,13 +107,13 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a namespace := bucketAccess.ObjectMeta.Namespace bucketClaim, err := bal.bucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) + klog.V(3).ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) return errors.Wrap(err, "Failed to fetch bucketClaim") } if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { err := errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") - klog.ErrorS(err, + klog.V(3).ErrorS(err, "Invalid arguments", "bucketClaim", bucketClaim.Name, "bucketAccess", bucketAccess.ObjectMeta.Name, @@ -142,7 +142,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) if err != nil { - klog.ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) + klog.V(3).ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) return errors.Wrap(err, "Failed to fetch bucket") } @@ -163,7 +163,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - klog.ErrorS(err, + klog.V(3).ErrorS(err, "Failed to grant access", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucketClaim", bucketClaimName, @@ -175,14 +175,14 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if rsp.AccountId == "" { err = errors.New("AccountId not defined in DriverGrantBucketAccess") - klog.ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) + klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } credentials := rsp.Credentials if len(credentials) != 1 { err = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") - klog.ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) + klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } @@ -230,7 +230,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if _, err := bal.secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { if !kubeerrors.IsNotFound(err) { - klog.ErrorS(err, + klog.V(3).ErrorS(err, "Failed to create secrets", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) @@ -249,7 +249,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a Type: corev1.SecretTypeOpaque, }, metav1.CreateOptions{}); err != nil { if !kubeerrors.IsAlreadyExists(err) { - klog.ErrorS(err, + klog.V(3).ErrorS(err, "Failed to create minted secret", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) @@ -268,7 +268,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if controllerutil.AddFinalizer(bucketAccess, consts.BAFinalizer) { bucketAccess, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}) if err != nil { - klog.ErrorS(err, "Failed to update BucketAccess finalizer", + klog.V(3).ErrorS(err, "Failed to update BucketAccess finalizer", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess finalizer. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) @@ -280,7 +280,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a // if this step fails, then controller will retry with backoff if _, err := bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).UpdateStatus(ctx, bucketAccess, metav1.UpdateOptions{}); err != nil { - klog.ErrorS(err, "Failed to update BucketAccess Status", + klog.V(3).ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess Status. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) @@ -298,11 +298,15 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. "name", old.ObjectMeta.Name) bucketAccess := new.DeepCopy() - err := bal.deleteBucketAccessOp(ctx, bucketAccess) - if err != nil { - return err + if !bucketAccess.GetDeletionTimestamp().IsZero() { + err := bal.deleteBucketAccessOp(ctx, bucketAccess) + if err != nil { + return err + } } + klog.V(3).InfoS("Update BucketAccess success", + "name", old.ObjectMeta.Name) return nil } @@ -329,15 +333,24 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke if controllerutil.RemoveFinalizer(secret, consts.SecretFinalizer) { _, err = bal.secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error removing finalizer from secret", + "secret", secret.ObjectMeta.Name, + "bucketAccess", bucketAccess.ObjectMeta.Name) return err } + + klog.V(5).Infof("Successfully removed finalizer from secret: %s, bucketAccess: %s", secret.ObjectMeta.Name, bucketAccess.ObjectMeta.Name) } if controllerutil.RemoveFinalizer(bucketAccess, consts.BAFinalizer) { _, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}) if err != nil { + klog.V(3).ErrorS(err, "Error removing finalizer from bucketAccess", + "bucketAccess", bucketAccess.ObjectMeta.Name) return err } + + klog.V(5).Infof("Successfully removed finalizer from bucketAccess: %s", bucketAccess.ObjectMeta.Name) } return nil @@ -384,7 +397,7 @@ func (bal *BucketAccessListener) InitializeKubeClient(k kube.Interface) { serverVersion, err := k.Discovery().ServerVersion() if err != nil { - klog.ErrorS(err, "Cannot determine server version") + klog.V(3).ErrorS(err, "Cannot determine server version") } else { bal.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) } From f0c6e680e8516ceb2b3330ebe5e584fb55b732e0 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 22 Sep 2022 06:18:06 -0700 Subject: [PATCH 226/299] Adding the bucket finalizer removal --- .../pkg/bucket/bucket_controller.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 63a40ee1..5871c14a 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -217,6 +217,16 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) if err != nil { return err } + + controllerutil.RemoveFinalizer(bucket, consts.BucketFinalizer) + klog.V(5).Infof("Successfully removed finalizer: %s of bucket: %s", consts.BucketFinalizer, bucket.ObjectMeta.Name) + } + + _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error updating bucket after removing finalizers", + "bucket", bucket.ObjectMeta.Name) + return err } } From 220f9be2cc84dc55231d57bc61d25b733e55785b Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Tue, 27 Sep 2022 23:38:53 -0700 Subject: [PATCH 227/299] Fixing the finalizer of bucketclaim in bucket delete --- .../pkg/bucket/bucket_controller.go | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 5871c14a..75768848 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -237,6 +237,8 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) } // Delete attemps to delete a bucket. This function must be idempotent +// Delete function is called when the bucket was not able to add finalizers while creation. +// Hence we will take care of removing the BucketClaim finalizer before deleting the Bucket object. // Return values // nil - Bucket successfully deleted // non-nil err - Internal error [requeue'd with exponential backoff] @@ -246,6 +248,29 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke "bucketclass", inputBucket.Spec.BucketClassName, ) + if inputBucket.Spec.BucketClaim != nil { + klog.V(3).Infof("Removing dependent BucketClaim finalizer") + ref := inputBucket.Spec.BucketClaim + + bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error getting bucketClaim for removing finalizer", + "bucket", inputBucket.ObjectMeta.Name, + "bucketClaim", ref.Name) + return err + } + + if controllerutil.RemoveFinalizer(bucketClaim, consts.BCFinalizer) { + _, err := b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error removing bucketClaim finalizer", + "bucket", inputBucket.ObjectMeta.Name, + "bucketClaim", bucketClaim.ObjectMeta.Name) + return err + } + } + } + return nil } From 720d9167bf6490129a67560847006655c762ae95 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Wed, 28 Sep 2022 09:18:07 -0700 Subject: [PATCH 228/299] Fixing some logs and adding bucket paramaters --- .../pkg/bucket/bucket_controller.go | 47 +++++++++++++++---- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 75768848..8a00dadb 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -17,6 +17,7 @@ package bucket import ( "context" + "fmt" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -66,9 +67,13 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) var err error klog.V(3).InfoS("Add Bucket", - "name", bucket.ObjectMeta.Name, - "bucketclass", bucket.Spec.BucketClassName, - ) + "name", bucket.ObjectMeta.Name) + + if bucket.Spec.BucketClassName == "" { + err = errors.New(fmt.Sprintf("BucketClassName not defined for bucket %s", bucket.ObjectMeta.Name)) + klog.V(3).ErrorS(err, "BucketClassName not defined") + return err + } if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for driver", @@ -93,6 +98,24 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.ExistingBucketID != "" { bucketReady = true bucketID = bucket.Spec.ExistingBucketID + if bucket.Spec.Parameters == nil { + bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error fetching bucketClass", + "bucketClass", bucket.Spec.BucketClassName, + "bucket", bucket.ObjectMeta.Name) + return err + } + + if bucketClass.Parameters != nil { + var param map[string]string + for k, v := range bucketClass.Parameters { + param[k] = v + } + + bucket.Spec.Parameters = param + } + } } else { req := &cosi.DriverCreateBucketRequest{ Parameters: bucket.Spec.Parameters, @@ -110,7 +133,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if rsp == nil { - err = errors.New("DriverCreateBucket returned a nil response") + err = errors.New(fmt.Sprintf("DriverCreateBucket returned a nil response for bucket: %s", bucket.ObjectMeta.Name)) klog.V(3).ErrorS(err, "Internal Error from driver", "bucket", bucket.ObjectMeta.Name) return err @@ -122,7 +145,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } else { klog.V(3).ErrorS(err, "DriverCreateBucket returned an empty bucketID", "bucket", bucket.ObjectMeta.Name) - err = errors.New("DriverCreateBucket returned an empty bucketID") + err = errors.New(fmt.Sprintf("DriverCreateBucket returned an empty bucketID for bucket: %s",bucket.ObjectMeta.Name)) return err } @@ -245,12 +268,11 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error { klog.V(3).InfoS("Delete Bucket", "name", inputBucket.ObjectMeta.Name, - "bucketclass", inputBucket.Spec.BucketClassName, - ) + "bucketclass", inputBucket.Spec.BucketClassName) if inputBucket.Spec.BucketClaim != nil { - klog.V(3).Infof("Removing dependent BucketClaim finalizer") ref := inputBucket.Spec.BucketClaim + klog.V(3).Infof("Removing finalizer of bucketClaim: %s before deleting bucket: %s", ref.Name, inputBucket.ObjectMeta.Name) bucketClaim, err := b.bucketClaims(ref.Namespace).Get(ctx, ref.Name, metav1.GetOptions{}) if err != nil { @@ -261,7 +283,7 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke } if controllerutil.RemoveFinalizer(bucketClaim, consts.BCFinalizer) { - _, err := b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) + _, err := b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { klog.V(3).ErrorS(err, "Error removing bucketClaim finalizer", "bucket", inputBucket.ObjectMeta.Name, @@ -352,6 +374,13 @@ func (b *BucketListener) buckets() bucketapi.BucketInterface { panic("uninitialized listener") } +func (b *BucketListener) bucketClasses() bucketapi.BucketClassInterface { + if b.bucketClient != nil { + return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() + } + panic("uninitialized listener") +} + func (b *BucketListener) bucketClaims(namespace string) bucketapi.BucketClaimInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) From e9539da2f76c0236052b8d17aed12794f8d69310 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Wed, 28 Sep 2022 09:22:38 -0700 Subject: [PATCH 229/299] Fixing some parameters in case of existing bucket id --- .../pkg/bucketclaim/bucketclaim.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 387fb50e..a32337e9 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -131,6 +131,10 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, UID: bucketClaim.ObjectMeta.UID, } + protocolCopy := make([]v1alpha1.Protocol, len(bucketClaim.Spec.Protocols)) + copy(protocolCopy, bucketClaim.Spec.Protocols) + + bucket.Spec.Protocols = protocolCopy _, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) if err != nil { klog.V(3).ErrorS(err, "Error updating existing bucket", From c585f28a9b20e7db366c5fc027f0a1e6d921cdda Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Wed, 28 Sep 2022 12:15:32 -0700 Subject: [PATCH 230/299] Remove the secret on deletion of the bucketAccess --- .../pkg/bucketaccess/bucketaccess_controller.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 8dde3c54..3cd36c7e 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -331,7 +331,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke } if controllerutil.RemoveFinalizer(secret, consts.SecretFinalizer) { - _, err = bal.secrets(bucketAccess.ObjectMeta.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) + _, err = bal.secrets(secret.ObjectMeta.Namespace).Update(ctx, secret, metav1.UpdateOptions{}) if err != nil { klog.V(3).ErrorS(err, "Error removing finalizer from secret", "secret", secret.ObjectMeta.Name, @@ -342,6 +342,15 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke klog.V(5).Infof("Successfully removed finalizer from secret: %s, bucketAccess: %s", secret.ObjectMeta.Name, bucketAccess.ObjectMeta.Name) } + err = bal.secrets(secret.ObjectMeta.Namespace).Delete(ctx, credSecretName, metav1.DeleteOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error deleting secret", + "secret", secret.ObjectMeta.Name, + "bucketAccess", bucketAccess.ObjectMeta.Name, + "ns", bucketAccess.ObjectMeta.Namespace) + return nil + } + if controllerutil.RemoveFinalizer(bucketAccess, consts.BAFinalizer) { _, err = bal.bucketAccesses(bucketAccess.ObjectMeta.Namespace).Update(ctx, bucketAccess, metav1.UpdateOptions{}) if err != nil { From 122cdb161f0316147cb2de5212173f722aa94159 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Thu, 29 Sep 2022 08:45:27 -0700 Subject: [PATCH 231/299] Adding unittests --- .../pkg/bucket/bucket_controller.go | 2 +- .../pkg/bucket/bucket_controller_test.go | 36 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 8a00dadb..29ab789d 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -145,7 +145,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } else { klog.V(3).ErrorS(err, "DriverCreateBucket returned an empty bucketID", "bucket", bucket.ObjectMeta.Name) - err = errors.New(fmt.Sprintf("DriverCreateBucket returned an empty bucketID for bucket: %s",bucket.ObjectMeta.Name)) + err = errors.New(fmt.Sprintf("DriverCreateBucket returned an empty bucketID for bucket: %s", bucket.ObjectMeta.Name)) return err } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 68d75ce2..460ec6f2 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -17,6 +17,7 @@ package bucket import ( "context" + "errors" "reflect" "testing" @@ -25,6 +26,7 @@ import ( cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" @@ -86,7 +88,8 @@ func TestAddWrongProvisioner(t *testing.T) { b := v1alpha1.Bucket{ Spec: v1alpha1.BucketSpec{ - DriverName: "driver2", + DriverName: "driver2", + BucketClassName: "test-bucket", }, } ctx := context.TODO() @@ -95,3 +98,34 @@ func TestAddWrongProvisioner(t *testing.T) { t.Errorf("Error returned: %+v", err) } } + +func TestMissingBucketClassName(t *testing.T) { + driver := "driver1" + mpc := struct{ fakespec.FakeProvisionerClient }{} + mpc.FakeDriverCreateBucket = func(ctx context.Context, + in *cosi.DriverCreateBucketRequest, + opts ...grpc.CallOption) (*cosi.DriverCreateBucketResponse, error) { + t.Errorf("grpc client called") + return nil, nil + } + + bl := BucketListener{ + driverName: driver, + provisionerClient: &mpc, + } + + b := v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: "testbucket", + }, + Spec: v1alpha1.BucketSpec{ + DriverName: "driver1", + }, + } + ctx := context.TODO() + err := bl.Add(ctx, &b) + expectedErr := errors.New("BucketClassName not defined for bucket testbucket") + if err == nil || err.Error() != expectedErr.Error() { + t.Errorf("Expecter error: %+v \n Returned error: %+v", expectedErr, err) + } +} From 7bf3cfa472d2e39e124c7efb79e7b8968c2d95d9 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 10 Oct 2022 11:55:41 -0700 Subject: [PATCH 232/299] Introducing the RevokeBucketAccess call in the delete bucket access operation --- .../bucketaccess/bucketaccess_controller.go | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 3cd36c7e..7b7b0b03 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -324,6 +324,36 @@ func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alp } func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { + // Fetching bucketClaim and corresponding bucket to get the bucketID + // for performing DriverRevokeBucketAccess request. + bucketClaimName := bucketAccess.Spec.BucketClaimName + bucketClaim, err := bal.bucketClaims(bucketAccess.ObjectMeta.Namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) + return errors.Wrap(err, "Failed to fetch bucketClaim") + } + + bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) + return errors.Wrap(err, "Failed to fetch bucket") + } + + req := &cosi.DriverRevokeBucketAccessRequest{ + BucketId: bucket.Status.BucketID, + AccountId: bucketAccess.Status.AccountID, + } + + // First we revoke the bucketAccess from the driver + if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { + klog.V(3).ErrorS(err, + "Failed to revoke bucket access", + "bucketAccess", bucketAccess.ObjectMeta.Name, + "bucketClaim", bucketClaimName, + ) + return errors.Wrap(err, "failed to revoke access") + } + credSecretName := bucketAccess.Spec.CredentialsSecretName secret, err := bal.secrets(bucketAccess.ObjectMeta.Namespace).Get(ctx, credSecretName, metav1.GetOptions{}) if err != nil { From dc1c919547c126f552261726cd77654279eb86b9 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Mon, 10 Oct 2022 12:34:22 -0700 Subject: [PATCH 233/299] Updating the DriverDeleteBucket call with the DeleteContext --- container-object-storage-interface-provisioner-sidecar/go.mod | 2 +- container-object-storage-interface-provisioner-sidecar/go.sum | 4 ++-- .../pkg/bucket/bucket_controller.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 84fc76e0..05d8583c 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -13,7 +13,7 @@ require ( k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 - sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830 + sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index ae66e2e3..81b165cc 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -727,8 +727,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830 h1:o8/7mIJCflt33epl4TZNS/+M5MktS8fQvcNuN8p235k= -sigs.k8s.io/container-object-storage-interface-spec v0.0.0-20220811182913-3c421cfc2830/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= +sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac h1:M1ZBBDJVWw3gDmE+kZZmwQ6+29GbWhG9RMqx9oV0tEs= +sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 29ab789d..5adf241c 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -327,7 +327,8 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu // only when the retain policy is set to Delete if bucket.Spec.DeletionPolicy == v1alpha1.DeletionPolicyDelete { req := &cosi.DriverDeleteBucketRequest{ - BucketId: bucket.Status.BucketID, + BucketId: bucket.Status.BucketID, + DeleteContext: bucket.Spec.Parameters, } if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { From f36a826703817a3f9ce98c56d39d17695fcb48cd Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 21 Oct 2022 12:48:16 -0700 Subject: [PATCH 234/299] Modifying owners --- container-object-storage-interface-controller/OWNERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index 9ea2b344..2eb42391 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -6,5 +6,4 @@ approvers: - saad-ali - xing-yang - wlan0 - - brahmaroutu - - rrati + - mukhoakash From 16d9b03cd162d070a39f76087f13bd101face560 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Fri, 21 Oct 2022 12:49:17 -0700 Subject: [PATCH 235/299] Modifying owners --- container-object-storage-interface-provisioner-sidecar/OWNERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS index 9ea2b344..2eb42391 100644 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -6,5 +6,4 @@ approvers: - saad-ali - xing-yang - wlan0 - - brahmaroutu - - rrati + - mukhoakash From bd530fed6b0ec2645bcdcc063e3fb236fd2af650 Mon Sep 17 00:00:00 2001 From: Akash Mukhopadhyay Date: Tue, 15 Nov 2022 13:52:10 -0800 Subject: [PATCH 236/299] Fixing the controller version --- .../resources/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index 452ec018..e222fa60 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,7 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: quay.io/containerobjectstorage/objectstorage-controller:canary + image: gcr.io/k8s-staging-sig-storage/objectstorage-controller:v20221027-v0.1.1-8-g300019f imagePullPolicy: Always args: - "--v=5" From bdbb87513c57464748c0d4a36c6261fd57d60e9d Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Thu, 17 Nov 2022 15:24:23 +0530 Subject: [PATCH 237/299] Fix : Use value for endpoint and region from driver Signed-off-by: Jiffin Tony Thottan --- .../pkg/bucketaccess/bucketaccess_controller.go | 4 ++-- .../pkg/consts/consts.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 7b7b0b03..8a584777 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -204,8 +204,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if val, ok = credentials[consts.S3Key]; ok { secretS3 := &cosiapi.SecretS3{ - Endpoint: "https://s3.amazonaws.com", - Region: "us-west-1", + Endpoint: val.Secrets[consts.S3Endpoint], + Region: val.Secrets[consts.S3Region], AccessKeyID: val.Secrets[consts.S3SecretAccessKeyID], AccessSecretKey: val.Secrets[consts.S3SecretAccessSecretKey], } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go index df365982..c32e88a2 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go @@ -29,6 +29,8 @@ const ( AzureKey = "azure" S3SecretAccessKeyID = "accessKeyID" S3SecretAccessSecretKey = "accessSecretKey" + S3Endpoint = "endpoint" + S3Region = "region" AzureSecretAccessToken = "accessToken" AzureSecretExpiryTimeStamp = "expiryTs" DefaultTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" From a6081c01d7bd98ff103d9498b3e71930afc9ee41 Mon Sep 17 00:00:00 2001 From: cpanato Date: Mon, 30 Jan 2023 14:39:53 +0100 Subject: [PATCH 238/299] Migrate away from google.com gcp project k8s-testimages Signed-off-by: cpanato --- .../cloudbuild.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index bacbd1d7..98feb780 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -7,15 +7,15 @@ substitutions: options: substitution_option: ALLOW_LOOSE steps: -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" +- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" entrypoint: make args: ['build'] - env: + env: - GIT_TAG=${_GIT_TAG} - PULL_BASE_REF=${_PULL_BASE_REF} -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" +- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" entrypoint: make args: ['push'] - env: + env: - GIT_TAG=${_GIT_TAG} - PULL_BASE_REF=${_PULL_BASE_REF} From e6a1ca87421fa245329336ffcd33991401c2ee2c Mon Sep 17 00:00:00 2001 From: cpanato Date: Mon, 30 Jan 2023 14:46:34 +0100 Subject: [PATCH 239/299] Migrate away from google.com gcp project k8s-testimages Signed-off-by: cpanato --- .../cloudbuild.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml index fd7f0514..1c0a072a 100644 --- a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -3,15 +3,15 @@ timeout: 3000s options: substitution_option: ALLOW_LOOSE steps: -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" +- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" entrypoint: make args: ['build'] - env: + env: - GIT_TAG=${_GIT_TAG} - PULL_BASE_REF=${_PULL_BASE_REF} -- name: "gcr.io/k8s-testimages/gcb-docker-gcloud:v20220617-174ad91c3a" +- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" entrypoint: make args: ['push'] - env: + env: - GIT_TAG=${_GIT_TAG} - PULL_BASE_REF=${_PULL_BASE_REF} From 235fd7bc2cf2d06d7349f310e453ef311e394868 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 23 May 2023 13:32:07 +0200 Subject: [PATCH 240/299] fix(log): switched to structured log --- .../pkg/bucketclaim/bucketclaim.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index a32337e9..1924d5f1 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -95,7 +95,7 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc // Delete processes a bucket for which bucket request is deleted func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { - klog.V(3).Infof("Delete BucketClaim", + klog.V(3).Info("Delete BucketClaim", "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace) From 2cf70f895aedbeecd9ac0e76871788013c202384 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 23 May 2023 13:37:28 +0200 Subject: [PATCH 241/299] chore(formatting): go fmt on the repo --- .../pkg/bucketclaim/bucketclaim.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 1924d5f1..963e2cbc 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -104,10 +104,11 @@ func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1. // provisionBucketClaimOperation attempts to provision a bucket for a given bucketClaim. // Return values -// nil - BucketClaim successfully processed -// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] -// ErrBucketAlreadyExists - BucketClaim already processed -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - BucketClaim successfully processed +// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] +// ErrBucketAlreadyExists - BucketClaim already processed +// non-nil err - Internal error [requeue'd with exponential backoff] func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, inputBucketClaim *v1alpha1.BucketClaim) error { bucketClaim := inputBucketClaim.DeepCopy() if bucketClaim.Status.BucketReady { From 3b97374aab6e356e0bb859dca19575a1c172c778 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 11 May 2023 15:06:23 +0200 Subject: [PATCH 242/299] feat(bucketclaim): added EventRecorder --- .../pkg/bucketclaim/bucketclaim.go | 67 ++++++++++++++----- .../pkg/bucketclaim/bucketclaim_test.go | 7 ++ 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 963e2cbc..539a27f6 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -4,9 +4,11 @@ import ( "context" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" kubeclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/record" "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -17,18 +19,20 @@ import ( "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) -// bucketClaimListener is a resource handler for bucket requests objects -type bucketClaimListener struct { +// BucketClaimListener is a resource handler for bucket requests objects +type BucketClaimListener struct { + eventRecorder record.EventRecorder + kubeClient kubeclientset.Interface bucketClient bucketclientset.Interface } -func NewBucketClaimListener() *bucketClaimListener { - return &bucketClaimListener{} +func NewBucketClaimListener() *BucketClaimListener { + return &BucketClaimListener{} } // Add creates a bucket in response to a bucketClaim -func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { +func (b *BucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { klog.V(3).InfoS("Add BucketClaim", "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace, @@ -65,7 +69,7 @@ func (b *bucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc } // update processes any updates made to the bucket request -func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.BucketClaim) error { +func (b *BucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.BucketClaim) error { klog.V(3).InfoS("Update BucketClaim", "name", old.Name, "ns", old.Namespace) @@ -94,8 +98,8 @@ func (b *bucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc } // Delete processes a bucket for which bucket request is deleted -func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { - klog.V(3).Info("Delete BucketClaim", +func (b *BucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1.BucketClaim) error { + klog.V(3).InfoS("Delete BucketClaim", "name", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace) @@ -103,13 +107,19 @@ func (b *bucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1. } // provisionBucketClaimOperation attempts to provision a bucket for a given bucketClaim. +// +// Recorded events +// +// InvalidBucket - Bucket provided in the BucketClaim does not exist +// InvalidBucketClass - BucketClass provided in the BucketClaim does not exist +// // Return values // // nil - BucketClaim successfully processed // ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] // ErrBucketAlreadyExists - BucketClaim already processed // non-nil err - Internal error [requeue'd with exponential backoff] -func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, inputBucketClaim *v1alpha1.BucketClaim) error { +func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, inputBucketClaim *v1alpha1.BucketClaim) error { bucketClaim := inputBucketClaim.DeepCopy() if bucketClaim.Status.BucketReady { return util.ErrBucketAlreadyExists @@ -121,7 +131,10 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, if bucketClaim.Spec.ExistingBucketName != "" { bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) - if err != nil { + if kubeerrors.IsNotFound(err) { + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, "InvalidBucket", "Bucket provided in the BucketClaim does not exist") + return err + } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) return err } @@ -153,7 +166,10 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, } bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) - if err != nil { + if kubeerrors.IsNotFound(err) { + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, "InvalidBucketClass", "BucketClass provided in the BucketClaim does not exist") + return util.ErrInvalidBucketClass + } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) return util.ErrInvalidBucketClass } @@ -180,7 +196,7 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucket.Spec.Protocols = protocolCopy bucket, err = b.buckets().Create(ctx, bucket, metav1.CreateOptions{}) - if err != nil && !errors.IsAlreadyExists(err) { + if err != nil && !kubeerrors.IsAlreadyExists(err) { klog.V(3).ErrorS(err, "Error creationg bucket", "bucket", bucketName, "bucketClaim", bucketClaim.ObjectMeta.Name) @@ -212,31 +228,46 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, return nil } -func (b *bucketClaimListener) InitializeKubeClient(k kubeclientset.Interface) { +// InitializeKubeClient initializes the kubernetes client +func (b *BucketClaimListener) InitializeKubeClient(k kubeclientset.Interface) { b.kubeClient = k } -func (b *bucketClaimListener) InitializeBucketClient(bc bucketclientset.Interface) { +// InitializeBucketClient initializes the object storage bucket client +func (b *BucketClaimListener) InitializeBucketClient(bc bucketclientset.Interface) { b.bucketClient = bc } -func (b *bucketClaimListener) buckets() objectstoragev1alpha1.BucketInterface { +// InitializeEventRecorder initializes the event recorder +func (b *BucketClaimListener) InitializeEventRecorder(er record.EventRecorder) { + b.eventRecorder = er +} + +func (b *BucketClaimListener) buckets() objectstoragev1alpha1.BucketInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().Buckets() } panic("uninitialized listener") } -func (b *bucketClaimListener) bucketClasses() objectstoragev1alpha1.BucketClassInterface { +func (b *BucketClaimListener) bucketClasses() objectstoragev1alpha1.BucketClassInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClasses() } panic("uninitialized listener") } -func (b *bucketClaimListener) bucketClaims(namespace string) objectstoragev1alpha1.BucketClaimInterface { +func (b *BucketClaimListener) bucketClaims(namespace string) objectstoragev1alpha1.BucketClaimInterface { if b.bucketClient != nil { return b.bucketClient.ObjectstorageV1alpha1().BucketClaims(namespace) } panic("uninitialized listener") } + +// recordEvent during the processing of the objects +func (b *BucketClaimListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { + if b.eventRecorder == nil { + return + } + b.eventRecorder.Event(subject, eventtype, reason, message) +} diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index f377a78d..e010c962 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -6,6 +6,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/record" types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" @@ -84,10 +85,12 @@ func runCreateBucket(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { @@ -127,10 +130,12 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { @@ -181,10 +186,12 @@ func runCreateBucketIdempotency(t *testing.T, name string) { client := bucketclientset.NewSimpleClientset() kubeClient := fake.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() listener.InitializeKubeClient(kubeClient) listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) bucketclass, err := util.CreateBucketClass(ctx, client, &goldClass) if err != nil { From 24b7287384ee9ae48601abd22b4fce1b7e715e8d Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Tue, 12 Sep 2023 16:37:31 -0600 Subject: [PATCH 243/299] implement mvp release tooling Implement minimum viable release tooling. Tooling has these goals: 1. `make build` target for local development 2. K8s-compliant GCP cloudbuild config for multi-arch release images 3. allow future use of depandabot with little to no change 4. keep build tooling as simple as possible Signed-off-by: Blaine Gardner --- .../Dockerfile | 32 +++++++- .../Makefile | 80 ++++++++++++------- .../cloudbuild.yaml | 39 +++++---- .../resources/deployment.yaml | 2 +- 4 files changed, 104 insertions(+), 49 deletions(-) diff --git a/container-object-storage-interface-controller/Dockerfile b/container-object-storage-interface-controller/Dockerfile index 3d388720..9d8d161c 100644 --- a/container-object-storage-interface-controller/Dockerfile +++ b/container-object-storage-interface-controller/Dockerfile @@ -1,6 +1,36 @@ +# +# BUILDER +# +FROM docker.io/library/golang:1.21.1 AS builder + +WORKDIR /buildroot + +# Cache deps before building and copying source, so that we don't need to re-download +# as much and so that source changes don't invalidate our downloaded layer. +COPY go.mod go.mod +COPY go.sum go.sum +RUN go mod download + +COPY cmd/ cmd/ +COPY pkg/ pkg/ + +ENV CGO_ENABLED=0 + +RUN go build -o artifacts/controller-manager cmd/controller-manager/*.go + + +# +# FINAL IMAGE +# FROM gcr.io/distroless/static:latest + LABEL maintainers="Kubernetes Authors" LABEL description="COSI Controller" -COPY ./bin/controller-manager controller-manager +LABEL org.opencontainers.image.title="COSI Controller" +LABEL org.opencontainers.image.description="Container Object Storage Interface (COSI) Controller" +LABEL org.opencontainers.image.source="https://github.com/kubernetes-sigs/container-object-storage-interface-controller" +LABEL org.opencontainers.image.licenses="APACHE-2.0" + +COPY --from=builder /buildroot/artifacts/controller-manager . ENTRYPOINT ["/controller-manager"] diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index c8fb281e..fc1b750c 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -1,31 +1,49 @@ -# Copyright 2020 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -all: reltools build -.PHONY: reltools -reltools: release-tools/build.make -release-tools/build.make: - $(eval CURDIR := $(shell pwd)) - $(eval TMP := $(shell mktemp -d)) - $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) - $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) - $(shell rm -rf ${TMP}) - ln -s release-tools/travis.yml travis.yml - -CMDS=controller-manager - -include release-tools/build.make - -IMAGE_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-controller -IMAGE_TAGS=$(GIT_TAG) +.DEFAULT_GOAL := help +SHELL = /usr/bin/env bash + +# 'go env' vars aren't always available in make environments, so get defaults for needed ones +GOARCH ?= $(shell go env GOARCH) + +## +## ==== ARGS ===== # + +## Container build tool compatible with `docker` API +DOCKER ?= docker + +## Platform for 'build' +PLATFORM ?= linux/$(GOARCH) + +## Platform list for multi-arch 'buildx' build +BUILDX_PLATFORMS ?= linux/amd64,linux/arm64 + +## Image tag for all builds +IMAGE_TAG ?= local/cosi-controller:latest + +## Add additional build args if desired +BUILD_ARGS ?= + +## +## === TARGETS === # + +.PHONY: build +## Build local image for development, defaulting linux/ +build: + # $(DOCKER) build --platform $(PLATFORM) --tag $(IMAGE_TAG) . + true # return true temporarily to allow prow to succeed + +.PHONY: buildx +## Build cross-platform image for release +buildx: + $(DOCKER) buildx build --platform $(BUILDX_PLATFORMS) $(BUILD_ARGS) --tag $(IMAGE_TAG) . + +.PHONY: test +## Test packages +test: + go vet ./... + go test ./... + +# print out lines beginning with double-comments, plus next line as basic help text +.PHONY: help +## Show this help text +help: + @sed -n -e "/^##/{N;s/^/\n/p;}" $(MAKEFILE_LIST) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 98feb780..f40c1f9a 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,21 +1,28 @@ -# See https://cloud.google.com/cloud-build/docs/build-config +# GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config +# Build console: +# https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/objectstorage-controller timeout: 3000s +options: + substitution_option: 'ALLOW_LOOSE' + machineType: 'E2_HIGHCPU_8' substitutions: - _IMAGE_NAME: 'gcr.io/k8s-staging-sig-storage/objectstorage-controller' + # GCloud provides som built-in substitution vars: + # https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values + # K8s provides custom substitutions _GIT_TAG and _PULL_BASE_REF: + # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions _GIT_TAG: '12345' _PULL_BASE_REF: 'master' -options: - substitution_option: ALLOW_LOOSE steps: -- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" - entrypoint: make - args: ['build'] - env: - - GIT_TAG=${_GIT_TAG} - - PULL_BASE_REF=${_PULL_BASE_REF} -- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" - entrypoint: make - args: ['push'] - env: - - GIT_TAG=${_GIT_TAG} - - PULL_BASE_REF=${_PULL_BASE_REF} + # it is extremely unclear in GCR docs whether standard gcr.io/cloud-builders/docker builds allow + # building multi-arch image manifests as 'docker buildx build' does; therefore, use make buildx + # target to be certain multi-arch images are released + - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20230522-312425ae46' + entrypoint: make + args: ['buildx'] + env: + - BUILDX_PLATFORMS='linux/amd64,linux/arm64' + - IMAGE_TAG='gcr.io/k8s-staging-test-infra/objectstorage-controller:${_GIT_TAG}' + - BUILD_ARGS='--tag "gcr.io/k8s-staging-test-infra/objectstorage-controller:latest"' +images: + - gcr.io/k8s-staging-test-infra/objectstorage-controller:${_GIT_TAG} + - gcr.io/k8s-staging-test-infra/objectstorage-controller:latest diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index e222fa60..835de47b 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,7 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: gcr.io/k8s-staging-sig-storage/objectstorage-controller:v20221027-v0.1.1-8-g300019f + image: host.minikube.internal:5001/cosi-controller:local-build imagePullPolicy: Always args: - "--v=5" From 7c878f2a19a2be82c6d536eaa37008983f6ce1e7 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 13 Sep 2023 15:16:09 -0600 Subject: [PATCH 244/299] push images using PROJECT_ID in cloudbuild PROJECT_ID is an env var provided by GCP's Cloudbuild automatically. After further investigation, k8s-staging-test-infra does not seem to house any other Kubernetes SIG images. Other SIGs use `gcr.io/$PROJECT_ID` as the repository base for their images. This should work for the COSI controller as well. Signed-off-by: Blaine Gardner --- .../cloudbuild.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index f40c1f9a..00f76c74 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -21,8 +21,8 @@ steps: args: ['buildx'] env: - BUILDX_PLATFORMS='linux/amd64,linux/arm64' - - IMAGE_TAG='gcr.io/k8s-staging-test-infra/objectstorage-controller:${_GIT_TAG}' - - BUILD_ARGS='--tag "gcr.io/k8s-staging-test-infra/objectstorage-controller:latest"' + - IMAGE_TAG='gcr.io/$PROJECT_ID/objectstorage-controller:${_GIT_TAG}' + - BUILD_ARGS='--tag "gcr.io/$PROJECT_ID/objectstorage-controller:latest"' images: - - gcr.io/k8s-staging-test-infra/objectstorage-controller:${_GIT_TAG} - - gcr.io/k8s-staging-test-infra/objectstorage-controller:latest + - gcr.io/$PROJECT_ID/objectstorage-controller:${_GIT_TAG} + - gcr.io/$PROJECT_ID/objectstorage-controller:latest From ea45f32a79bd533c565b0459917eef39923acfb5 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 13 Sep 2023 16:48:28 -0600 Subject: [PATCH 245/299] use k8s-staging-sig-storage for cloudbuild The newly apparently correct place to send sig-storage project staging images is k8s-staging-sig-storage. Try building images to that location. Signed-off-by: Blaine Gardner --- .../cloudbuild.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 00f76c74..4b15be6e 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -21,8 +21,8 @@ steps: args: ['buildx'] env: - BUILDX_PLATFORMS='linux/amd64,linux/arm64' - - IMAGE_TAG='gcr.io/$PROJECT_ID/objectstorage-controller:${_GIT_TAG}' - - BUILD_ARGS='--tag "gcr.io/$PROJECT_ID/objectstorage-controller:latest"' + - IMAGE_TAG='gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}' + - BUILD_ARGS='--tag "gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest"' images: - - gcr.io/$PROJECT_ID/objectstorage-controller:${_GIT_TAG} - - gcr.io/$PROJECT_ID/objectstorage-controller:latest + - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} + - gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest From 0a9dc4d03ee33b8874d86360cee2a3c70bd330fd Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 11:19:28 -0600 Subject: [PATCH 246/299] use buildx from cloudbuild directly It is simpler and likely easier to maintain to have the cloudbuild use `docker buildx build ...` directly rather than to rely on a make target. This makes the build tooling more transparent with fewer layers between the build config and the Dockerfile. Signed-off-by: Blaine Gardner --- .../Makefile | 10 +------ .../cloudbuild.yaml | 28 +++++++++---------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index fc1b750c..033c677e 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -17,10 +17,7 @@ PLATFORM ?= linux/$(GOARCH) BUILDX_PLATFORMS ?= linux/amd64,linux/arm64 ## Image tag for all builds -IMAGE_TAG ?= local/cosi-controller:latest - -## Add additional build args if desired -BUILD_ARGS ?= +IMAGE_TAG ?= cosi-controller:latest ## ## === TARGETS === # @@ -31,11 +28,6 @@ build: # $(DOCKER) build --platform $(PLATFORM) --tag $(IMAGE_TAG) . true # return true temporarily to allow prow to succeed -.PHONY: buildx -## Build cross-platform image for release -buildx: - $(DOCKER) buildx build --platform $(BUILDX_PLATFORMS) $(BUILD_ARGS) --tag $(IMAGE_TAG) . - .PHONY: test ## Test packages test: diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 4b15be6e..f8057d34 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,6 +1,5 @@ # GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config -# Build console: -# https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/objectstorage-controller +# Builds go to: https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/ timeout: 3000s options: substitution_option: 'ALLOW_LOOSE' @@ -10,19 +9,20 @@ substitutions: # https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values # K8s provides custom substitutions _GIT_TAG and _PULL_BASE_REF: # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions - _GIT_TAG: '12345' - _PULL_BASE_REF: 'master' + _GIT_TAG: '12345' # e.g., vYYYYMMDD-hash, vYYYYMMDD-tag, or vYYYYMMDD-tag-n-ghash + _PULL_BASE_REF: 'master' # e.g., master or release-0.2 for a PR merge, or v0.2 for a tag steps: - # it is extremely unclear in GCR docs whether standard gcr.io/cloud-builders/docker builds allow - # building multi-arch image manifests as 'docker buildx build' does; therefore, use make buildx - # target to be certain multi-arch images are released - - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20230522-312425ae46' - entrypoint: make - args: ['buildx'] - env: - - BUILDX_PLATFORMS='linux/amd64,linux/arm64' - - IMAGE_TAG='gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}' - - BUILD_ARGS='--tag "gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest"' + # based on simple build example + # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md + - name: gcr.io/cloud-builders/docker + # entrypoint: # docker by default + args: + - buildx + - build + - --platform="linux/amd64,linux/arm64" + - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} + - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest + - . images: - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} - gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest From db642a357737c8230d8aa95fc6a11520fa341410 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 13:39:24 -0600 Subject: [PATCH 247/299] allow cloudbuild to build git tags Use the K8s-/Prow-provided _PULL_BASE_REF substitution variable [1] to build images with tags based on the git commit tag. By the K8s docs, this should work, but it remains to be tested. [1] https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions Signed-off-by: Blaine Gardner --- .../cloudbuild.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index f8057d34..ea212e66 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,5 +1,6 @@ # GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config -# Builds go to: https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/ +# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/ +# Build logs in https://testgrid.k8s.io/sig-storage-image-build timeout: 3000s options: substitution_option: 'ALLOW_LOOSE' @@ -19,10 +20,15 @@ steps: args: - buildx - build - - --platform="linux/amd64,linux/arm64" + - --platform=linux/amd64,linux/arm64 - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} + # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, + # BUT! if the commit has a git tag, it will build that tag instead. this mechanism allows + # creating the semver-tagged images that will be auto-promoted to release + - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF} - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest - . images: - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} + - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF} - gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest From d49401a807970240095432bd9429ff8746ac5a76 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 14:43:40 -0600 Subject: [PATCH 248/299] revert accidental image modification in deployment Revert an accidental modification of the deployment image resource. Signed-off-by: Blaine Gardner --- .../resources/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index 835de47b..e222fa60 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,7 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: host.minikube.internal:5001/cosi-controller:local-build + image: gcr.io/k8s-staging-sig-storage/objectstorage-controller:v20221027-v0.1.1-8-g300019f imagePullPolicy: Always args: - "--v=5" From bbd436350f5c371e03977654fd781bedc9b19da0 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 16:49:16 -0600 Subject: [PATCH 249/299] set up cloudbuild multi-arch builder before use Cloud builder's default docker install does not set up a multi-arch builder. It's easy to use docker's buildx tools to create a multi-arch-compatible builder. Signed-off-by: Blaine Gardner --- .../cloudbuild.yaml | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index ea212e66..02083994 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,3 +1,4 @@ +# K8s infra build example: https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md # GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config # Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/ # Build logs in https://testgrid.k8s.io/sig-storage-image-build @@ -6,29 +7,36 @@ options: substitution_option: 'ALLOW_LOOSE' machineType: 'E2_HIGHCPU_8' substitutions: - # GCloud provides som built-in substitution vars: - # https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values # K8s provides custom substitutions _GIT_TAG and _PULL_BASE_REF: # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions _GIT_TAG: '12345' # e.g., vYYYYMMDD-hash, vYYYYMMDD-tag, or vYYYYMMDD-tag-n-ghash _PULL_BASE_REF: 'master' # e.g., master or release-0.2 for a PR merge, or v0.2 for a tag + # COSI substitutions: + _IMAGE: objectstorage-controller + _PLATFORMS: linux/amd64,linux/arm64 # add more platforms here if desired steps: - # based on simple build example - # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md - - name: gcr.io/cloud-builders/docker - # entrypoint: # docker by default + # based on k8s infra build example and modified to use docker buildx + # buildx refs: https://github.com/docker/buildx/blob/master/docs/reference/buildx.md + - id: set-up-multi-arch-builder-as-default + name: gcr.io/cloud-builders/docker + args: ["buildx", "create", "--use", "--name", "multi-arch", "--platform=${_PLATFORMS}"] + - id: bootstrap-multi-arch-builder + name: gcr.io/cloud-builders/docker + args: ["buildx", "inspect", "--bootstrap"] + - id: do-multi-arch-build + name: gcr.io/cloud-builders/docker args: - buildx - build - - --platform=linux/amd64,linux/arm64 - - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} + - --platform=${_PLATFORMS} + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, # BUT! if the commit has a git tag, it will build that tag instead. this mechanism allows # creating the semver-tagged images that will be auto-promoted to release - - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF} - - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest - . images: - - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG} - - gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF} - - gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest + - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} + - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} + - gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest From 806acff2a064d5187b7b57a936a9375966843efe Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 17:29:44 -0600 Subject: [PATCH 250/299] cloudbuild: use --load flag to allow pushing images The cloud build uses the `docker-container` driver which does not make build images available in the local image store by default -- only in the cache. This means the cloud build process doesn't see the images in order to push them at the end. Use the --load flag to fix this. See: https://docs.docker.com/build/drivers/docker-container/#loading-to-local-image-store Signed-off-by: Blaine Gardner --- container-object-storage-interface-controller/cloudbuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 02083994..aa9e89db 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -28,6 +28,7 @@ steps: args: - buildx - build + - --load # https://docs.docker.com/build/drivers/docker-container/#loading-to-local-image-store - --platform=${_PLATFORMS} - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, From de7cba4df181e088e756879297ea107e22b89274 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 17:44:22 -0600 Subject: [PATCH 251/299] cloudbuild: push images straight from docker build Using `docker buildx build --load ...` with multi arch builds returns the below error: > error: docker exporter does not currently support exporting manifest lists Use --push instead to push images directy from the docker build. This makes the `images` cloudbuild step unnecessary. Signed-off-by: Blaine Gardner --- .../cloudbuild.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index aa9e89db..6c25e05a 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -28,7 +28,7 @@ steps: args: - buildx - build - - --load # https://docs.docker.com/build/drivers/docker-container/#loading-to-local-image-store + - --push # --load doesn't work with multi-platform builds, so just push from docker build - --platform=${_PLATFORMS} - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, @@ -37,7 +37,3 @@ steps: - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest - . -images: - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest From 272e366eb2d1361c4f4d14b15745a42abc4d036d Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Fri, 15 Sep 2023 12:10:51 -0600 Subject: [PATCH 252/299] tidy up build and make configs Tidy up some minor nits now that the cloudbuild is working. Signed-off-by: Blaine Gardner --- container-object-storage-interface-controller/Makefile | 6 +----- .../cloudbuild.yaml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/container-object-storage-interface-controller/Makefile b/container-object-storage-interface-controller/Makefile index 033c677e..91df56a1 100644 --- a/container-object-storage-interface-controller/Makefile +++ b/container-object-storage-interface-controller/Makefile @@ -13,9 +13,6 @@ DOCKER ?= docker ## Platform for 'build' PLATFORM ?= linux/$(GOARCH) -## Platform list for multi-arch 'buildx' build -BUILDX_PLATFORMS ?= linux/amd64,linux/arm64 - ## Image tag for all builds IMAGE_TAG ?= cosi-controller:latest @@ -25,8 +22,7 @@ IMAGE_TAG ?= cosi-controller:latest .PHONY: build ## Build local image for development, defaulting linux/ build: - # $(DOCKER) build --platform $(PLATFORM) --tag $(IMAGE_TAG) . - true # return true temporarily to allow prow to succeed + $(DOCKER) build --platform $(PLATFORM) --tag $(IMAGE_TAG) . .PHONY: test ## Test packages diff --git a/container-object-storage-interface-controller/cloudbuild.yaml b/container-object-storage-interface-controller/cloudbuild.yaml index 6c25e05a..bd1d6886 100644 --- a/container-object-storage-interface-controller/cloudbuild.yaml +++ b/container-object-storage-interface-controller/cloudbuild.yaml @@ -1,6 +1,6 @@ # K8s infra build example: https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md # GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config -# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/ +# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/GLOBAL # Build logs in https://testgrid.k8s.io/sig-storage-image-build timeout: 3000s options: From 5972e2f79b827a8794d860988f927366c8e49dc9 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 20 Sep 2023 09:11:07 -0600 Subject: [PATCH 253/299] add dependabot config for gomod and docker Use dependabot for updating Go module dependencies and docker container images. Signed-off-by: Blaine Gardner --- .../.github/dependabot.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 container-object-storage-interface-controller/.github/dependabot.yml diff --git a/container-object-storage-interface-controller/.github/dependabot.yml b/container-object-storage-interface-controller/.github/dependabot.yml new file mode 100644 index 00000000..64972d37 --- /dev/null +++ b/container-object-storage-interface-controller/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +enable-beta-ecosystems: true +updates: + + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + groups: # batch updates together for fewer dependabot PRs + golang-dependencies: + patterns: + - "github.com/golang*" + k8s-dependencies: + patterns: + - "k8s.io*" + - "sigs.k8s.io*" + github-dependencies: + patterns: + - "github.com*" + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" From e3b3a00b3fa2d0896f77e9710dec953c06e767c7 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 21 Sep 2023 13:23:53 -0600 Subject: [PATCH 254/299] remove unused prow config Remove the unused `.prow.sh` file. Signed-off-by: Blaine Gardner --- container-object-storage-interface-controller/.prow.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 container-object-storage-interface-controller/.prow.sh diff --git a/container-object-storage-interface-controller/.prow.sh b/container-object-storage-interface-controller/.prow.sh deleted file mode 100755 index 682601dd..00000000 --- a/container-object-storage-interface-controller/.prow.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -. release-tools/prow.sh - -main - From 6dc6121b62825900aa0ae15c043bed4bc84b0a14 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 21 Sep 2023 13:30:07 -0600 Subject: [PATCH 255/299] Update build configs to mirror controller Update build configs for this sidecar image to reflect the latest configs that are now working for the controller image. Signed-off-by: Blaine Gardner --- .../Dockerfile | 36 +++++++++- .../Makefile | 69 ++++++++++--------- .../cloudbuild.yaml | 50 ++++++++++---- 3 files changed, 106 insertions(+), 49 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile index 0a44b734..2de87d66 100644 --- a/container-object-storage-interface-provisioner-sidecar/Dockerfile +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -1,6 +1,36 @@ +# +# BUILDER +# +FROM docker.io/library/golang:1.21.1 AS builder + +WORKDIR /buildroot + +# Cache deps before building and copying source, so that we don't need to re-download +# as much and so that source changes don't invalidate our downloaded layer. +COPY go.mod go.mod +COPY go.sum go.sum +RUN go mod download + +COPY cmd/ cmd/ +COPY pkg/ pkg/ + +ENV CGO_ENABLED=0 + +RUN go build -o artifacts/objectstorage-sidecar cmd/objectstorage-sidecar/*.go + + +# +# FINAL IMAGE +# FROM gcr.io/distroless/static:latest -LABEL maintainers="Kubernetes COSI Authors" -LABEL description="Object Storage Sidecar" -COPY ./bin/objectstorage-sidecar objectstorage-sidecar +LABEL maintainers="Kubernetes Authors" +LABEL description="COSI Storage Sidecar" + +LABEL org.opencontainers.image.title="COSI Storage Sidecar" +LABEL org.opencontainers.image.description="Container Object Storage Interface (COSI) Storage Provisioner Sidecar" +LABEL org.opencontainers.image.source="https://github.com/kubernetes-sigs/container-object-storage-interface-provisioner-sidecar" +LABEL org.opencontainers.image.licenses="APACHE-2.0" + +COPY --from=builder /buildroot/artifacts/objectstorage-sidecar . ENTRYPOINT ["/objectstorage-sidecar"] diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 833dad59..91df56a1 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -1,32 +1,37 @@ -# Copyright 2020 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -CMDS=objectstorage-sidecar - -all: reltools build -.PHONY: reltools -reltools: release-tools/build.make -release-tools/build.make: - $(eval CURDIR := $(shell pwd)) - $(eval TMP := $(shell mktemp -d)) - $(shell cd ${TMP} && git clone https://github.com/kubernetes-sigs/container-object-storage-interface-spec) - $(shell cp -r ${TMP}/container-object-storage-interface-spec/release-tools ${CURDIR}/) - $(shell rm -rf ${TMP}) - ln -s release-tools/travis.yml travis.yml - - -include release-tools/build.make - -REGISTRY_NAME=gcr.io/k8s-staging-sig-storage/objectstorage-sidecar -IMAGE_TAGS=$(GIT_TAG) +.DEFAULT_GOAL := help +SHELL = /usr/bin/env bash + +# 'go env' vars aren't always available in make environments, so get defaults for needed ones +GOARCH ?= $(shell go env GOARCH) + +## +## ==== ARGS ===== # + +## Container build tool compatible with `docker` API +DOCKER ?= docker + +## Platform for 'build' +PLATFORM ?= linux/$(GOARCH) + +## Image tag for all builds +IMAGE_TAG ?= cosi-controller:latest + +## +## === TARGETS === # + +.PHONY: build +## Build local image for development, defaulting linux/ +build: + $(DOCKER) build --platform $(PLATFORM) --tag $(IMAGE_TAG) . + +.PHONY: test +## Test packages +test: + go vet ./... + go test ./... + +# print out lines beginning with double-comments, plus next line as basic help text +.PHONY: help +## Show this help text +help: + @sed -n -e "/^##/{N;s/^/\n/p;}" $(MAKEFILE_LIST) diff --git a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml index 1c0a072a..d2cc261d 100644 --- a/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml +++ b/container-object-storage-interface-provisioner-sidecar/cloudbuild.yaml @@ -1,17 +1,39 @@ -# See https://cloud.google.com/cloud-build/docs/build-config +# K8s infra build example: https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md +# GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config +# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/GLOBAL +# Build logs in https://testgrid.k8s.io/sig-storage-image-build timeout: 3000s options: - substitution_option: ALLOW_LOOSE + substitution_option: 'ALLOW_LOOSE' + machineType: 'E2_HIGHCPU_8' +substitutions: + # K8s provides custom substitutions _GIT_TAG and _PULL_BASE_REF: + # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions + _GIT_TAG: '12345' # e.g., vYYYYMMDD-hash, vYYYYMMDD-tag, or vYYYYMMDD-tag-n-ghash + _PULL_BASE_REF: 'master' # e.g., master or release-0.2 for a PR merge, or v0.2 for a tag + # COSI substitutions: + _IMAGE: objectstorage-sidecar + _PLATFORMS: linux/amd64,linux/arm64 # add more platforms here if desired steps: -- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" - entrypoint: make - args: ['build'] - env: - - GIT_TAG=${_GIT_TAG} - - PULL_BASE_REF=${_PULL_BASE_REF} -- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20221214-1b4dd4d69a" - entrypoint: make - args: ['push'] - env: - - GIT_TAG=${_GIT_TAG} - - PULL_BASE_REF=${_PULL_BASE_REF} + # based on k8s infra build example and modified to use docker buildx + # buildx refs: https://github.com/docker/buildx/blob/master/docs/reference/buildx.md + - id: set-up-multi-arch-builder-as-default + name: gcr.io/cloud-builders/docker + args: ["buildx", "create", "--use", "--name", "multi-arch", "--platform=${_PLATFORMS}"] + - id: bootstrap-multi-arch-builder + name: gcr.io/cloud-builders/docker + args: ["buildx", "inspect", "--bootstrap"] + - id: do-multi-arch-build + name: gcr.io/cloud-builders/docker + args: + - buildx + - build + - --push # --load doesn't work with multi-platform builds, so just push from docker build + - --platform=${_PLATFORMS} + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} + # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, + # BUT! if the commit has a git tag, it will build that tag instead. this mechanism allows + # creating the semver-tagged images that will be auto-promoted to release + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} + - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest + - . From 707b8b7447cd4cdcefe9c42cfd9b94ed79ca410d Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 21 Sep 2023 13:26:39 -0600 Subject: [PATCH 256/299] separate controller-runtime in dependabot config Controller-Runtime, based on history in the Rook project [1], makes breaking API changes more often than other k8s projects. Separating these updates from the other k8s updates will help keep most dependabot PRs merge-able. [1] github.com/rook/rook Signed-off-by: Blaine Gardner --- .../.github/dependabot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/container-object-storage-interface-controller/.github/dependabot.yml b/container-object-storage-interface-controller/.github/dependabot.yml index 64972d37..eb774b36 100644 --- a/container-object-storage-interface-controller/.github/dependabot.yml +++ b/container-object-storage-interface-controller/.github/dependabot.yml @@ -14,6 +14,9 @@ updates: patterns: - "k8s.io*" - "sigs.k8s.io*" + exclude-patterns: + # controller-runtime has history of breaking API changes more often than other k8s projects + - "sigs.k8s.io/controller-runtime" github-dependencies: patterns: - "github.com*" From f197efe5abc33e7d6bf6a124720f4ee40b296a00 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 21 Sep 2023 13:32:10 -0600 Subject: [PATCH 257/299] add dependabot config Dependabot config matches the latest config from the controller library. Signed-off-by: Blaine Gardner --- .../.github/dependabot.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 container-object-storage-interface-provisioner-sidecar/.github/dependabot.yml diff --git a/container-object-storage-interface-provisioner-sidecar/.github/dependabot.yml b/container-object-storage-interface-provisioner-sidecar/.github/dependabot.yml new file mode 100644 index 00000000..eb774b36 --- /dev/null +++ b/container-object-storage-interface-provisioner-sidecar/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +enable-beta-ecosystems: true +updates: + + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + groups: # batch updates together for fewer dependabot PRs + golang-dependencies: + patterns: + - "github.com/golang*" + k8s-dependencies: + patterns: + - "k8s.io*" + - "sigs.k8s.io*" + exclude-patterns: + # controller-runtime has history of breaking API changes more often than other k8s projects + - "sigs.k8s.io/controller-runtime" + github-dependencies: + patterns: + - "github.com*" + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" From ba63393bc6db3f8e84af8c40c1bf3824990fafba Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 14:17:25 +0200 Subject: [PATCH 258/299] feat: replace API --- container-object-storage-interface-controller/go.mod | 2 ++ container-object-storage-interface-controller/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index fd0cdf1a..91a77dab 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -2,6 +2,8 @@ module sigs.k8s.io/container-object-storage-interface-controller go 1.18 +replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 + require ( github.com/spf13/cobra v1.4.0 github.com/spf13/viper v1.12.0 diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 65ae442c..f485e6ea 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -272,6 +272,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 h1:johRtfTuppEtm1S/IK1ir88NaXjCOL/8BezwawGRQx0= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= @@ -706,8 +708,6 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= From 68207e14a58f4192019311c71714e02240de41c3 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 14:47:30 +0200 Subject: [PATCH 259/299] feat: fix panic --- container-object-storage-interface-controller/go.mod | 2 +- container-object-storage-interface-controller/go.sum | 4 ++-- .../resources/deployment.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 91a77dab..4ac42513 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -2,7 +2,7 @@ module sigs.k8s.io/container-object-storage-interface-controller go 1.18 -replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 +replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc require ( github.com/spf13/cobra v1.4.0 diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index f485e6ea..efbfbe82 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -272,8 +272,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 h1:johRtfTuppEtm1S/IK1ir88NaXjCOL/8BezwawGRQx0= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc h1:BxGRby1y7TlyeLbNMwnDp6BMcrPB4jM+MdfG+S7X0Qo= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index e222fa60..7d106096 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,7 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: gcr.io/k8s-staging-sig-storage/objectstorage-controller:v20221027-v0.1.1-8-g300019f + image: docker.io/shanduur/cosi-controller:latest imagePullPolicy: Always args: - "--v=5" From eb07ee06f008eea83b88c78c3d55bb61ccef8c56 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 15:55:30 +0200 Subject: [PATCH 260/299] feat: API registration --- container-object-storage-interface-controller/go.mod | 2 +- container-object-storage-interface-controller/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 4ac42513..46718666 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -2,7 +2,7 @@ module sigs.k8s.io/container-object-storage-interface-controller go 1.18 -replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc +replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 require ( github.com/spf13/cobra v1.4.0 diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index efbfbe82..b02b7566 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -272,8 +272,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc h1:BxGRby1y7TlyeLbNMwnDp6BMcrPB4jM+MdfG+S7X0Qo= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018124508-45d4532cbbfc/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 h1:ASp7U0yEVMR1/OOUI/KbwgWNh43oSoV90jkpyx2PykY= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= From 463416a3273b51eba7edef6b04a6adb33f33e263 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 16 Nov 2023 18:29:10 +0100 Subject: [PATCH 261/299] chore: update API Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-controller/go.mod | 4 +--- container-object-storage-interface-controller/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 46718666..966d7164 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -2,8 +2,6 @@ module sigs.k8s.io/container-object-storage-interface-controller go 1.18 -replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 - require ( github.com/spf13/cobra v1.4.0 github.com/spf13/viper v1.12.0 @@ -11,7 +9,7 @@ require ( k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 + sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index b02b7566..77afabec 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -272,8 +272,6 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 h1:ASp7U0yEVMR1/OOUI/KbwgWNh43oSoV90jkpyx2PykY= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= @@ -708,6 +706,8 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= From a36630006828b9651ed22c3aebc64fbfa52eba0d Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 16 Nov 2023 18:36:01 +0100 Subject: [PATCH 262/299] fix: revert deployment change Signed-off-by: Mateusz Urbanek --- .../resources/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/resources/deployment.yaml b/container-object-storage-interface-controller/resources/deployment.yaml index 7d106096..e222fa60 100644 --- a/container-object-storage-interface-controller/resources/deployment.yaml +++ b/container-object-storage-interface-controller/resources/deployment.yaml @@ -31,7 +31,7 @@ spec: serviceAccountName: objectstorage-controller-sa containers: - name: objectstorage-controller - image: docker.io/shanduur/cosi-controller:latest + image: gcr.io/k8s-staging-sig-storage/objectstorage-controller:v20221027-v0.1.1-8-g300019f imagePullPolicy: Always args: - "--v=5" From e0de1277130ff3d796e28d51aa2253c7016920fe Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 30 Nov 2023 19:24:07 +0100 Subject: [PATCH 263/299] fix: adjust case according to go std --- .../pkg/util/const.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go index 0aa9bf7d..0bc2b49c 100644 --- a/container-object-storage-interface-controller/pkg/util/const.go +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -10,7 +10,7 @@ const ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("A bucket already existing that matches the bucket claim") - ErrInvalidBucketClass = errors.New("Cannot find bucket class with the name specified in the bucket claim") - ErrNotImplemented = errors.New("Operation Not Implemented") + ErrBucketAlreadyExists = errors.New("a bucket already existing that matches the bucket claim") + ErrInvalidBucketClass = errors.New("cannot find bucket class with the name specified in the bucket claim") + ErrNotImplemented = errors.New("operation not implemented") ) From 69c42d19ecfbcf24eb1ec55334adfa9b42a6c29e Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 30 Nov 2023 19:38:00 +0100 Subject: [PATCH 264/299] fix(review/1): added event constants Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim.go | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 539a27f6..b5026e56 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -10,13 +10,12 @@ import ( kubeclientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" objectstoragev1alpha1 "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" - + "sigs.k8s.io/container-object-storage-interface-api/controller/events" "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) // BucketClaimListener is a resource handler for bucket requests objects @@ -43,7 +42,7 @@ func (b *BucketClaimListener) Add(ctx context.Context, bucketClaim *v1alpha1.Buc if err != nil { switch err { case util.ErrInvalidBucketClass: - klog.V(3).ErrorS(util.ErrInvalidBucketClass, + klog.V(3).ErrorS(err, "bucketClaim", bucketClaim.ObjectMeta.Name, "ns", bucketClaim.ObjectMeta.Namespace, "bucketClassName", bucketClaim.Spec.BucketClassName) @@ -108,17 +107,11 @@ func (b *BucketClaimListener) Delete(ctx context.Context, bucketClaim *v1alpha1. // provisionBucketClaimOperation attempts to provision a bucket for a given bucketClaim. // -// Recorded events -// -// InvalidBucket - Bucket provided in the BucketClaim does not exist -// InvalidBucketClass - BucketClass provided in the BucketClaim does not exist -// // Return values -// -// nil - BucketClaim successfully processed -// ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] -// ErrBucketAlreadyExists - BucketClaim already processed -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - BucketClaim successfully processed +// - ErrInvalidBucketClass - BucketClass does not exist [requeue'd with exponential backoff] +// - ErrBucketAlreadyExists - BucketClaim already processed +// - non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, inputBucketClaim *v1alpha1.BucketClaim) error { bucketClaim := inputBucketClaim.DeepCopy() if bucketClaim.Status.BucketReady { @@ -132,7 +125,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, "InvalidBucket", "Bucket provided in the BucketClaim does not exist") + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.ProvisioningFailed, "Bucket provided in the BucketClaim does not exist") return err } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) @@ -167,11 +160,11 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, "InvalidBucketClass", "BucketClass provided in the BucketClaim does not exist") + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClass provided in the BucketClaim does not exist") return util.ErrInvalidBucketClass } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) - return util.ErrInvalidBucketClass + return err } bucketName = bucketClassName + string(bucketClaim.ObjectMeta.UID) From b2ba942f4685e65e0abf32410216bb025f4af78a Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 8 Dec 2023 20:36:35 +0100 Subject: [PATCH 265/299] fix(review/1): format message Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index b5026e56..498c7e84 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -2,6 +2,7 @@ package bucketclaim import ( "context" + "fmt" v1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" @@ -125,7 +126,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.ProvisioningFailed, "Bucket provided in the BucketClaim does not exist") + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "Bucket %q provided in the BucketClaim does not exist.", bucketName) return err } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) @@ -160,7 +161,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClass provided in the BucketClaim does not exist") + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %q provided in the BucketClaim does not exist.", bucketClassName) return util.ErrInvalidBucketClass } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) @@ -258,9 +259,9 @@ func (b *BucketClaimListener) bucketClaims(namespace string) objectstoragev1alph } // recordEvent during the processing of the objects -func (b *BucketClaimListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { +func (b *BucketClaimListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if b.eventRecorder == nil { return } - b.eventRecorder.Event(subject, eventtype, reason, message) + b.eventRecorder.Event(subject, eventtype, reason, fmt.Sprintf(message, args...)) } From 512c0bd6ac677f6e9bef134d238be3f9636765f5 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 8 Dec 2023 20:52:07 +0100 Subject: [PATCH 266/299] fix: typo in error Co-authored-by: Blaine Gardner Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-controller/pkg/util/const.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/pkg/util/const.go b/container-object-storage-interface-controller/pkg/util/const.go index 0bc2b49c..082d779e 100644 --- a/container-object-storage-interface-controller/pkg/util/const.go +++ b/container-object-storage-interface-controller/pkg/util/const.go @@ -10,7 +10,7 @@ const ( var ( // Error codes that the central controller will return - ErrBucketAlreadyExists = errors.New("a bucket already existing that matches the bucket claim") + ErrBucketAlreadyExists = errors.New("a bucket already exists that matches the bucket claim") ErrInvalidBucketClass = errors.New("cannot find bucket class with the name specified in the bucket claim") ErrNotImplemented = errors.New("operation not implemented") ) From 910e3bb1a8de6c8afe4d1ab11b34b54420260b09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:38:55 +0000 Subject: [PATCH 267/299] Bump library/golang from 1.21.1 to 1.21.5 Bumps library/golang from 1.21.1 to 1.21.5. --- updated-dependencies: - dependency-name: library/golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile index 2de87d66..e50bbfb8 100644 --- a/container-object-storage-interface-provisioner-sidecar/Dockerfile +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -1,7 +1,7 @@ # # BUILDER # -FROM docker.io/library/golang:1.21.1 AS builder +FROM docker.io/library/golang:1.21.5 AS builder WORKDIR /buildroot From c7e6b0226060809341e8397dedba65cefa401324 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 11 May 2023 15:07:01 +0200 Subject: [PATCH 268/299] feat(bucket|bucketaccess): added EventRecorder --- .../pkg/bucket/bucket_controller.go | 57 +++++++++++----- .../pkg/bucket/bucket_controller_test.go | 12 ++++ .../bucketaccess/bucketaccess_controller.go | 66 +++++++++++++------ .../bucketaccess_controller_test.go | 12 ++++ 4 files changed, 112 insertions(+), 35 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 5adf241c..a71e05ee 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -20,9 +20,13 @@ import ( "fmt" "strings" + v1 "k8s.io/api/core/v1" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" utilversion "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/record" "k8s.io/klog/v2" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" @@ -42,6 +46,8 @@ type BucketListener struct { provisionerClient cosi.ProvisionerClient driverName string + eventRecorder record.EventRecorder + kubeClient kube.Interface bucketClient buckets.Interface kubeVersion *utilversion.Version @@ -58,9 +64,16 @@ func NewBucketListener(driverName string, client cosi.ProvisionerClient) *Bucket } // Add attempts to create a bucket for a given bucket. This function must be idempotent +// +// Recorded events +// +// MissingBucketClassName - BucketClassName was not defined for the inputBucket +// InvalidBucketClass - BucketClass provided in the BucketClaim does not exist +// // Return values -// nil - Bucket successfully provisioned -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - Bucket successfully provisioned +// non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) error { bucket := inputBucket.DeepCopy() @@ -71,7 +84,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.BucketClassName == "" { err = errors.New(fmt.Sprintf("BucketClassName not defined for bucket %s", bucket.ObjectMeta.Name)) - klog.V(3).ErrorS(err, "BucketClassName not defined") + b.recordEvent(inputBucket, v1.EventTypeWarning, "MissingBucketClassName", "BucketClassName was not defined in the Bucket") return err } @@ -100,7 +113,10 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) bucketID = bucket.Spec.ExistingBucketID if bucket.Spec.Parameters == nil { bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) - if err != nil { + if kubeerrors.IsNotFound(err) { + b.recordEvent(inputBucket, v1.EventTypeWarning, "InvalidBucketClass", "BucketClass provided in the BucketClaim does not exist") + return err + } else if err != nil { klog.V(3).ErrorS(err, "Error fetching bucketClass", "bucketClass", bucket.Spec.BucketClassName, "bucket", bucket.ObjectMeta.Name) @@ -108,7 +124,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } if bucketClass.Parameters != nil { - var param map[string]string + param := make(map[string]string) for k, v := range bucketClass.Parameters { param[k] = v } @@ -125,11 +141,9 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - klog.V(3).ErrorS(err, "Driver failed to create bucket", - "bucket", bucket.ObjectMeta.Name) + b.recordEvent(inputBucket, v1.EventTypeWarning, status.Code(err).String(), "Failed to create bucket") return errors.Wrap(err, "Failed to create bucket") } - } if rsp == nil { @@ -201,8 +215,9 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) // Update attempts to reconcile changes to a given bucket. This function must be idempotent // Return values -// nil - Bucket successfully reconciled -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - Bucket successfully reconciled +// non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { klog.V(3).InfoS("Update Bucket", "name", old.Name) @@ -263,8 +278,9 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) // Delete function is called when the bucket was not able to add finalizers while creation. // Hence we will take care of removing the BucketClaim finalizer before deleting the Bucket object. // Return values -// nil - Bucket successfully deleted -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - Bucket successfully deleted +// non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error { klog.V(3).InfoS("Delete Bucket", "name", inputBucket.ObjectMeta.Name, @@ -314,6 +330,11 @@ func (b *BucketListener) InitializeBucketClient(bc buckets.Interface) { b.bucketClient = bc } +// InitializeEventRecorder initializes the event recorder +func (b *BucketListener) InitializeEventRecorder(er record.EventRecorder) { + b.eventRecorder = er +} + func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bucket) error { if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { klog.V(5).InfoS("Skipping bucket for provisioner", @@ -333,9 +354,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - klog.V(3).ErrorS(err, "Failed to delete bucket", - "bucket", bucket.ObjectMeta.Name, - ) + b.recordEvent(bucket, v1.EventTypeWarning, status.Code(err).String(), "Failed to delete bucket") return err } } @@ -396,3 +415,11 @@ func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccess } panic("uninitialized listener") } + +// recordEvent during the processing of the objects +func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { + if b.eventRecorder == nil { + return + } + b.eventRecorder.Event(subject, eventtype, reason, message) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 460ec6f2..54f72efd 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -31,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/record" "google.golang.org/grpc" ) @@ -71,6 +72,17 @@ func TestInitializeBucketClient(t *testing.T) { } } +func TestInitializeEventRecorder(t *testing.T) { + eventRecorder := record.NewFakeRecorder(1) + + bl := BucketListener{} + bl.InitializeEventRecorder(eventRecorder) + + if bl.eventRecorder == nil { + t.Errorf("BucketClient not initialized, expected not nil") + } +} + func TestAddWrongProvisioner(t *testing.T) { driver := "driver1" mpc := struct{ fakespec.FakeProvisionerClient }{} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 8a584777..96ba20ea 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -22,12 +22,14 @@ import ( "strings" "time" - corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" utilversion "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" kubecorev1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/record" "k8s.io/klog/v2" cosiapi "sigs.k8s.io/container-object-storage-interface-api/apis" @@ -48,6 +50,8 @@ type BucketAccessListener struct { provisionerClient cosi.ProvisionerClient driverName string + eventRecorder record.EventRecorder + kubeClient kube.Interface bucketClient buckets.Interface kubeVersion *utilversion.Version @@ -62,9 +66,17 @@ func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) ( } // Add attempts to provision credentials to access a given bucket. This function must be idempotent +// +// Recorded events +// +// BucketNotReady - BucketAccess can't be granted to bucket not in Ready state and without a bucketID +// MissingServiceAccountName - Must define ServiceAccountName when AuthenticationType is IAM +// InvalidBucketAccessClass - BucketAccessClass provided in the BucketAccess does not exist +// // Return values -// nil - BucketAccess successfully granted -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - BucketAccess successfully granted +// non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { bucketAccess := inputBucketAccess.DeepCopy() @@ -91,7 +103,10 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) - if err != nil { + if kubeerrors.IsNotFound(err) { + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "InvalidBucketAccessClass", "BucketAccessClass provided in the BucketAccess does not exist") + return err + } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) return errors.Wrap(err, "Failed to fetch BucketAccessClass") } @@ -129,6 +144,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "MissingServiceAccountName", "Must define ServiceAccountName when AuthenticationType is IAM") return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } @@ -146,6 +162,9 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Failed to fetch bucket") } + if bucket.Status.BucketID == "" { + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "BucketNotReady", "BucketAccess can't be granted to bucket not in Ready state and without a bucketID") + } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } @@ -163,11 +182,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - klog.V(3).ErrorS(err, - "Failed to grant access", - "bucketAccess", bucketAccess.ObjectMeta.Name, - "bucketClaim", bucketClaimName, - ) + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, status.Code(err).String(), "Failed to grant access") return errors.Wrap(err, "failed to grant access") } @@ -237,7 +252,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "failed to fetch secrets") } - if _, err := bal.secrets(namespace).Create(ctx, &corev1.Secret{ + if _, err := bal.secrets(namespace).Create(ctx, &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: secretCredName, Namespace: namespace, @@ -246,7 +261,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a StringData: map[string]string{ "BucketInfo": string(stringData), }, - Type: corev1.SecretTypeOpaque, + Type: v1.SecretTypeOpaque, }, metav1.CreateOptions{}); err != nil { if !kubeerrors.IsAlreadyExists(err) { klog.V(3).ErrorS(err, @@ -291,8 +306,9 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a // Update attempts to reconcile changes to a given bucketAccess. This function must be idempotent // Return values -// nil - BucketAccess successfully reconciled -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - BucketAccess successfully reconciled +// non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Update BucketAccess", "name", old.ObjectMeta.Name) @@ -312,8 +328,9 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. // Delete attemps to delete a bucketAccess. This function must be idempotent // Return values -// nil - BucketAccess successfully deleted -// non-nil err - Internal error [requeue'd with exponential backoff] +// +// nil - BucketAccess successfully deleted +// non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Delete BucketAccess", "name", bucketAccess.ObjectMeta.Name, @@ -346,11 +363,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { - klog.V(3).ErrorS(err, - "Failed to revoke bucket access", - "bucketAccess", bucketAccess.ObjectMeta.Name, - "bucketClaim", bucketClaimName, - ) + bal.recordEvent(bucketAccess, v1.EventTypeWarning, status.Code(err).String(), "Failed to revoke bucket access") return errors.Wrap(err, "failed to revoke access") } @@ -446,3 +459,16 @@ func (bal *BucketAccessListener) InitializeKubeClient(k kube.Interface) { func (bal *BucketAccessListener) InitializeBucketClient(bc buckets.Interface) { bal.bucketClient = bc } + +// InitializeEventRecorder initializes the event recorder +func (bal *BucketAccessListener) InitializeEventRecorder(er record.EventRecorder) { + bal.eventRecorder = er +} + +// recordEvent during the processing of the objects +func (bal *BucketAccessListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { + if bal.eventRecorder == nil { + return + } + bal.eventRecorder.Event(subject, eventtype, reason, message) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 567ed7f4..1e17f939 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/record" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" @@ -71,6 +72,17 @@ func TestInitializeBucketClient(t *testing.T) { } } +func TestInitializeEventRecorder(t *testing.T) { + eventRecorder := record.NewFakeRecorder(1) + + bal := BucketAccessListener{} + bal.InitializeEventRecorder(eventRecorder) + + if bal.eventRecorder == nil { + t.Errorf("BucketClient not initialized, expected not nil") + } +} + func TestAddWrongProvisioner(t *testing.T) { driver := "driver1" bucketAccessClassName := "bucketAccessClass1" From 91db8e552f222778646325143b93dbcd03a32617 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 14:17:02 +0200 Subject: [PATCH 269/299] feat: replace API --- container-object-storage-interface-provisioner-sidecar/go.mod | 2 ++ container-object-storage-interface-provisioner-sidecar/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 05d8583c..38ca4a6b 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -2,6 +2,8 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.18 +replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 + require ( github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.4.0 diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 81b165cc..a4216ae8 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -282,6 +282,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 h1:johRtfTuppEtm1S/IK1ir88NaXjCOL/8BezwawGRQx0= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= @@ -725,8 +727,6 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 h1:CtqK7l2m9Atw8L5daJdsXvVgxxvQkRBbJbUz7NiadD8= -sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac h1:M1ZBBDJVWw3gDmE+kZZmwQ6+29GbWhG9RMqx9oV0tEs= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= From d364652937a4dafea1bf626c6f5882e3c327711b Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 14:22:31 +0200 Subject: [PATCH 270/299] fix: rename the tag Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-provisioner-sidecar/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Makefile b/container-object-storage-interface-provisioner-sidecar/Makefile index 91df56a1..736f6844 100644 --- a/container-object-storage-interface-provisioner-sidecar/Makefile +++ b/container-object-storage-interface-provisioner-sidecar/Makefile @@ -14,7 +14,7 @@ DOCKER ?= docker PLATFORM ?= linux/$(GOARCH) ## Image tag for all builds -IMAGE_TAG ?= cosi-controller:latest +IMAGE_TAG ?= cosi-provisioner-sidecar:latest ## ## === TARGETS === # From 1e845c06459d86fb6687cf3ad12c28e862f9d9b2 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 18 Oct 2023 15:57:08 +0200 Subject: [PATCH 271/299] feat: API registration --- container-object-storage-interface-provisioner-sidecar/go.mod | 4 ++-- container-object-storage-interface-provisioner-sidecar/go.sum | 4 ++-- .../pkg/bucket/bucket_controller.go | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 38ca4a6b..22c55e66 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -2,7 +2,7 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.18 -replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 +replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 require ( github.com/pkg/errors v0.9.1 @@ -17,6 +17,7 @@ require ( sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac sigs.k8s.io/controller-runtime v0.12.3 + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 ) require ( @@ -69,6 +70,5 @@ require ( k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index a4216ae8..ef433ab7 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -282,8 +282,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070 h1:johRtfTuppEtm1S/IK1ir88NaXjCOL/8BezwawGRQx0= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018120758-aef9fef22070/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 h1:ASp7U0yEVMR1/OOUI/KbwgWNh43oSoV90jkpyx2PykY= +github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index a71e05ee..c890c444 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -35,6 +35,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/structured-merge-diff/v4/schema" "github.com/pkg/errors" "google.golang.org/grpc/codes" @@ -418,6 +419,8 @@ func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccess // recordEvent during the processing of the objects func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { + klog.InfoS("schema", "schema", schema.Schema) + if b.eventRecorder == nil { return } From 2f349c51ca9631be8444ff3558a8c2ddfb3a4a57 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 16 Nov 2023 18:28:25 +0100 Subject: [PATCH 272/299] chore: update API Signed-off-by: Mateusz Urbanek --- .../go.mod | 6 ++---- .../go.sum | 4 ++-- .../pkg/bucket/bucket_controller.go | 8 +++++--- .../pkg/provisioner/provisioner.go | 5 +++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 22c55e66..3e308213 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -2,8 +2,6 @@ module sigs.k8s.io/container-object-storage-interface-provisioner-sidecar go 1.18 -replace sigs.k8s.io/container-object-storage-interface-api => github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 - require ( github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.4.0 @@ -14,10 +12,9 @@ require ( k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.0.0-20220806044417-5d7517114883 + sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac sigs.k8s.io/controller-runtime v0.12.3 - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 ) require ( @@ -70,5 +67,6 @@ require ( k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index ef433ab7..63a23b2f 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -282,8 +282,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9 h1:ASp7U0yEVMR1/OOUI/KbwgWNh43oSoV90jkpyx2PykY= -github.com/shanduur/container-object-storage-interface-api v0.0.0-20231018134926-df1d34a6d9e9/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= @@ -727,6 +725,8 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac h1:M1ZBBDJVWw3gDmE+kZZmwQ6+29GbWhG9RMqx9oV0tEs= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index c890c444..fde4a774 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -35,7 +35,6 @@ import ( "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/structured-merge-diff/v4/schema" "github.com/pkg/errors" "google.golang.org/grpc/codes" @@ -232,6 +231,11 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) bucketClaimNs := bucket.Spec.BucketClaim.Namespace bucketClaimName := bucket.Spec.BucketClaim.Name bucketAccessList, err := b.bucketAccesses(bucketClaimNs).List(ctx, metav1.ListOptions{}) + if err != nil { + klog.V(3).ErrorS(err, "Error fetching BucketAccessList", + "bucket", bucket.ObjectMeta.Name) + return err + } for _, bucketAccess := range bucketAccessList.Items { if strings.EqualFold(bucketAccess.Spec.BucketClaimName, bucketClaimName) { @@ -419,8 +423,6 @@ func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccess // recordEvent during the processing of the objects func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { - klog.InfoS("schema", "schema", schema.Schema) - if b.eventRecorder == nil { return } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go index 6d7105ad..dacd7e46 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go @@ -17,12 +17,13 @@ package provisioner import ( "context" - "google.golang.org/grpc/backoff" "net/url" "time" "github.com/pkg/errors" "google.golang.org/grpc" + "google.golang.org/grpc/backoff" + "google.golang.org/grpc/credentials/insecure" "k8s.io/klog/v2" cosi "sigs.k8s.io/container-object-storage-interface-spec" @@ -38,7 +39,7 @@ func NewDefaultCOSIProvisionerClient(ctx context.Context, address string, debug backoffConfiguration.MaxDelay = maxGrpcBackoff dialOpts := []grpc.DialOption{ - grpc.WithInsecure(), // strictly restricting to local Unix domain socket + grpc.WithTransportCredentials(insecure.NewCredentials()), // strictly restricting to local Unix domain socket grpc.WithConnectParams(grpc.ConnectParams{ Backoff: backoffConfiguration, MinConnectTimeout: grpcDialTimeout, From b9a3838fac56b9a1fd8eef082aecbeef4d93cdb6 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 30 Nov 2023 19:38:04 +0100 Subject: [PATCH 273/299] fix(review/1): added event constants Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller.go | 37 +++++++--------- .../bucketaccess/bucketaccess_controller.go | 42 +++++++------------ 2 files changed, 29 insertions(+), 50 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index fde4a774..2a4a7f04 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -20,6 +20,9 @@ import ( "fmt" "strings" + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,17 +31,13 @@ import ( kube "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" buckets "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" bucketapi "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-api/controller/events" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) // BucketListener manages Bucket objects @@ -65,15 +64,9 @@ func NewBucketListener(driverName string, client cosi.ProvisionerClient) *Bucket // Add attempts to create a bucket for a given bucket. This function must be idempotent // -// Recorded events -// -// MissingBucketClassName - BucketClassName was not defined for the inputBucket -// InvalidBucketClass - BucketClass provided in the BucketClaim does not exist -// // Return values -// -// nil - Bucket successfully provisioned -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - Bucket successfully provisioned +// - non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) error { bucket := inputBucket.DeepCopy() @@ -84,7 +77,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.BucketClassName == "" { err = errors.New(fmt.Sprintf("BucketClassName not defined for bucket %s", bucket.ObjectMeta.Name)) - b.recordEvent(inputBucket, v1.EventTypeWarning, "MissingBucketClassName", "BucketClassName was not defined in the Bucket") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClassName was not defined in the Bucket") return err } @@ -114,7 +107,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.Parameters == nil { bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucket, v1.EventTypeWarning, "InvalidBucketClass", "BucketClass provided in the BucketClaim does not exist") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClass provided in the BucketClaim does not exist") return err } else if err != nil { klog.V(3).ErrorS(err, "Error fetching bucketClass", @@ -141,7 +134,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - b.recordEvent(inputBucket, v1.EventTypeWarning, status.Code(err).String(), "Failed to create bucket") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "Failed to create bucket") return errors.Wrap(err, "Failed to create bucket") } } @@ -215,9 +208,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) // Update attempts to reconcile changes to a given bucket. This function must be idempotent // Return values -// -// nil - Bucket successfully reconciled -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - Bucket successfully reconciled +// - non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error { klog.V(3).InfoS("Update Bucket", "name", old.Name) @@ -283,9 +275,8 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) // Delete function is called when the bucket was not able to add finalizers while creation. // Hence we will take care of removing the BucketClaim finalizer before deleting the Bucket object. // Return values -// -// nil - Bucket successfully deleted -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - Bucket successfully deleted +// - non-nil err - Internal error [requeue'd with exponential backoff] func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error { klog.V(3).InfoS("Delete Bucket", "name", inputBucket.ObjectMeta.Name, @@ -359,7 +350,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - b.recordEvent(bucket, v1.EventTypeWarning, status.Code(err).String(), "Failed to delete bucket") + b.recordEvent(bucket, v1.EventTypeWarning, events.BucketDeleteFailed, "Failed to delete bucket") return err } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 96ba20ea..fd06e67b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -22,6 +22,9 @@ import ( "strings" "time" + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -31,18 +34,14 @@ import ( kubecorev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" - cosiapi "sigs.k8s.io/container-object-storage-interface-api/apis" "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" buckets "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned" bucketapi "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/typed/objectstorage/v1alpha1" + "sigs.k8s.io/container-object-storage-interface-api/controller/events" "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) // BucketAccessListener manages Bucket objects @@ -67,16 +66,9 @@ func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) ( // Add attempts to provision credentials to access a given bucket. This function must be idempotent // -// Recorded events -// -// BucketNotReady - BucketAccess can't be granted to bucket not in Ready state and without a bucketID -// MissingServiceAccountName - Must define ServiceAccountName when AuthenticationType is IAM -// InvalidBucketAccessClass - BucketAccessClass provided in the BucketAccess does not exist -// // Return values -// -// nil - BucketAccess successfully granted -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - BucketAccess successfully granted +// - non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1alpha1.BucketAccess) error { bucketAccess := inputBucketAccess.DeepCopy() @@ -104,7 +96,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "InvalidBucketAccessClass", "BucketAccessClass provided in the BucketAccess does not exist") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "BucketAccessClass provided in the BucketAccess does not exist") return err } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) @@ -144,7 +136,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "MissingServiceAccountName", "Must define ServiceAccountName when AuthenticationType is IAM") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "Must define ServiceAccountName when AuthenticationType is IAM") return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } @@ -162,10 +154,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a return errors.Wrap(err, "Failed to fetch bucket") } - if bucket.Status.BucketID == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, "BucketNotReady", "BucketAccess can't be granted to bucket not in Ready state and without a bucketID") - } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to bucket not in Ready state and without a bucketID") return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } @@ -182,7 +172,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, status.Code(err).String(), "Failed to grant access") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "Failed to grant access") return errors.Wrap(err, "failed to grant access") } @@ -306,9 +296,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a // Update attempts to reconcile changes to a given bucketAccess. This function must be idempotent // Return values -// -// nil - BucketAccess successfully reconciled -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - BucketAccess successfully reconciled +// - non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Update BucketAccess", "name", old.ObjectMeta.Name) @@ -328,9 +317,8 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. // Delete attemps to delete a bucketAccess. This function must be idempotent // Return values -// -// nil - BucketAccess successfully deleted -// non-nil err - Internal error [requeue'd with exponential backoff] +// - nil - BucketAccess successfully deleted +// - non-nil err - Internal error [requeue'd with exponential backoff] func (bal *BucketAccessListener) Delete(ctx context.Context, bucketAccess *v1alpha1.BucketAccess) error { klog.V(3).InfoS("Delete BucketAccess", "name", bucketAccess.ObjectMeta.Name, @@ -363,7 +351,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { - bal.recordEvent(bucketAccess, v1.EventTypeWarning, status.Code(err).String(), "Failed to revoke bucket access") + bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.RevokingAccessFailed, "Failed to revoke bucket access") return errors.Wrap(err, "failed to revoke access") } From 62613ea65ec3986631ed5e8d42dfa11352dd69b9 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 8 Dec 2023 20:43:46 +0100 Subject: [PATCH 274/299] fix(review/1): format message Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller.go | 12 ++++++------ .../pkg/bucketaccess/bucketaccess_controller.go | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 2a4a7f04..587397d5 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -77,7 +77,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.BucketClassName == "" { err = errors.New(fmt.Sprintf("BucketClassName not defined for bucket %s", bucket.ObjectMeta.Name)) - b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClassName was not defined in the Bucket") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket.") return err } @@ -107,7 +107,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.Parameters == nil { bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "BucketClass provided in the BucketClaim does not exist") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %q provided in the BucketClaim does not exist.", bucket.Spec.BucketClassName) return err } else if err != nil { klog.V(3).ErrorS(err, "Error fetching bucketClass", @@ -134,7 +134,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.ProvisioningFailed, "Failed to create bucket") + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "Failed to create bucket.") return errors.Wrap(err, "Failed to create bucket") } } @@ -350,7 +350,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - b.recordEvent(bucket, v1.EventTypeWarning, events.BucketDeleteFailed, "Failed to delete bucket") + b.recordEvent(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, "Failed to delete bucket.") return err } } @@ -413,9 +413,9 @@ func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccess } // recordEvent during the processing of the objects -func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { +func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if b.eventRecorder == nil { return } - b.eventRecorder.Event(subject, eventtype, reason, message) + b.eventRecorder.Event(subject, eventtype, reason, fmt.Sprintf(message, args...)) } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index fd06e67b..58541255 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -96,7 +96,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "BucketAccessClass provided in the BucketAccess does not exist") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "BucketAccessClass %q provided in the BucketAccess does not exist", bucketAccessClass.Name) return err } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) @@ -136,7 +136,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "Must define ServiceAccountName when AuthenticationType is IAM") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedCreateBucket, "Must define ServiceAccountName when AuthenticationType is IAM.") return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } @@ -155,7 +155,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to bucket not in Ready state and without a bucketID") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to Bucket %q not in Ready state (isReady? %t) or without a bucketID (ID empty? %t).", bucket.Name, bucket.Status.BucketReady, bucket.Status.BucketID == "") return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") } @@ -172,7 +172,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.GrantingAccessFailed, "Failed to grant access") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "Failed to grant access.") return errors.Wrap(err, "failed to grant access") } @@ -351,7 +351,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { - bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.RevokingAccessFailed, "Failed to revoke bucket access") + bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, "Failed to revoke bucket access.") return errors.Wrap(err, "failed to revoke access") } @@ -454,9 +454,9 @@ func (bal *BucketAccessListener) InitializeEventRecorder(er record.EventRecorder } // recordEvent during the processing of the objects -func (bal *BucketAccessListener) recordEvent(subject runtime.Object, eventtype, reason, message string) { +func (bal *BucketAccessListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if bal.eventRecorder == nil { return } - bal.eventRecorder.Event(subject, eventtype, reason, message) + bal.eventRecorder.Event(subject, eventtype, reason, fmt.Sprintf(message, args...)) } From b74c537ea95a22d1f033d44e48ed26ac2b87ee6e Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 8 Dec 2023 21:17:34 +0100 Subject: [PATCH 275/299] chore: errors cleanup --- .../pkg/bucket/bucket_controller.go | 17 ++++++++--------- .../pkg/bucketaccess/bucketaccess_controller.go | 12 ++++++------ .../pkg/consts/consts.go | 13 +++++++++++++ 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 587397d5..9cfeeb9d 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -76,9 +76,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "name", bucket.ObjectMeta.Name) if bucket.Spec.BucketClassName == "" { - err = errors.New(fmt.Sprintf("BucketClassName not defined for bucket %s", bucket.ObjectMeta.Name)) - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket.") - return err + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %q.", bucket.Name) + return errors.Wrapf(consts.ErrUndefinedBucketClassName, "Bucket %q", bucket.Name) } if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { @@ -134,16 +133,17 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "Failed to create bucket.") - return errors.Wrap(err, "Failed to create bucket") + err = errors.Wrapf(err, "Failed to create Bucket %q", bucket.Name) + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) + return err } } if rsp == nil { - err = errors.New(fmt.Sprintf("DriverCreateBucket returned a nil response for bucket: %s", bucket.ObjectMeta.Name)) + err = consts.ErrInternal klog.V(3).ErrorS(err, "Internal Error from driver", "bucket", bucket.ObjectMeta.Name) - return err + return errors.Wrapf(err, "Bucket %q", bucket.Name) } if rsp.BucketId != "" { @@ -152,8 +152,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } else { klog.V(3).ErrorS(err, "DriverCreateBucket returned an empty bucketID", "bucket", bucket.ObjectMeta.Name) - err = errors.New(fmt.Sprintf("DriverCreateBucket returned an empty bucketID for bucket: %s", bucket.ObjectMeta.Name)) - return err + return errors.Wrapf(consts.ErrEmptyBucketID, "Bucket %q", bucket.Name) } // Now we update the BucketReady status of BucketClaim diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 58541255..1ed597b7 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -91,7 +91,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a secretCredName := bucketAccess.Spec.CredentialsSecretName if secretCredName == "" { - return errors.New("CredentialsSecretName not defined in the BucketAccess") + return consts.ErrUndefinedSecretName } bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) @@ -119,7 +119,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { - err := errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") + err := consts.ErrInvalidBucketState klog.V(3).ErrorS(err, "Invalid arguments", "bucketClaim", bucketClaim.Name, @@ -156,7 +156,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to Bucket %q not in Ready state (isReady? %t) or without a bucketID (ID empty? %t).", bucket.Name, bucket.Status.BucketReady, bucket.Status.BucketID == "") - return errors.New("BucketAccess can't be granted to bucket not in Ready state and without a bucketID") + return consts.ErrInvalidBucketState } accountName := consts.AccountNamePrefix + string(bucketAccess.UID) @@ -179,14 +179,14 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if rsp.AccountId == "" { - err = errors.New("AccountId not defined in DriverGrantBucketAccess") + err = consts.ErrUndefinedAccountID klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } credentials := rsp.Credentials if len(credentials) != 1 { - err = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") + err = consts.ErrInvalidCredentials klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) } @@ -230,7 +230,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a stringData, err := json.Marshal(bucketInfo) if err != nil { - return errors.New("Error converting bucketinfo into secret") + return consts.ErrBucketInfoConversionFailed } if _, err := bal.secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go index c32e88a2..3b32f03b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go @@ -15,6 +15,8 @@ package consts +import "errors" + const ( AccountNamePrefix = "ba-" BucketInfoPrefix = "bc-" @@ -35,3 +37,14 @@ const ( AzureSecretExpiryTimeStamp = "expiryTs" DefaultTimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST" ) + +var ( + ErrInternal = errors.New("driverCreateBucket returned a nil response") + ErrBucketInfoConversionFailed = errors.New("error converting bucketInfo into Secret") + ErrEmptyBucketID = errors.New("driverCreateBucket returned an empty bucketID") + ErrUndefinedBucketClassName = errors.New("BucketClassName not defined") + ErrUndefinedAccountID = errors.New("AccountId not defined in DriverGrantBucketAccess") + ErrUndefinedSecretName = errors.New("CredentialsSecretName not defined in the BucketAccess") + ErrInvalidBucketState = errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") + ErrInvalidCredentials = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") +) From c3a3ff37f6484373593676d05caa8e264036a8c1 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 13 Feb 2024 21:35:25 +0100 Subject: [PATCH 276/299] fix(deps): updated api Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-provisioner-sidecar/go.mod | 2 +- container-object-storage-interface-provisioner-sidecar/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 3e308213..9422834c 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 + sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 63a23b2f..4781b1ec 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -727,6 +727,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 h1:Ax4j3ThWolmk6yH6jvL3Yf0Fzxe0ZfVuDlSLNILU3GA= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac h1:M1ZBBDJVWw3gDmE+kZZmwQ6+29GbWhG9RMqx9oV0tEs= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac/go.mod h1:SzF/yVSh88TgYdBOAXqhT96XjU8pCQtoeQKxzIOOmWQ= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= From 7eaa72c51daf40d099cd5a413a495e10b3288e69 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 13 Feb 2024 21:36:54 +0100 Subject: [PATCH 277/299] fix(deps): updated api Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-controller/go.mod | 2 +- container-object-storage-interface-controller/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index 966d7164..176d1a71 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -9,7 +9,7 @@ require ( k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 + sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 77afabec..54fd3bfb 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -708,6 +708,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 h1:Ax4j3ThWolmk6yH6jvL3Yf0Fzxe0ZfVuDlSLNILU3GA= +sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= From ad16465f297e7261628d4700ba97158e6a00bcfc Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 13 Feb 2024 21:44:16 +0100 Subject: [PATCH 278/299] test: added scaffolding for testing events Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim_test.go | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index e010c962..65d04e5e 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -5,6 +5,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/record" @@ -79,6 +80,28 @@ func TestAddBRIdempotency(t *testing.T) { runCreateBucketIdempotency(t, "addWithMultipleBR") } +// Test recording events +func TestRecordEvents(t *testing.T) { + t.Parallel() + + for _, tc := range []struct { + name string + expectedEvent struct { + subject runtime.Object + reason string + message string + } + }{} { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + // TODO: actual test + }) + } +} + func runCreateBucket(t *testing.T, name string) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() From 73752e684f94f6ba990a40ab54a7e7b7822502f1 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Tue, 13 Feb 2024 21:44:16 +0100 Subject: [PATCH 279/299] test: added scaffolding for testing events Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller_test.go | 23 +++++++++++++++++++ .../bucketaccess_controller_test.go | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 54f72efd..6489b25b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -27,6 +27,7 @@ import ( fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" @@ -141,3 +142,25 @@ func TestMissingBucketClassName(t *testing.T) { t.Errorf("Expecter error: %+v \n Returned error: %+v", expectedErr, err) } } + +// Test recording events +func TestRecordEvents(t *testing.T) { + t.Parallel() + + for _, tc := range []struct { + name string + expectedEvent struct { + subject runtime.Object + reason string + message string + } + }{} { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + // TODO: actual test + }) + } +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 1e17f939..89a322b2 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -24,6 +24,7 @@ import ( "google.golang.org/grpc" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/version" fakediscovery "k8s.io/client-go/discovery/fake" @@ -284,3 +285,25 @@ func TestAddBucketAccess(t *testing.T) { } } } + +// Test recording events +func TestRecordEvents(t *testing.T) { + t.Parallel() + + for _, tc := range []struct { + name string + expectedEvent struct { + subject runtime.Object + reason string + message string + } + }{} { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + // TODO: actual test + }) + } +} From 7f5fd165e75c894a2a5527b1d7a3ab04d02d0068 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 14 Feb 2024 21:55:42 +0100 Subject: [PATCH 280/299] test: extended scaffolding Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim.go | 4 +- .../pkg/bucketclaim/bucketclaim_test.go | 53 +++++++++++++++---- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index 498c7e84..dcbb7257 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -126,7 +126,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "Bucket %q provided in the BucketClaim does not exist.", bucketName) + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "Bucket %v provided in the BucketClaim does not exist.", bucketName) return err } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) @@ -161,7 +161,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %q provided in the BucketClaim does not exist.", bucketClassName) + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %v provided in the BucketClaim does not exist.", bucketClassName) return util.ErrInvalidBucketClass } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 65d04e5e..65636843 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -2,16 +2,17 @@ package bucketclaim import ( "context" + "fmt" "testing" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/record" types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" - + "sigs.k8s.io/container-object-storage-interface-api/controller/events" "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) @@ -84,20 +85,50 @@ func TestAddBRIdempotency(t *testing.T) { func TestRecordEvents(t *testing.T) { t.Parallel() + ctx := context.TODO() + for _, tc := range []struct { name string - expectedEvent struct { - subject runtime.Object - reason string - message string - } - }{} { + expectedEvent string + eventTrigger func(context.Context, *BucketClaimListener) + }{ + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + ""), + eventTrigger: func(ctx context.Context, bcl *BucketClaimListener) { + panic("unimplemented") + }, + }, + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + ""), + eventTrigger: func(ctx context.Context, bcl *BucketClaimListener) { + panic("unimplemented") + }, + }, + } { tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() - // TODO: actual test + recorder := record.NewFakeRecorder(1) + + bcl := &BucketClaimListener{} + bcl.InitializeEventRecorder(recorder) + + tc.eventTrigger(ctx, bcl) + + event := <-recorder.Events + if event != tc.expectedEvent { + t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + } }) } } @@ -255,3 +286,7 @@ func runCreateBucketIdempotency(t *testing.T, name string) { t.Fatalf("Expecting a single Bucket created but found %v", len(bucketList.Items)) } } + +func newEvent(eventType, reason, message string) string { + return fmt.Sprintf("%s %s %s", eventType, reason, message) +} From b749a81c6d77e7373d3bcbbf666447ec83190c4c Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 15 Feb 2024 20:56:30 +0100 Subject: [PATCH 281/299] test: implemented tests for Events Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim.go | 6 +- .../pkg/bucketclaim/bucketclaim_test.go | 157 +++++++++++------- 2 files changed, 99 insertions(+), 64 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index dcbb7257..b443af3c 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -126,7 +126,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "Bucket %v provided in the BucketClaim does not exist.", bucketName) + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) return err } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) @@ -161,8 +161,8 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %v provided in the BucketClaim does not exist.", bucketClassName) - return util.ErrInvalidBucketClass + b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) + return err } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) return err diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 65636843..e60af78a 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -6,12 +6,13 @@ import ( "testing" v1 "k8s.io/api/core/v1" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/record" - + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" types "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" - bucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" "sigs.k8s.io/container-object-storage-interface-api/controller/events" "sigs.k8s.io/container-object-storage-interface-controller/pkg/util" ) @@ -81,64 +82,12 @@ func TestAddBRIdempotency(t *testing.T) { runCreateBucketIdempotency(t, "addWithMultipleBR") } -// Test recording events -func TestRecordEvents(t *testing.T) { - t.Parallel() - - ctx := context.TODO() - - for _, tc := range []struct { - name string - expectedEvent string - eventTrigger func(context.Context, *BucketClaimListener) - }{ - { - name: "", - expectedEvent: newEvent( - v1.EventTypeWarning, - events.FailedCreateBucket, - ""), - eventTrigger: func(ctx context.Context, bcl *BucketClaimListener) { - panic("unimplemented") - }, - }, - { - name: "", - expectedEvent: newEvent( - v1.EventTypeWarning, - events.FailedCreateBucket, - ""), - eventTrigger: func(ctx context.Context, bcl *BucketClaimListener) { - panic("unimplemented") - }, - }, - } { - tc := tc - - t.Run(tc.name, func(t *testing.T) { - t.Parallel() - - recorder := record.NewFakeRecorder(1) - - bcl := &BucketClaimListener{} - bcl.InitializeEventRecorder(recorder) - - tc.eventTrigger(ctx, bcl) - - event := <-recorder.Events - if event != tc.expectedEvent { - t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) - } - }) - } -} - func runCreateBucket(t *testing.T, name string) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() + client := fakebucketclientset.NewSimpleClientset() + kubeClient := fakekubeclientset.NewSimpleClientset() eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() @@ -182,8 +131,8 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() + client := fakebucketclientset.NewSimpleClientset() + kubeClient := fakekubeclientset.NewSimpleClientset() eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() @@ -238,8 +187,8 @@ func runCreateBucketIdempotency(t *testing.T, name string) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client := bucketclientset.NewSimpleClientset() - kubeClient := fake.NewSimpleClientset() + client := fakebucketclientset.NewSimpleClientset() + kubeClient := fakekubeclientset.NewSimpleClientset() eventRecorder := record.NewFakeRecorder(3) listener := NewBucketClaimListener() @@ -287,6 +236,92 @@ func runCreateBucketIdempotency(t *testing.T, name string) { } } +// Test recording events +func TestRecordEvents(t *testing.T) { + t.Parallel() + + defaultBucketClaim := &v1alpha1.BucketClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-bucketClaim", + Namespace: "test-ns", + }, + Spec: v1alpha1.BucketClaimSpec{ + BucketClassName: "test-bucketClass", + }, + } + + for _, tc := range []struct { + name string + expectedEvent string + eventTrigger func(*testing.T, *BucketClaimListener) + }{ + { + name: "ExistingBucketNotFound", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + "buckets.objectstorage.k8s.io \"existing-bucket\" not found"), + eventTrigger: func(t *testing.T, bcl *BucketClaimListener) { + ctx := context.TODO() + + bucketClaim := defaultBucketClaim.DeepCopy() + bucketClaim.Spec.ExistingBucketName = "existing-bucket" + + err := bcl.Add(ctx, bucketClaim) + if !kubeerrors.IsNotFound(err) { + t.Errorf("expected Not Found error got %v", err) + } + }, + }, + { + name: "BucketClassNotFound", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + "bucketclasses.objectstorage.k8s.io \"test-bucketClass\" not found"), + eventTrigger: func(t *testing.T, listener *BucketClaimListener) { + ctx := context.TODO() + bucketClaim := defaultBucketClaim.DeepCopy() + + err := listener.Add(ctx, bucketClaim) + if !kubeerrors.IsNotFound(err) { + t.Errorf("expected Not Found error got %v", err) + } + }, + }, + } { + tc := tc + + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + client := fakebucketclientset.NewSimpleClientset() + kubeClient := fakekubeclientset.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(1) + + listener := NewBucketClaimListener() + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) + + tc.eventTrigger(t, listener) + + select { + case event, ok := <-eventRecorder.Events: + if ok { + if event != tc.expectedEvent { + t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + } + } else { + t.Error("channel closed, no event") + } + default: + t.Errorf("no event after trigger") + } + }) + } +} + func newEvent(eventType, reason, message string) string { return fmt.Sprintf("%s %s %s", eventType, reason, message) } From 7875ce92d6947f87eed34561b3d5b9dc55c6d6cb Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Wed, 14 Feb 2024 21:55:43 +0100 Subject: [PATCH 282/299] test: extended scaffolding Signed-off-by: Mateusz Urbanek --- .../cmd/objectstorage-sidecar/cmd.go | 5 +- .../pkg/bucket/bucket_controller.go | 28 +-- .../pkg/bucket/bucket_controller_test.go | 147 +++++++++++---- .../bucketaccess/bucketaccess_controller.go | 19 +- .../bucketaccess_controller_test.go | 167 +++++++++++++++--- .../pkg/provisioner/provisioner.go | 3 +- .../pkg/provisioner/server.go | 9 +- 7 files changed, 277 insertions(+), 101 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go index 4e500042..ce678456 100644 --- a/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go +++ b/container-object-storage-interface-provisioner-sidecar/cmd/objectstorage-sidecar/cmd.go @@ -96,10 +96,7 @@ func run(ctx context.Context, args []string) error { } bl := bucket.NewBucketListener(info.Name, cosiClient) - bal, err := bucketaccess.NewBucketAccessListener(info.Name, cosiClient) - if err != nil { - return err - } + bal := bucketaccess.NewBucketAccessListener(info.Name, cosiClient) ctrl.AddBucketListener(bl) ctrl.AddBucketAccessListener(bal) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 9cfeeb9d..09b23264 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -20,14 +20,12 @@ import ( "fmt" "strings" - "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - utilversion "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" @@ -49,7 +47,6 @@ type BucketListener struct { kubeClient kube.Interface bucketClient buckets.Interface - kubeVersion *utilversion.Version } // NewBucketListener returns a resource handler for Bucket objects @@ -76,8 +73,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "name", bucket.ObjectMeta.Name) if bucket.Spec.BucketClassName == "" { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %q.", bucket.Name) - return errors.Wrapf(consts.ErrUndefinedBucketClassName, "Bucket %q", bucket.Name) + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %v.", bucket.Name) + return fmt.Errorf("%w for Bucket %v", consts.ErrUndefinedBucketClassName, bucket.Name) } if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { @@ -106,7 +103,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.Parameters == nil { bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClass %q provided in the BucketClaim does not exist.", bucket.Spec.BucketClassName) + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) return err } else if err != nil { klog.V(3).ErrorS(err, "Error fetching bucketClass", @@ -133,7 +130,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - err = errors.Wrapf(err, "Failed to create Bucket %q", bucket.Name) + err = fmt.Errorf("Failed to create Bucket %v: %w", bucket.Name, err) b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) return err } @@ -143,7 +140,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) err = consts.ErrInternal klog.V(3).ErrorS(err, "Internal Error from driver", "bucket", bucket.ObjectMeta.Name) - return errors.Wrapf(err, "Bucket %q", bucket.Name) + return fmt.Errorf("%w for Bucket %v", err, bucket.Name) } if rsp.BucketId != "" { @@ -152,7 +149,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) } else { klog.V(3).ErrorS(err, "DriverCreateBucket returned an empty bucketID", "bucket", bucket.ObjectMeta.Name) - return errors.Wrapf(consts.ErrEmptyBucketID, "Bucket %q", bucket.Name) + return fmt.Errorf("%w for Bucket %v", consts.ErrEmptyBucketID, bucket.Name) } // Now we update the BucketReady status of BucketClaim @@ -181,7 +178,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) controllerutil.AddFinalizer(bucket, consts.BucketFinalizer) if bucket, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.V(3).ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to update bucket finalizers") + return fmt.Errorf("failed to update bucket finalizers: %w", err) } klog.V(5).Infof("Successfully added finalizer to bucket: %s", bucket.ObjectMeta.Name) @@ -194,7 +191,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if _, err = b.buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.V(3).ErrorS(err, "Failed to update bucket status", "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to update bucket status") + return fmt.Errorf("failed to update bucket status: %w", err) } klog.V(3).InfoS("Add Bucket success", @@ -311,13 +308,6 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke // InitializeKubeClient initializes the kubernetes client func (b *BucketListener) InitializeKubeClient(k kube.Interface) { b.kubeClient = k - - serverVersion, err := k.Discovery().ServerVersion() - if err != nil { - klog.V(3).ErrorS(err, "Cannot determine server version") - } else { - b.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) - } } // InitializeBucketClient initializes the object storage bucket client @@ -349,7 +339,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - b.recordEvent(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, "Failed to delete bucket.") + b.recordEvent(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, err.Error()) return err } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 6489b25b..b9318862 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -18,36 +18,24 @@ package bucket import ( "context" "errors" - "reflect" + "fmt" "testing" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" - fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" - cosi "sigs.k8s.io/container-object-storage-interface-spec" - fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" - + "google.golang.org/grpc" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - utilversion "k8s.io/apimachinery/pkg/util/version" - "k8s.io/apimachinery/pkg/version" - fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/record" - - "google.golang.org/grpc" + "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" + fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" + "sigs.k8s.io/container-object-storage-interface-api/controller/events" + cosi "sigs.k8s.io/container-object-storage-interface-spec" + fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) func TestInitializeKubeClient(t *testing.T) { client := fakekubeclientset.NewSimpleClientset() - fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) - if !ok { - t.Fatalf("Couldn't convert Discovery() to *FakeDiscovery") - } - - fakeVersion := &version.Info{ - GitVersion: "v1.0.0", - } - fakeDiscovery.FakedServerVersion = fakeVersion bl := BucketListener{} bl.InitializeKubeClient(client) @@ -55,11 +43,6 @@ func TestInitializeKubeClient(t *testing.T) { if bl.kubeClient == nil { t.Errorf("KubeClient was nil") } - - expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) - if !reflect.DeepEqual(expected, bl.kubeVersion) { - t.Errorf("Expected %+v, but got %+v", expected, bl.kubeVersion) - } } func TestInitializeBucketClient(t *testing.T) { @@ -137,7 +120,7 @@ func TestMissingBucketClassName(t *testing.T) { } ctx := context.TODO() err := bl.Add(ctx, &b) - expectedErr := errors.New("BucketClassName not defined for bucket testbucket") + expectedErr := errors.New("BucketClassName not defined for Bucket testbucket") if err == nil || err.Error() != expectedErr.Error() { t.Errorf("Expecter error: %+v \n Returned error: %+v", expectedErr, err) } @@ -149,18 +132,116 @@ func TestRecordEvents(t *testing.T) { for _, tc := range []struct { name string - expectedEvent struct { - subject runtime.Object - reason string - message string - } - }{} { + expectedEvent string + cosiObjects []runtime.Object + driver struct{ fakespec.FakeProvisionerClient } + eventTrigger func(*testing.T, *BucketListener) + }{ + { + name: "", + expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + eventTrigger: func(t *testing.T, bl *BucketListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverCreateBucket: func( + _ context.Context, + _ *cosi.DriverCreateBucketRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverCreateBucketResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + eventTrigger: func(t *testing.T, bl *BucketListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverCreateBucket: func( + _ context.Context, + _ *cosi.DriverCreateBucketRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverCreateBucketResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + eventTrigger: func(t *testing.T, bl *BucketListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverCreateBucket: func( + _ context.Context, + _ *cosi.DriverCreateBucketRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverCreateBucketResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent(v1.EventTypeWarning, events.FailedDeleteBucket, ""), + eventTrigger: func(t *testing.T, bl *BucketListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverDeleteBucket: func( + _ context.Context, + _ *cosi.DriverDeleteBucketRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverDeleteBucketResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + } { tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() - // TODO: actual test + client := fakebucketclientset.NewSimpleClientset(tc.cosiObjects...) + kubeClient := fakekubeclientset.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(1) + + listener := NewBucketListener("test", &tc.driver) + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) + + tc.eventTrigger(t, listener) + + select { + case event, ok := <-eventRecorder.Events: + if ok { + if event != tc.expectedEvent { + t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + } + } else { + t.Error("channel closed, no event") + } + default: + t.Errorf("no event after trigger") + } }) } } + +func newEvent(eventType, reason, message string) string { + return fmt.Sprintf("%s %s %s", eventType, reason, message) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 1ed597b7..53b3809e 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -29,7 +29,6 @@ import ( kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - utilversion "k8s.io/apimachinery/pkg/util/version" kube "k8s.io/client-go/kubernetes" kubecorev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" @@ -53,15 +52,14 @@ type BucketAccessListener struct { kubeClient kube.Interface bucketClient buckets.Interface - kubeVersion *utilversion.Version } // NewBucketAccessListener returns a resource handler for BucketAccess objects -func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) (*BucketAccessListener, error) { +func NewBucketAccessListener(driverName string, client cosi.ProvisionerClient) *BucketAccessListener { return &BucketAccessListener{ driverName: driverName, provisionerClient: client, - }, nil + } } // Add attempts to provision credentials to access a given bucket. This function must be idempotent @@ -96,7 +94,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "BucketAccessClass %q provided in the BucketAccess does not exist", bucketAccessClass.Name) + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "BucketAccessClass %v provided in the BucketAccess does not exist: %v", bucketAccessClass.Name, err) return err } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) @@ -136,7 +134,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedCreateBucket, "Must define ServiceAccountName when AuthenticationType is IAM.") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "Must define ServiceAccountName when AuthenticationType is IAM.") return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") } @@ -155,7 +153,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to Bucket %q not in Ready state (isReady? %t) or without a bucketID (ID empty? %t).", bucket.Name, bucket.Status.BucketReady, bucket.Status.BucketID == "") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to Bucket %v not in Ready state (isReady? %t) or without a bucketID (ID empty? %t).", bucket.Name, bucket.Status.BucketReady, bucket.Status.BucketID == "") return consts.ErrInvalidBucketState } @@ -434,13 +432,6 @@ func (bal *BucketAccessListener) bucketAccessClasses() bucketapi.BucketAccessCla // InitializeKubeClient initializes the kubernetes client func (bal *BucketAccessListener) InitializeKubeClient(k kube.Interface) { bal.kubeClient = k - - serverVersion, err := k.Discovery().ServerVersion() - if err != nil { - klog.V(3).ErrorS(err, "Cannot determine server version") - } else { - bal.kubeVersion = utilversion.MustParseSemantic(serverVersion.GitVersion) - } } // InitializeBucketClient initializes the object storage bucket client diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 89a322b2..9d26117c 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -17,37 +17,26 @@ package bucketaccess import ( "context" - "reflect" + "fmt" "strings" "testing" "time" "google.golang.org/grpc" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - utilversion "k8s.io/apimachinery/pkg/util/version" - "k8s.io/apimachinery/pkg/version" - fakediscovery "k8s.io/client-go/discovery/fake" fakekubeclientset "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/record" - "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" + "sigs.k8s.io/container-object-storage-interface-api/controller/events" cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) func TestInitializeKubeClient(t *testing.T) { client := fakekubeclientset.NewSimpleClientset() - fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) - if !ok { - t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") - } - - fakeVersion := &version.Info{ - GitVersion: "v1.0.0", - } - fakeDiscovery.FakedServerVersion = fakeVersion bal := BucketAccessListener{} bal.InitializeKubeClient(client) @@ -55,11 +44,6 @@ func TestInitializeKubeClient(t *testing.T) { if bal.kubeClient == nil { t.Errorf("KubeClient was nil") } - - expected := utilversion.MustParseSemantic(fakeVersion.GitVersion) - if !reflect.DeepEqual(expected, bal.kubeVersion) { - t.Errorf("Expected %+v, but got %+v", expected, bal.kubeVersion) - } } func TestInitializeBucketClient(t *testing.T) { @@ -292,18 +276,149 @@ func TestRecordEvents(t *testing.T) { for _, tc := range []struct { name string - expectedEvent struct { - subject runtime.Object - reason string - message string - } - }{} { + expectedEvent string + cosiObjects []runtime.Object + driver struct{ fakespec.FakeProvisionerClient } + eventTrigger func(*testing.T, *BucketAccessListener) + }{ + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedGrantAccess, + ""), + eventTrigger: func(t *testing.T, bal *BucketAccessListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverGrantBucketAccess: func( + _ context.Context, + _ *cosi.DriverGrantBucketAccessRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverGrantBucketAccessResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedGrantAccess, + ""), + eventTrigger: func(t *testing.T, bal *BucketAccessListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverGrantBucketAccess: func( + _ context.Context, + _ *cosi.DriverGrantBucketAccessRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverGrantBucketAccessResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedGrantAccess, + ""), + eventTrigger: func(t *testing.T, bal *BucketAccessListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverGrantBucketAccess: func( + _ context.Context, + _ *cosi.DriverGrantBucketAccessRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverGrantBucketAccessResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.WaitingForBucket, + ""), + eventTrigger: func(t *testing.T, bal *BucketAccessListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverGrantBucketAccess: func( + _ context.Context, + _ *cosi.DriverGrantBucketAccessRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverGrantBucketAccessResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + { + name: "", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedRevokeAccess, + ""), + eventTrigger: func(t *testing.T, bal *BucketAccessListener) { + panic("unimplemented") + }, + driver: struct{ fakespec.FakeProvisionerClient }{ + FakeProvisionerClient: fakespec.FakeProvisionerClient{ + FakeDriverRevokeBucketAccess: func( + _ context.Context, + _ *cosi.DriverRevokeBucketAccessRequest, + _ ...grpc.CallOption, + ) (*cosi.DriverRevokeBucketAccessResponse, error) { + panic("unimplemented") + }, + }, + }, + }, + } { tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() - // TODO: actual test + client := fakebucketclientset.NewSimpleClientset(tc.cosiObjects...) + kubeClient := fakekubeclientset.NewSimpleClientset() + eventRecorder := record.NewFakeRecorder(1) + + listener := NewBucketAccessListener("test", &tc.driver) + listener.InitializeKubeClient(kubeClient) + listener.InitializeBucketClient(client) + listener.InitializeEventRecorder(eventRecorder) + + tc.eventTrigger(t, listener) + + select { + case event, ok := <-eventRecorder.Events: + if ok { + if event != tc.expectedEvent { + t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + } + } else { + t.Error("channel closed, no event") + } + default: + t.Errorf("no event after trigger") + } }) } } + +func newEvent(eventType, reason, message string) string { + return fmt.Sprintf("%s %s %s", eventType, reason, message) +} diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go index dacd7e46..f8b133d3 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/provisioner.go @@ -17,6 +17,7 @@ package provisioner import ( "context" + "fmt" "net/url" "time" @@ -65,7 +66,7 @@ func NewCOSIProvisionerClient(ctx context.Context, address string, dialOpts []gr if addr.Scheme != "unix" { err := errors.New("Address must be a unix domain socket") klog.ErrorS(err, "Unsupported scheme", "expected", "unix", "found", addr.Scheme) - return nil, errors.Wrap(err, "Invalid argument") + return nil, fmt.Errorf("unsupported scheme: %w", err) } for _, interceptor := range interceptors { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go index a65949a6..18d26f1b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/provisioner/server.go @@ -15,6 +15,7 @@ package provisioner import ( "context" + "fmt" "net" "net/url" @@ -42,22 +43,22 @@ func (s *COSIProvisionerServer) Run(ctx context.Context) error { if addr.Scheme != "unix" { err := errors.New("Address must be a unix domain socket") klog.ErrorS(err, "Unsupported scheme", "expected", "unix", "found", addr.Scheme) - return errors.Wrap(err, "Invalid argument") + return fmt.Errorf("invalid argument: %w", err) } listenConfig := net.ListenConfig{} listener, err := listenConfig.Listen(ctx, "unix", addr.Path) if err != nil { klog.ErrorS(err, "Failed to start server") - return errors.Wrap(err, "Failed to start server") + return fmt.Errorf("failed to start server: %w", err) } server := grpc.NewServer(s.listenOpts...) if s.provisionerServer == nil || s.identityServer == nil { - err := errors.New("ProvisionerServer and identity server cannot be nil") + err := errors.New("ProvisionerServer and IdentityServer cannot be nil") klog.ErrorS(err, "Invalid args") - return errors.Wrap(err, "Invalid args") + return fmt.Errorf("invalid args: %w", err) } cosi.RegisterIdentityServer(server, s.identityServer) From c7195756086daa9a77c1cc10b7fa2acf2b6a21c9 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 22 Feb 2024 14:40:54 +0100 Subject: [PATCH 283/299] test(bucket): added event tests Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller.go | 3 +- .../pkg/bucket/bucket_controller_test.go | 98 ++++++++++++++++--- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index 09b23264..e6e5cea7 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -73,7 +73,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "name", bucket.ObjectMeta.Name) if bucket.Spec.BucketClassName == "" { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %v.", bucket.Name) + b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %v", bucket.Name) return fmt.Errorf("%w for Bucket %v", consts.ErrUndefinedBucketClassName, bucket.Name) } @@ -302,7 +302,6 @@ func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucke } return nil - } // InitializeKubeClient initializes the kubernetes client diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index b9318862..2623ac43 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -20,9 +20,13 @@ import ( "errors" "fmt" "testing" + "time" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" fakekubeclientset "k8s.io/client-go/kubernetes/fake" @@ -30,6 +34,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" "sigs.k8s.io/container-object-storage-interface-api/controller/events" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) @@ -130,6 +135,34 @@ func TestMissingBucketClassName(t *testing.T) { func TestRecordEvents(t *testing.T) { t.Parallel() + var ( + bucketClass = &v1alpha1.BucketClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket-class", + }, + } + bucketClaim = &v1alpha1.BucketClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket-claim", + }, + } + bucket = &v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket", + Finalizers: []string{ + consts.BucketFinalizer, + }, + }, + Spec: v1alpha1.BucketSpec{ + DriverName: "test", + DeletionPolicy: v1alpha1.DeletionPolicyDelete, + BucketClaim: &v1.ObjectReference{ + Name: bucketClaim.GetObjectMeta().GetName(), + }, + }, + } + ) + for _, tc := range []struct { name string expectedEvent string @@ -138,10 +171,15 @@ func TestRecordEvents(t *testing.T) { eventTrigger func(*testing.T, *BucketListener) }{ { - name: "", - expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + name: "BucketClassNameNotDefined", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + "BucketClassName was not defined in the Bucket bucket"), eventTrigger: func(t *testing.T, bl *BucketListener) { - panic("unimplemented") + if err := bl.Add(context.TODO(), bucket.DeepCopy()); !errors.Is(err, consts.ErrUndefinedBucketClassName) { + t.Errorf("expected %v error got %v", consts.ErrUndefinedBucketClassName, err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -150,16 +188,25 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverCreateBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverCreateBucketResponse, error) { - panic("unimplemented") + panic("should not be reached, bucket class name is not defined") }, }, }, }, { - name: "", - expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + name: "BucketClassNotFound", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + "bucketclasses.objectstorage.k8s.io \"bucket-class\" not found"), eventTrigger: func(t *testing.T, bl *BucketListener) { - panic("unimplemented") + bucket := bucket.DeepCopy() + bucket.Spec.ExistingBucketID = "existing" + bucket.Spec.BucketClassName = bucketClass.GetObjectMeta().GetName() + + if err := bl.Add(context.TODO(), bucket); !kubeerrors.IsNotFound(err) { + t.Errorf("expected Not Found error got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -168,16 +215,25 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverCreateBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverCreateBucketResponse, error) { - panic("unimplemented") + panic("should not be reached, bucket class does not exist") }, }, }, }, { - name: "", - expectedEvent: newEvent(v1.EventTypeWarning, events.FailedCreateBucket, ""), + name: "UnknownCreateError", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedCreateBucket, + "Failed to create Bucket bucket: rpc error: code = Unknown desc = unknown error test"), + cosiObjects: []runtime.Object{bucketClass}, eventTrigger: func(t *testing.T, bl *BucketListener) { - panic("unimplemented") + bucket := bucket.DeepCopy() + bucket.Spec.BucketClassName = bucketClass.GetObjectMeta().GetName() + + if err := bl.Add(context.TODO(), bucket); status.Code(err) != codes.Unknown { + t.Errorf("expected Unknown got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -186,16 +242,26 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverCreateBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverCreateBucketResponse, error) { - panic("unimplemented") + return nil, status.Error(codes.Unknown, "unknown error test") }, }, }, }, { - name: "", - expectedEvent: newEvent(v1.EventTypeWarning, events.FailedDeleteBucket, ""), + name: "UnknownDeleteError", + expectedEvent: newEvent( + v1.EventTypeWarning, + events.FailedDeleteBucket, + "rpc error: code = Unknown desc = unknown error test"), + cosiObjects: []runtime.Object{bucketClaim}, eventTrigger: func(t *testing.T, bl *BucketListener) { - panic("unimplemented") + bucket := bucket.DeepCopy() + time, _ := time.Parse(time.DateTime, "2006-01-02 15:04:05") + bucket.ObjectMeta.DeletionTimestamp = &metav1.Time{Time: time} + + if err := bl.Update(context.TODO(), bucket, bucket); status.Code(err) != codes.Unknown { + t.Errorf("expected Unknown got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -204,7 +270,7 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverDeleteBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverDeleteBucketResponse, error) { - panic("unimplemented") + return nil, status.Error(codes.Unknown, "unknown error test") }, }, }, From de39e544eb02b4f86112aca3b56af872286b3a76 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 16 Feb 2024 13:53:28 +0100 Subject: [PATCH 284/299] chore: go mod tidy Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-controller/go.sum | 2 -- .../pkg/bucketclaim/bucketclaim_test.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 54fd3bfb..0dc3b45f 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -706,8 +706,6 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= -sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 h1:Ax4j3ThWolmk6yH6jvL3Yf0Fzxe0ZfVuDlSLNILU3GA= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index e60af78a..56701ad4 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -310,7 +310,7 @@ func TestRecordEvents(t *testing.T) { case event, ok := <-eventRecorder.Events: if ok { if event != tc.expectedEvent { - t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + t.Errorf("expected %s got %s", tc.expectedEvent, event) } } else { t.Error("channel closed, no event") From 3e61226de0a00597b7632c473e72285b7d81bdf9 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 22 Feb 2024 15:05:06 +0100 Subject: [PATCH 285/299] chore: streamline errors Signed-off-by: Mateusz Urbanek --- .../go.sum | 2 - .../bucketaccess/bucketaccess_controller.go | 46 ++++++++++--------- .../pkg/consts/consts.go | 17 +++---- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 4781b1ec..b2c6cccc 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -725,8 +725,6 @@ k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010 h1:8Lw3AyLbbkRGlB9GRu9prtSPEp8DLlXjUzaXN6b9gxM= -sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20231116171305-97700454b010/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49 h1:Ax4j3ThWolmk6yH6jvL3Yf0Fzxe0ZfVuDlSLNILU3GA= sigs.k8s.io/container-object-storage-interface-api v0.1.1-0.20240208184109-05444273ee49/go.mod h1:YiB+i/UGkzqgODDhRG3u7jkbWkQcoUeLEJ7hwOT/2Qk= sigs.k8s.io/container-object-storage-interface-spec v0.1.1-0.20221006174327-ec782953b8ac h1:M1ZBBDJVWw3gDmE+kZZmwQ6+29GbWhG9RMqx9oV0tEs= diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 53b3809e..830ca9f4 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -22,7 +22,6 @@ import ( "strings" "time" - "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" @@ -94,11 +93,11 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "BucketAccessClass %v provided in the BucketAccess does not exist: %v", bucketAccessClass.Name, err) + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) return err } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) - return errors.Wrap(err, "Failed to fetch BucketAccessClass") + return fmt.Errorf("failed to fetch BucketAccessClass: %w", err) } if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { @@ -113,7 +112,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketClaim, err := bal.bucketClaims(namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) - return errors.Wrap(err, "Failed to fetch bucketClaim") + return fmt.Errorf("failed to fetch bucketClaim: %w", err) } if bucketClaim.Status.BucketName == "" || bucketClaim.Status.BucketReady != true { @@ -123,7 +122,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "bucketClaim", bucketClaim.Name, "bucketAccess", bucketAccess.ObjectMeta.Name, ) - return errors.Wrap(err, "Invalid arguments") + return fmt.Errorf("invalid bucket state: %w", err) } authType := cosi.AuthenticationType_UnknownAuthenticationType @@ -134,8 +133,9 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a } if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "Must define ServiceAccountName when AuthenticationType is IAM.") - return errors.New("Must define ServiceAccountName when AuthenticationType is IAM") + err = consts.ErrUndefinedServiceAccountName + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) + return err } if bucketAccess.Status.AccessGranted == true { @@ -149,12 +149,16 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) - return errors.Wrap(err, "Failed to fetch bucket") + return fmt.Errorf("failed to fetch bucket: %w", err) } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, "BucketAccess can't be granted to Bucket %v not in Ready state (isReady? %t) or without a bucketID (ID empty? %t).", bucket.Name, bucket.Status.BucketReady, bucket.Status.BucketID == "") - return consts.ErrInvalidBucketState + err = fmt.Errorf("%w: (isReady? %t), (ID empty? %t)", + consts.ErrInvalidBucketState, + bucket.Status.BucketReady, + bucket.Status.BucketID == "") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, err.Error()) + return err } accountName := consts.AccountNamePrefix + string(bucketAccess.UID) @@ -170,8 +174,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, "Failed to grant access.") - return errors.Wrap(err, "failed to grant access") + bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) + return fmt.Errorf("failed to grant access: %w", err) } } @@ -179,14 +183,14 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if rsp.AccountId == "" { err = consts.ErrUndefinedAccountID klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) - return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) + return fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) } credentials := rsp.Credentials if len(credentials) != 1 { err = consts.ErrInvalidCredentials klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) - return errors.Wrap(err, fmt.Sprintf("BucketAccess %s", bucketAccess.ObjectMeta.Name)) + return fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) } bucketInfoName := consts.BucketInfoPrefix + string(bucketAccess.ObjectMeta.UID) @@ -237,7 +241,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "Failed to create secrets", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "failed to fetch secrets") + return fmt.Errorf("failed to fetch secrets: %w", err) } if _, err := bal.secrets(namespace).Create(ctx, &v1.Secret{ @@ -256,7 +260,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "Failed to create minted secret", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, "Failed to create minted secret") + return fmt.Errorf("failed to create minted secret: %w", err) } } } @@ -274,7 +278,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.V(3).ErrorS(err, "Failed to update BucketAccess finalizer", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess finalizer. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) + return fmt.Errorf("failed to update finalizer on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) } } @@ -286,7 +290,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.V(3).ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return errors.Wrap(err, fmt.Sprintf("Failed to update BucketAccess Status. BucketAccess: %s", bucketAccess.ObjectMeta.Name)) + return fmt.Errorf("failed to update Status on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) } return nil @@ -333,13 +337,13 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke bucketClaim, err := bal.bucketClaims(bucketAccess.ObjectMeta.Namespace).Get(ctx, bucketClaimName, metav1.GetOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to fetch bucketClaim", "bucketClaim", bucketClaimName) - return errors.Wrap(err, "Failed to fetch bucketClaim") + return fmt.Errorf("failed to fetch bucketClaim: %w", err) } bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) - return errors.Wrap(err, "Failed to fetch bucket") + return fmt.Errorf("failed to fetch bucket: %w", err) } req := &cosi.DriverRevokeBucketAccessRequest{ @@ -350,7 +354,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, "Failed to revoke bucket access.") - return errors.Wrap(err, "failed to revoke access") + return fmt.Errorf("failed to revoke access: %w", err) } credSecretName := bucketAccess.Spec.CredentialsSecretName diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go index 3b32f03b..646ef376 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/consts/consts.go @@ -39,12 +39,13 @@ const ( ) var ( - ErrInternal = errors.New("driverCreateBucket returned a nil response") - ErrBucketInfoConversionFailed = errors.New("error converting bucketInfo into Secret") - ErrEmptyBucketID = errors.New("driverCreateBucket returned an empty bucketID") - ErrUndefinedBucketClassName = errors.New("BucketClassName not defined") - ErrUndefinedAccountID = errors.New("AccountId not defined in DriverGrantBucketAccess") - ErrUndefinedSecretName = errors.New("CredentialsSecretName not defined in the BucketAccess") - ErrInvalidBucketState = errors.New("BucketName cannot be empty or BucketNotReady in bucketClaim") - ErrInvalidCredentials = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") + ErrInternal = errors.New("driverCreateBucket returned a nil response") + ErrBucketInfoConversionFailed = errors.New("error converting bucketInfo into Secret") + ErrEmptyBucketID = errors.New("driverCreateBucket returned an empty bucketID") + ErrUndefinedBucketClassName = errors.New("BucketClassName not defined") + ErrUndefinedAccountID = errors.New("AccountId not defined in DriverGrantBucketAccess") + ErrUndefinedSecretName = errors.New("CredentialsSecretName not defined in the BucketAccess") + ErrInvalidBucketState = errors.New("BucketAccess can't be granted to Bucket not in Ready state") + ErrInvalidCredentials = errors.New("Credentials returned in DriverGrantBucketAccessResponse should be of length 1") + ErrUndefinedServiceAccountName = errors.New("ServiceAccountName required when AuthenticationType is IAM") ) From 760bd511198e56a6695a7c801c07e7ce5271e217 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 22 Feb 2024 16:30:11 +0100 Subject: [PATCH 286/299] test(bucketaccess): added event tests Signed-off-by: Mateusz Urbanek --- .../bucketaccess/bucketaccess_controller.go | 2 +- .../bucketaccess_controller_test.go | 131 ++++++++++++++---- 2 files changed, 107 insertions(+), 26 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 830ca9f4..40e59b5b 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -353,7 +353,7 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { - bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, "Failed to revoke bucket access.") + bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, err.Error()) return fmt.Errorf("failed to revoke access: %w", err) } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 9d26117c..7484c796 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -17,13 +17,17 @@ package bucketaccess import ( "context" + "errors" "fmt" "strings" "testing" "time" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" + kubeerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" fakekubeclientset "k8s.io/client-go/kubernetes/fake" @@ -31,6 +35,7 @@ import ( "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1" fakebucketclientset "sigs.k8s.io/container-object-storage-interface-api/client/clientset/versioned/fake" "sigs.k8s.io/container-object-storage-interface-api/controller/events" + "sigs.k8s.io/container-object-storage-interface-provisioner-sidecar/pkg/consts" cosi "sigs.k8s.io/container-object-storage-interface-spec" fakespec "sigs.k8s.io/container-object-storage-interface-spec/fake" ) @@ -257,10 +262,10 @@ func TestAddBucketAccess(t *testing.T) { updatedBA, _ := bal.bucketAccesses(ns).Get(ctx, ba.ObjectMeta.Name, metav1.GetOptions{}) if updatedBA.Status.AccessGranted != true { - t.Errorf("Expected %t, got %t", true, ba.Status.AccessGranted) + t.Errorf("expected %t, got %t", true, ba.Status.AccessGranted) } if !strings.EqualFold(updatedBA.Status.AccountID, accountId) { - t.Errorf("Expected %s, got %s", accountId, updatedBA.Status.AccountID) + t.Errorf("expected %s, got %s", accountId, updatedBA.Status.AccountID) } _, err = bal.secrets(ns).Get(ctx, secretName, metav1.GetOptions{}) @@ -274,6 +279,54 @@ func TestAddBucketAccess(t *testing.T) { func TestRecordEvents(t *testing.T) { t.Parallel() + var ( + // bucketClass = &v1alpha1.BucketClass{ + // ObjectMeta: metav1.ObjectMeta{ + // Name: "bucket-class", + // }, + // } + bucket = &v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket", + }, + } + bucketReady = &v1alpha1.Bucket{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket", + }, + Status: v1alpha1.BucketStatus{ + BucketReady: true, + BucketID: "test", + }, + } + bucketClaim = &v1alpha1.BucketClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket-claim", + }, + Status: v1alpha1.BucketClaimStatus{ + BucketReady: true, + BucketName: bucket.GetObjectMeta().GetName(), + }, + } + bucketAccessClass = &v1alpha1.BucketAccessClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket-access-class", + }, + DriverName: "test", + AuthenticationType: v1alpha1.AuthenticationTypeIAM, + } + bucketAccess = &v1alpha1.BucketAccess{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bucket-access", + }, + Spec: v1alpha1.BucketAccessSpec{ + CredentialsSecretName: "credentials", + BucketAccessClassName: bucketAccessClass.GetObjectMeta().GetName(), + BucketClaimName: bucketClaim.GetObjectMeta().GetName(), + }, + } + ) + for _, tc := range []struct { name string expectedEvent string @@ -282,13 +335,17 @@ func TestRecordEvents(t *testing.T) { eventTrigger func(*testing.T, *BucketAccessListener) }{ { - name: "", + name: "BucketAccessClassNotFound", expectedEvent: newEvent( v1.EventTypeWarning, events.FailedGrantAccess, - ""), + "bucketaccessclasses.objectstorage.k8s.io \"bucket-access-class\" not found"), eventTrigger: func(t *testing.T, bal *BucketAccessListener) { - panic("unimplemented") + bucketAccess := bucketAccess.DeepCopy() + + if err := bal.Add(context.TODO(), bucketAccess); !kubeerrors.IsNotFound(err) { + t.Errorf("expected Not Found error got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -297,19 +354,24 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverGrantBucketAccessRequest, _ ...grpc.CallOption, ) (*cosi.DriverGrantBucketAccessResponse, error) { - panic("unimplemented") + panic("should not be reached") }, }, }, }, { - name: "", + name: "UndefinedServiceAccountName", expectedEvent: newEvent( v1.EventTypeWarning, events.FailedGrantAccess, - ""), + consts.ErrUndefinedServiceAccountName.Error()), + cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { - panic("unimplemented") + bucketAccess := bucketAccess.DeepCopy() + + if err := bal.Add(context.TODO(), bucketAccess); !errors.Is(err, consts.ErrUndefinedServiceAccountName) { + t.Errorf("expected %v got %v", consts.ErrUndefinedServiceAccountName, err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -318,19 +380,25 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverGrantBucketAccessRequest, _ ...grpc.CallOption, ) (*cosi.DriverGrantBucketAccessResponse, error) { - panic("unimplemented") + panic("should not be reached") }, }, }, }, { - name: "", + name: "InvalidBucketState", expectedEvent: newEvent( v1.EventTypeWarning, - events.FailedGrantAccess, - ""), + events.WaitingForBucket, + "BucketAccess can't be granted to Bucket not in Ready state: (isReady? false), (ID empty? true)"), + cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim, bucket}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { - panic("unimplemented") + bucketAccess := bucketAccess.DeepCopy() + bucketAccess.Spec.ServiceAccountName = "service-account" + + if err := bal.Add(context.TODO(), bucketAccess); !errors.Is(err, consts.ErrInvalidBucketState) { + t.Errorf("expected %v got %v", consts.ErrInvalidBucketState, err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -339,19 +407,25 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverGrantBucketAccessRequest, _ ...grpc.CallOption, ) (*cosi.DriverGrantBucketAccessResponse, error) { - panic("unimplemented") + panic("should not be reached") }, }, }, }, { - name: "", + name: "GrantInternalError", expectedEvent: newEvent( v1.EventTypeWarning, - events.WaitingForBucket, - ""), + events.FailedGrantAccess, + "rpc error: code = Internal desc = internal error test"), + cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim, bucketReady}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { - panic("unimplemented") + bucketAccess := bucketAccess.DeepCopy() + bucketAccess.Spec.ServiceAccountName = "service-account" + + if err := bal.Add(context.TODO(), bucketAccess); status.Code(errors.Unwrap(err)) != codes.Internal { + t.Errorf("expected Internal got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -360,19 +434,26 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverGrantBucketAccessRequest, _ ...grpc.CallOption, ) (*cosi.DriverGrantBucketAccessResponse, error) { - panic("unimplemented") + return nil, status.Error(codes.Internal, "internal error test") }, }, }, }, { - name: "", + name: "RevokeInternalError", expectedEvent: newEvent( v1.EventTypeWarning, events.FailedRevokeAccess, - ""), + "rpc error: code = Internal desc = internal error test"), + cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim, bucketReady}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { - panic("unimplemented") + bucketAccess := bucketAccess.DeepCopy() + time, _ := time.Parse(time.DateTime, "2006-01-02 15:04:05") + bucketAccess.ObjectMeta.DeletionTimestamp = &metav1.Time{Time: time} + + if err := bal.Update(context.TODO(), bucketAccess, bucketAccess); status.Code(errors.Unwrap(err)) != codes.Internal { + t.Errorf("expected Internal got %v", err) + } }, driver: struct{ fakespec.FakeProvisionerClient }{ FakeProvisionerClient: fakespec.FakeProvisionerClient{ @@ -381,7 +462,7 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverRevokeBucketAccessRequest, _ ...grpc.CallOption, ) (*cosi.DriverRevokeBucketAccessResponse, error) { - panic("unimplemented") + return nil, status.Error(codes.Internal, "internal error test") }, }, }, @@ -407,7 +488,7 @@ func TestRecordEvents(t *testing.T) { case event, ok := <-eventRecorder.Events: if ok { if event != tc.expectedEvent { - t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + t.Errorf("expected %s got %s", tc.expectedEvent, event) } } else { t.Error("channel closed, no event") From a0a6417cbde94ac87aa0383f154353a983117d8a Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 22 Feb 2024 16:30:29 +0100 Subject: [PATCH 287/299] test(bucket): added unwrap to internals Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller.go | 5 ++-- .../pkg/bucket/bucket_controller_test.go | 24 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index e6e5cea7..db40e4e1 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -130,9 +130,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - err = fmt.Errorf("Failed to create Bucket %v: %w", bucket.Name, err) b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) - return err + return fmt.Errorf("failed to create bucket: %w", err) } } @@ -339,7 +338,7 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { b.recordEvent(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, err.Error()) - return err + return fmt.Errorf("failed to delete bucket: %w", err) } } diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 2623ac43..3f662d39 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -127,7 +127,7 @@ func TestMissingBucketClassName(t *testing.T) { err := bl.Add(ctx, &b) expectedErr := errors.New("BucketClassName not defined for Bucket testbucket") if err == nil || err.Error() != expectedErr.Error() { - t.Errorf("Expecter error: %+v \n Returned error: %+v", expectedErr, err) + t.Errorf("expecter error: %+v \n returned error: %+v", expectedErr, err) } } @@ -221,18 +221,18 @@ func TestRecordEvents(t *testing.T) { }, }, { - name: "UnknownCreateError", + name: "CreateInternalError", expectedEvent: newEvent( v1.EventTypeWarning, events.FailedCreateBucket, - "Failed to create Bucket bucket: rpc error: code = Unknown desc = unknown error test"), + "rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketClass}, eventTrigger: func(t *testing.T, bl *BucketListener) { bucket := bucket.DeepCopy() bucket.Spec.BucketClassName = bucketClass.GetObjectMeta().GetName() - if err := bl.Add(context.TODO(), bucket); status.Code(err) != codes.Unknown { - t.Errorf("expected Unknown got %v", err) + if err := bl.Add(context.TODO(), bucket); status.Code(errors.Unwrap(err)) != codes.Internal { + t.Errorf("expected Internal got %v", err) } }, driver: struct{ fakespec.FakeProvisionerClient }{ @@ -242,25 +242,25 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverCreateBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverCreateBucketResponse, error) { - return nil, status.Error(codes.Unknown, "unknown error test") + return nil, status.Error(codes.Internal, "internal error test") }, }, }, }, { - name: "UnknownDeleteError", + name: "DeleteInternalError", expectedEvent: newEvent( v1.EventTypeWarning, events.FailedDeleteBucket, - "rpc error: code = Unknown desc = unknown error test"), + "rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketClaim}, eventTrigger: func(t *testing.T, bl *BucketListener) { bucket := bucket.DeepCopy() time, _ := time.Parse(time.DateTime, "2006-01-02 15:04:05") bucket.ObjectMeta.DeletionTimestamp = &metav1.Time{Time: time} - if err := bl.Update(context.TODO(), bucket, bucket); status.Code(err) != codes.Unknown { - t.Errorf("expected Unknown got %v", err) + if err := bl.Update(context.TODO(), bucket, bucket); status.Code(errors.Unwrap(err)) != codes.Internal { + t.Errorf("expected Internal got %v", err) } }, driver: struct{ fakespec.FakeProvisionerClient }{ @@ -270,7 +270,7 @@ func TestRecordEvents(t *testing.T) { _ *cosi.DriverDeleteBucketRequest, _ ...grpc.CallOption, ) (*cosi.DriverDeleteBucketResponse, error) { - return nil, status.Error(codes.Unknown, "unknown error test") + return nil, status.Error(codes.Internal, "internal error test") }, }, }, @@ -296,7 +296,7 @@ func TestRecordEvents(t *testing.T) { case event, ok := <-eventRecorder.Events: if ok { if event != tc.expectedEvent { - t.Errorf("Expected %s \n got %s", tc.expectedEvent, event) + t.Errorf("expected %s got %s", tc.expectedEvent, event) } } else { t.Error("channel closed, no event") From b138d0b88461e60eaa81f43ee2b66b0dedfd6df1 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 14 Mar 2024 13:23:49 +0100 Subject: [PATCH 288/299] fix: added events to each error Signed-off-by: Mateusz Urbanek --- .../pkg/bucket/bucket_controller.go | 34 ++++++----- .../pkg/bucket/bucket_controller_test.go | 6 +- .../bucketaccess/bucketaccess_controller.go | 58 ++++++++++++------- .../bucketaccess_controller_test.go | 4 +- 4 files changed, 62 insertions(+), 40 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go index db40e4e1..9b0d672c 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller.go @@ -73,8 +73,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) "name", bucket.ObjectMeta.Name) if bucket.Spec.BucketClassName == "" { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, "BucketClassName was not defined in the Bucket %v", bucket.Name) - return fmt.Errorf("%w for Bucket %v", consts.ErrUndefinedBucketClassName, bucket.Name) + return b.recordError(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, fmt.Errorf("%w for Bucket %v", consts.ErrUndefinedBucketClassName, bucket.Name)) } if !strings.EqualFold(bucket.Spec.DriverName, b.driverName) { @@ -103,13 +102,12 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if bucket.Spec.Parameters == nil { bucketClass, err := b.bucketClasses().Get(ctx, bucket.Spec.BucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) - return err + return b.recordError(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err) } else if err != nil { klog.V(3).ErrorS(err, "Error fetching bucketClass", "bucketClass", bucket.Spec.BucketClassName, "bucket", bucket.ObjectMeta.Name) - return err + return b.recordError(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err) } if bucketClass.Parameters != nil { @@ -130,8 +128,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) rsp, err := b.provisionerClient.DriverCreateBucket(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - b.recordEvent(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) - return fmt.Errorf("failed to create bucket: %w", err) + return b.recordError(inputBucket, v1.EventTypeWarning, events.FailedCreateBucket, fmt.Errorf("failed to create bucket: %w", err)) } } @@ -159,7 +156,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) klog.V(3).ErrorS(err, "Failed to get bucketClaim", "bucketClaim", ref.Name, "bucket", bucket.ObjectMeta.Name) - return err + return b.recordError(bucket, v1.EventTypeWarning, events.FailedCreateBucket, err) } bucketClaim.Status.BucketReady = true @@ -167,7 +164,7 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) klog.V(3).ErrorS(err, "Failed to update bucketClaim", "bucketClaim", ref.Name, "bucket", bucket.ObjectMeta.Name) - return err + return b.recordError(bucket, v1.EventTypeWarning, events.FailedCreateBucket, err) } klog.V(5).Infof("Successfully updated status of bucketClaim: %s, bucket: %s", bucketClaim.ObjectMeta.Name, bucket.ObjectMeta.Name) @@ -177,7 +174,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) controllerutil.AddFinalizer(bucket, consts.BucketFinalizer) if bucket, err = b.buckets().Update(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.V(3).ErrorS(err, "Failed to update bucket finalizers", "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to update bucket finalizers: %w", err) + return b.recordError(bucket, v1.EventTypeWarning, events.FailedCreateBucket, + fmt.Errorf("failed to update bucket finalizers: %w", err)) } klog.V(5).Infof("Successfully added finalizer to bucket: %s", bucket.ObjectMeta.Name) @@ -190,7 +188,8 @@ func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) if _, err = b.buckets().UpdateStatus(ctx, bucket, metav1.UpdateOptions{}); err != nil { klog.V(3).ErrorS(err, "Failed to update bucket status", "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to update bucket status: %w", err) + return b.recordError(bucket, v1.EventTypeWarning, events.FailedCreateBucket, + fmt.Errorf("failed to update bucket status: %w", err)) } klog.V(3).InfoS("Add Bucket success", @@ -245,7 +244,7 @@ func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) if controllerutil.ContainsFinalizer(bucket, consts.BucketFinalizer) { err = b.deleteBucketOp(ctx, bucket) if err != nil { - return err + return b.recordError(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, err) } controllerutil.RemoveFinalizer(bucket, consts.BucketFinalizer) @@ -337,7 +336,6 @@ func (b *BucketListener) deleteBucketOp(ctx context.Context, bucket *v1alpha1.Bu if _, err := b.provisionerClient.DriverDeleteBucket(ctx, req); err != nil { if status.Code(err) != codes.NotFound { - b.recordEvent(bucket, v1.EventTypeWarning, events.FailedDeleteBucket, err.Error()) return fmt.Errorf("failed to delete bucket: %w", err) } } @@ -399,6 +397,16 @@ func (b *BucketListener) bucketAccesses(namespace string) bucketapi.BucketAccess panic("uninitialized listener") } +// recordError during the processing of the objects +func (b *BucketListener) recordError(subject runtime.Object, eventtype, reason string, err error) error { + if b.eventRecorder == nil { + return err + } + b.eventRecorder.Event(subject, eventtype, reason, err.Error()) + + return err +} + // recordEvent during the processing of the objects func (b *BucketListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if b.eventRecorder == nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go index 3f662d39..055a47ff 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucket/bucket_controller_test.go @@ -175,7 +175,7 @@ func TestRecordEvents(t *testing.T) { expectedEvent: newEvent( v1.EventTypeWarning, events.FailedCreateBucket, - "BucketClassName was not defined in the Bucket bucket"), + "BucketClassName not defined for Bucket bucket"), eventTrigger: func(t *testing.T, bl *BucketListener) { if err := bl.Add(context.TODO(), bucket.DeepCopy()); !errors.Is(err, consts.ErrUndefinedBucketClassName) { t.Errorf("expected %v error got %v", consts.ErrUndefinedBucketClassName, err) @@ -225,7 +225,7 @@ func TestRecordEvents(t *testing.T) { expectedEvent: newEvent( v1.EventTypeWarning, events.FailedCreateBucket, - "rpc error: code = Internal desc = internal error test"), + "failed to create bucket: rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketClass}, eventTrigger: func(t *testing.T, bl *BucketListener) { bucket := bucket.DeepCopy() @@ -252,7 +252,7 @@ func TestRecordEvents(t *testing.T) { expectedEvent: newEvent( v1.EventTypeWarning, events.FailedDeleteBucket, - "rpc error: code = Internal desc = internal error test"), + "failed to delete bucket: rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketClaim}, eventTrigger: func(t *testing.T, bl *BucketListener) { bucket := bucket.DeepCopy() diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go index 40e59b5b..c441b6b3 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller.go @@ -93,11 +93,11 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucketAccessClass, err := bal.bucketAccessClasses().Get(ctx, bucketAccessClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) - return err + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err) } else if err != nil { klog.ErrorS(err, "Failed to fetch bucketAccessClass", "bucketAccessClass", bucketAccessClassName) - return fmt.Errorf("failed to fetch BucketAccessClass: %w", err) + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to fetch BucketAccessClass: %w", err)) } if !strings.EqualFold(bucketAccessClass.DriverName, bal.driverName) { @@ -122,7 +122,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "bucketClaim", bucketClaim.Name, "bucketAccess", bucketAccess.ObjectMeta.Name, ) - return fmt.Errorf("invalid bucket state: %w", err) + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.WaitingForBucket, + fmt.Errorf("invalid bucket state: %w", err)) } authType := cosi.AuthenticationType_UnknownAuthenticationType @@ -134,8 +135,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if authType == cosi.AuthenticationType_IAM && bucketAccess.Spec.ServiceAccountName == "" { err = consts.ErrUndefinedServiceAccountName - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) - return err + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err) } if bucketAccess.Status.AccessGranted == true { @@ -149,7 +149,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a bucket, err := bal.buckets().Get(ctx, bucketClaim.Status.BucketName, metav1.GetOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to fetch bucket", "bucket", bucketClaim.Status.BucketName) - return fmt.Errorf("failed to fetch bucket: %w", err) + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to fetch bucket: %w", err)) } if bucket.Status.BucketReady != true || bucket.Status.BucketID == "" { @@ -157,8 +158,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a consts.ErrInvalidBucketState, bucket.Status.BucketReady, bucket.Status.BucketID == "") - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.WaitingForBucket, err.Error()) - return err + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.WaitingForBucket, err) } accountName := consts.AccountNamePrefix + string(bucketAccess.UID) @@ -174,23 +174,24 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a rsp, err := bal.provisionerClient.DriverGrantBucketAccess(ctx, req) if err != nil { if status.Code(err) != codes.AlreadyExists { - bal.recordEvent(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err.Error()) - return fmt.Errorf("failed to grant access: %w", err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to grant bucket access: %w", err)) } - } if rsp.AccountId == "" { err = consts.ErrUndefinedAccountID klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) - return fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err)) } credentials := rsp.Credentials if len(credentials) != 1 { err = consts.ErrInvalidCredentials klog.V(3).ErrorS(err, "BucketAccess", bucketAccess.ObjectMeta.Name) - return fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err)) } bucketInfoName := consts.BucketInfoPrefix + string(bucketAccess.ObjectMeta.UID) @@ -232,7 +233,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a stringData, err := json.Marshal(bucketInfo) if err != nil { - return consts.ErrBucketInfoConversionFailed + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, consts.ErrBucketInfoConversionFailed) } if _, err := bal.secrets(namespace).Get(ctx, secretCredName, metav1.GetOptions{}); err != nil { @@ -241,7 +242,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "Failed to create secrets", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to fetch secrets: %w", err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to fetch secrets: %w", err)) } if _, err := bal.secrets(namespace).Create(ctx, &v1.Secret{ @@ -260,7 +262,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a "Failed to create minted secret", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to create minted secret: %w", err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to create minted secret: %w", err)) } } } @@ -268,7 +271,7 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a if controllerutil.AddFinalizer(bucket, consts.BABucketFinalizer) { _, err = bal.buckets().Update(ctx, bucket, metav1.UpdateOptions{}) if err != nil { - return err + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, err) } } @@ -278,7 +281,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.V(3).ErrorS(err, "Failed to update BucketAccess finalizer", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to update finalizer on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to update finalizer on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err)) } } @@ -290,7 +294,8 @@ func (bal *BucketAccessListener) Add(ctx context.Context, inputBucketAccess *v1a klog.V(3).ErrorS(err, "Failed to update BucketAccess Status", "bucketAccess", bucketAccess.ObjectMeta.Name, "bucket", bucket.ObjectMeta.Name) - return fmt.Errorf("failed to update Status on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err) + return bal.recordError(inputBucketAccess, v1.EventTypeWarning, events.FailedGrantAccess, + fmt.Errorf("failed to update Status on BucketAccess %s: %w", bucketAccess.ObjectMeta.Name, err)) } return nil @@ -308,7 +313,7 @@ func (bal *BucketAccessListener) Update(ctx context.Context, old, new *v1alpha1. if !bucketAccess.GetDeletionTimestamp().IsZero() { err := bal.deleteBucketAccessOp(ctx, bucketAccess) if err != nil { - return err + return bal.recordError(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, err) } } @@ -353,7 +358,6 @@ func (bal *BucketAccessListener) deleteBucketAccessOp(ctx context.Context, bucke // First we revoke the bucketAccess from the driver if _, err := bal.provisionerClient.DriverRevokeBucketAccess(ctx, req); err != nil { - bal.recordEvent(bucketAccess, v1.EventTypeWarning, events.FailedRevokeAccess, err.Error()) return fmt.Errorf("failed to revoke access: %w", err) } @@ -448,6 +452,16 @@ func (bal *BucketAccessListener) InitializeEventRecorder(er record.EventRecorder bal.eventRecorder = er } +// recordError during the processing of the objects +func (b *BucketAccessListener) recordError(subject runtime.Object, eventtype, reason string, err error) error { + if b.eventRecorder == nil { + return err + } + b.eventRecorder.Event(subject, eventtype, reason, err.Error()) + + return err +} + // recordEvent during the processing of the objects func (bal *BucketAccessListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if bal.eventRecorder == nil { diff --git a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go index 7484c796..3f07ae71 100644 --- a/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go +++ b/container-object-storage-interface-provisioner-sidecar/pkg/bucketaccess/bucketaccess_controller_test.go @@ -417,7 +417,7 @@ func TestRecordEvents(t *testing.T) { expectedEvent: newEvent( v1.EventTypeWarning, events.FailedGrantAccess, - "rpc error: code = Internal desc = internal error test"), + "failed to grant bucket access: rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim, bucketReady}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { bucketAccess := bucketAccess.DeepCopy() @@ -444,7 +444,7 @@ func TestRecordEvents(t *testing.T) { expectedEvent: newEvent( v1.EventTypeWarning, events.FailedRevokeAccess, - "rpc error: code = Internal desc = internal error test"), + "failed to revoke access: rpc error: code = Internal desc = internal error test"), cosiObjects: []runtime.Object{bucketAccessClass, bucketClaim, bucketReady}, eventTrigger: func(t *testing.T, bal *BucketAccessListener) { bucketAccess := bucketAccess.DeepCopy() From 1bc01944a51fbf01f4d55ad55df0e9db0ca7e760 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 14 Mar 2024 13:23:49 +0100 Subject: [PATCH 289/299] fix: added events to each error Signed-off-by: Mateusz Urbanek --- .../pkg/bucketclaim/bucketclaim.go | 32 ++++++++++++------- .../pkg/bucketclaim/bucketclaim_test.go | 12 +++---- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go index b443af3c..6ab94569 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim.go @@ -84,7 +84,7 @@ func (b *BucketClaimListener) Update(ctx context.Context, old, new *v1alpha1.Buc klog.V(3).ErrorS(err, "Error deleting bucket", "bucket", bucketName, "bucketClaim", bucketClaim.ObjectMeta.Name) - return err + return b.recordError(bucketClaim, v1.EventTypeWarning, events.FailedDeleteBucket, err) } klog.V(5).Infof("Successfully deleted bucket: %s from bucketClaim: %s", bucketName, bucketClaim.ObjectMeta.Name) @@ -126,11 +126,10 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketName = bucketClaim.Spec.ExistingBucketName bucket, err := b.buckets().Get(ctx, bucketName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } else if err != nil { klog.V(3).ErrorS(err, "Get Bucket with ExistingBucketName error", "name", bucketClaim.Spec.ExistingBucketName) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } bucket.Spec.BucketClaim = &v1.ObjectReference{ @@ -148,7 +147,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, klog.V(3).ErrorS(err, "Error updating existing bucket", "bucket", bucket.ObjectMeta.Name, "bucketClaim", bucketClaim.ObjectMeta.Name) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } bucketClaim.Status.BucketName = bucketName @@ -156,16 +155,15 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, } else { bucketClassName := bucketClaim.Spec.BucketClassName if bucketClassName == "" { - return util.ErrInvalidBucketClass + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, util.ErrInvalidBucketClass) } bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) if kubeerrors.IsNotFound(err) { - b.recordEvent(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err.Error()) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } else if err != nil { klog.V(3).ErrorS(err, "Get Bucketclass Error", "name", bucketClassName) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } bucketName = bucketClassName + string(bucketClaim.ObjectMeta.UID) @@ -194,7 +192,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, klog.V(3).ErrorS(err, "Error creationg bucket", "bucket", bucketName, "bucketClaim", bucketClaim.ObjectMeta.Name) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } bucketClaim.Status.BucketName = bucketName @@ -206,7 +204,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, bucketClaim, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).UpdateStatus(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to update status of BucketClaim", "name", bucketClaim.ObjectMeta.Name) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } // Add the finalizers so that bucketClaim is deleted @@ -215,7 +213,7 @@ func (b *BucketClaimListener) provisionBucketClaimOperation(ctx context.Context, _, err = b.bucketClaims(bucketClaim.ObjectMeta.Namespace).Update(ctx, bucketClaim, metav1.UpdateOptions{}) if err != nil { klog.V(3).ErrorS(err, "Failed to add finalizer BucketClaim", "name", bucketClaim.ObjectMeta.Name) - return err + return b.recordError(inputBucketClaim, v1.EventTypeWarning, events.FailedCreateBucket, err) } klog.V(3).Infof("Finished creating Bucket %v", bucketName) @@ -258,6 +256,16 @@ func (b *BucketClaimListener) bucketClaims(namespace string) objectstoragev1alph panic("uninitialized listener") } +// recordError during the processing of the objects +func (b *BucketClaimListener) recordError(subject runtime.Object, eventtype, reason string, err error) error { + if b.eventRecorder == nil { + return err + } + b.eventRecorder.Event(subject, eventtype, reason, err.Error()) + + return err +} + // recordEvent during the processing of the objects func (b *BucketClaimListener) recordEvent(subject runtime.Object, eventtype, reason, message string, args ...any) { if b.eventRecorder == nil { diff --git a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go index 56701ad4..22a173d0 100644 --- a/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go +++ b/container-object-storage-interface-controller/pkg/bucketclaim/bucketclaim_test.go @@ -69,20 +69,20 @@ var bucketClaim2 = types.BucketClaim{ // Test basic add functionality func TestAddBR(t *testing.T) { - runCreateBucket(t, "add") + runCreateBucket(t) } // Test add with multipleBRs func TestAddWithMultipleBR(t *testing.T) { - runCreateBucketWithMultipleBR(t, "addWithMultipleBR") + runCreateBucketWithMultipleBR(t) } // Test add idempotency func TestAddBRIdempotency(t *testing.T) { - runCreateBucketIdempotency(t, "addWithMultipleBR") + runCreateBucketIdempotency(t) } -func runCreateBucket(t *testing.T, name string) { +func runCreateBucket(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -127,7 +127,7 @@ func runCreateBucket(t *testing.T, name string) { } } -func runCreateBucketWithMultipleBR(t *testing.T, name string) { +func runCreateBucketWithMultipleBR(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -183,7 +183,7 @@ func runCreateBucketWithMultipleBR(t *testing.T, name string) { } } -func runCreateBucketIdempotency(t *testing.T, name string) { +func runCreateBucketIdempotency(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() From ce569bccdaefc832f47372a512f08a887530a9ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 02:13:15 +0000 Subject: [PATCH 290/299] Bump the github-dependencies group with 2 updates Bumps the github-dependencies group with 2 updates: [github.com/spf13/cobra](https://github.com/spf13/cobra) and [github.com/spf13/viper](https://github.com/spf13/viper). Updates `github.com/spf13/cobra` from 1.4.0 to 1.8.0 - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.8.0) Updates `github.com/spf13/viper` from 1.12.0 to 1.18.2 - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.12.0...v1.18.2) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] --- .../go.mod | 51 +++---- .../go.sum | 133 +++++++++--------- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/container-object-storage-interface-controller/go.mod b/container-object-storage-interface-controller/go.mod index fd0cdf1a..6e14d469 100644 --- a/container-object-storage-interface-controller/go.mod +++ b/container-object-storage-interface-controller/go.mod @@ -3,8 +3,8 @@ module sigs.k8s.io/container-object-storage-interface-controller go 1.18 require ( - github.com/spf13/cobra v1.4.0 - github.com/spf13/viper v1.12.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.2 k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 @@ -14,53 +14,56 @@ require ( ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.2.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.3.0 // indirect - golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.9.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect diff --git a/container-object-storage-interface-controller/go.sum b/container-object-storage-interface-controller/go.sum index 65ae442c..044f386b 100644 --- a/container-object-storage-interface-controller/go.sum +++ b/container-object-storage-interface-controller/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -37,7 +35,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= @@ -63,11 +60,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -84,11 +82,11 @@ github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -142,8 +140,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= @@ -160,8 +159,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= @@ -177,15 +176,13 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -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.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -199,8 +196,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -210,16 +207,15 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= 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.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= @@ -253,50 +249,53 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= -github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= -github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -309,17 +308,17 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -331,6 +330,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -388,15 +389,14 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -409,8 +409,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -459,23 +459,21 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -484,13 +482,15 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -539,7 +539,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -611,9 +610,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -649,8 +646,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -661,8 +658,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/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.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -675,8 +672,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From b00270f29f99f5d2a7f47dbfaea85f38dd5e88f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 02:35:41 +0000 Subject: [PATCH 291/299] Bump library/golang from 1.21.1 to 1.22.2 Bumps library/golang from 1.21.1 to 1.22.2. --- updated-dependencies: - dependency-name: library/golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- container-object-storage-interface-controller/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-controller/Dockerfile b/container-object-storage-interface-controller/Dockerfile index 9d8d161c..fc164382 100644 --- a/container-object-storage-interface-controller/Dockerfile +++ b/container-object-storage-interface-controller/Dockerfile @@ -1,7 +1,7 @@ # # BUILDER # -FROM docker.io/library/golang:1.21.1 AS builder +FROM docker.io/library/golang:1.22.2 AS builder WORKDIR /buildroot From b1029420d0156cbf85fb764eb321fd3f9aa8db5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:29:10 +0000 Subject: [PATCH 292/299] Bump library/golang from 1.21.5 to 1.22.2 Bumps library/golang from 1.21.5 to 1.22.2. --- updated-dependencies: - dependency-name: library/golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile index e50bbfb8..df6a54f2 100644 --- a/container-object-storage-interface-provisioner-sidecar/Dockerfile +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -1,7 +1,7 @@ # # BUILDER # -FROM docker.io/library/golang:1.21.5 AS builder +FROM docker.io/library/golang:1.22.2 AS builder WORKDIR /buildroot From 80ecfb188a8772179b9445839a76cf80b8528feb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 21:34:25 +0000 Subject: [PATCH 293/299] Bump google.golang.org/grpc from 1.46.2 to 1.63.2 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.2 to 1.63.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.46.2...v1.63.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../go.mod | 23 +++---- .../go.sum | 67 +++++++++---------- 2 files changed, 43 insertions(+), 47 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 05d8583c..75634980 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -7,7 +7,7 @@ require ( github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.12.0 - google.golang.org/grpc v1.46.2 + google.golang.org/grpc v1.63.2 k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.2 @@ -28,11 +28,10 @@ require ( github.com/go-openapi/swag v0.19.15 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.2.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -50,15 +49,15 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.3.0 // indirect - golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 81b165cc..070cddea 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -51,13 +51,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -65,10 +63,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -85,7 +79,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -149,8 +142,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= @@ -167,9 +161,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= @@ -190,15 +183,13 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -278,7 +269,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -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/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -312,6 +302,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -319,7 +310,6 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= @@ -330,6 +320,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -366,6 +357,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -406,8 +398,9 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -420,8 +413,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -433,6 +426,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -482,11 +476,14 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -495,8 +492,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -553,6 +552,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -585,8 +585,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -610,7 +611,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -630,8 +630,8 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -645,15 +645,13 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -667,8 +665,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -685,7 +683,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 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.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 90d0778ac12ea622472f58785a78695c317a1a34 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Mon, 13 May 2024 09:09:38 -0600 Subject: [PATCH 294/299] Add BlaineEXE to the owners file Add BlaineEXE to the owners file to allow reviewing and merging code changes. --- container-object-storage-interface-controller/OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index 2eb42391..19980cfd 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -7,3 +7,4 @@ approvers: - xing-yang - wlan0 - mukhoakash + - BlaineEXE From f7f8b9f90710e4bcec6aeb28e24f522478e902d9 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Mon, 13 May 2024 09:10:20 -0600 Subject: [PATCH 295/299] Add BlaineEXE to the owners file Add BlaineEXE to the owners file to allow reviewing and merging code changes. --- container-object-storage-interface-provisioner-sidecar/OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS index 2eb42391..19980cfd 100644 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -7,3 +7,4 @@ approvers: - xing-yang - wlan0 - mukhoakash + - BlaineEXE From 4f87456a0e75f19a8a54222672dc3b4fbdcd5467 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 21:15:53 +0000 Subject: [PATCH 296/299] Bump library/golang from 1.22.2 to 1.22.3 Bumps library/golang from 1.22.2 to 1.22.3. --- updated-dependencies: - dependency-name: library/golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-object-storage-interface-provisioner-sidecar/Dockerfile b/container-object-storage-interface-provisioner-sidecar/Dockerfile index df6a54f2..04934a14 100644 --- a/container-object-storage-interface-provisioner-sidecar/Dockerfile +++ b/container-object-storage-interface-provisioner-sidecar/Dockerfile @@ -1,7 +1,7 @@ # # BUILDER # -FROM docker.io/library/golang:1.22.2 AS builder +FROM docker.io/library/golang:1.22.3 AS builder WORKDIR /buildroot From bbb676f5dfaf51e529fda8f0ca02dd8faa7c11b9 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 17 May 2024 15:14:42 +0200 Subject: [PATCH 297/299] chore: added shanduur Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-controller/OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-controller/OWNERS b/container-object-storage-interface-controller/OWNERS index 19980cfd..e1434ba0 100644 --- a/container-object-storage-interface-controller/OWNERS +++ b/container-object-storage-interface-controller/OWNERS @@ -8,3 +8,4 @@ approvers: - wlan0 - mukhoakash - BlaineEXE + - shanduur From 14ac08b7159bfff94a6e85ade1cc5398e09f44da Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Fri, 17 May 2024 15:14:42 +0200 Subject: [PATCH 298/299] chore: added shanduur Signed-off-by: Mateusz Urbanek --- container-object-storage-interface-provisioner-sidecar/OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/container-object-storage-interface-provisioner-sidecar/OWNERS b/container-object-storage-interface-provisioner-sidecar/OWNERS index 19980cfd..e1434ba0 100644 --- a/container-object-storage-interface-provisioner-sidecar/OWNERS +++ b/container-object-storage-interface-provisioner-sidecar/OWNERS @@ -8,3 +8,4 @@ approvers: - wlan0 - mukhoakash - BlaineEXE + - shanduur From ac69030f5f9ff2623d120a2d2893bb85a19f869a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:57:39 +0000 Subject: [PATCH 299/299] Bump the github-dependencies group with 2 updates Bumps the github-dependencies group with 2 updates: [github.com/spf13/cobra](https://github.com/spf13/cobra) and [github.com/spf13/viper](https://github.com/spf13/viper). Updates `github.com/spf13/cobra` from 1.4.0 to 1.8.0 - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.8.0) Updates `github.com/spf13/viper` from 1.12.0 to 1.19.0 - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.12.0...v1.19.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] --- .../go.mod | 46 ++++--- .../go.sum | 128 +++++++++--------- 2 files changed, 88 insertions(+), 86 deletions(-) diff --git a/container-object-storage-interface-provisioner-sidecar/go.mod b/container-object-storage-interface-provisioner-sidecar/go.mod index 716e5b5f..3253e4dc 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.mod +++ b/container-object-storage-interface-provisioner-sidecar/go.mod @@ -4,9 +4,9 @@ go 1.18 require ( github.com/pkg/errors v0.9.1 - github.com/spf13/cobra v1.4.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.12.0 + github.com/spf13/viper v1.19.0 google.golang.org/grpc v1.63.2 k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 @@ -18,11 +18,11 @@ require ( ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-logr/logr v1.2.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.15 // indirect @@ -34,35 +34,39 @@ require ( github.com/google/gofuzz v1.1.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect - github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.3.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.9.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect diff --git a/container-object-storage-interface-provisioner-sidecar/go.sum b/container-object-storage-interface-provisioner-sidecar/go.sum index 096903f5..78b5d04d 100644 --- a/container-object-storage-interface-provisioner-sidecar/go.sum +++ b/container-object-storage-interface-provisioner-sidecar/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -37,7 +35,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= @@ -63,11 +60,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -84,11 +82,11 @@ github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -96,8 +94,9 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= @@ -178,7 +177,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -186,7 +184,6 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -200,8 +197,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -211,16 +208,15 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= 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.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= @@ -254,49 +250,55 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= -github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= -github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -310,18 +312,18 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -333,6 +335,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -391,7 +395,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -399,8 +402,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -413,8 +416,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -464,26 +467,23 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -499,8 +499,9 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -549,7 +550,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -623,15 +623,13 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -677,8 +675,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/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.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -691,8 +689,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=