├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build_pr.yaml │ └── helm_release.yaml ├── .gitignore ├── .run └── go build kubernetes-sidecar-injector.run.xml ├── DEVELOP.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── charts ├── kubernetes-sidecar-injector │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── _vars.tpl │ │ ├── mutatingwebhook.yaml │ │ ├── poddisruptionbudget.yaml │ │ ├── rbac.yaml │ │ └── service.yaml │ └── values.yaml └── package.json ├── cmd └── root.go ├── docker-run.sh ├── go.mod ├── go.sum ├── main.go ├── package.json ├── pkg ├── admission │ ├── admission.go │ ├── podpatcher.go │ └── podrequesthandler.go ├── httpd │ └── simpleserver.go └── webhook │ ├── health.go │ ├── sidecarhandler.go │ └── sidecarhandler_test.go └── sample ├── admission-request.json ├── certs ├── cert.pem └── key.pem └── chart ├── echo-server ├── Chart.yaml ├── templates │ ├── deployment.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── sidecar-configmap.yaml └── values.yaml └── nginx ├── Chart.yaml ├── templates ├── deployment.yaml ├── service.yaml ├── serviceaccount.yaml └── sidecar-configmap.yaml └── values.yaml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @mvaalexp -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### :pencil: Description 2 | - 3 | 4 | ### :pencil: Customer Notes 5 | - _Provide relevant details for customers - what changed from a configuration perspective and/or what changes do they 6 | need to incorporate in order to upgrade to this version?_ 7 | 8 | ### :heavy_check_mark: Checklist 9 | - [ ] [Semantic Versioning](https://semver.org/) present in commit message. 10 | 11 | ### [Semantic Versioning](https://semver.org/) 12 | 1. fix(pencil): patches a bug ([PATCH](http://semver.org/#summary)); e.g., fix(pencil): fixed a bug 13 | 2. feat(pencil): new feature ([MINOR](http://semver.org/#summary)); e.g., feat(pencil): added a feature 14 | 3. BREAKING CHANGE/perf(pencil): footer BREAKING CHANGE:, breaking change ([MAJOR](http://semver.org/#summary)); e.g., perf(pencil): api change -------------------------------------------------------------------------------- /.github/workflows/build_pr.yaml: -------------------------------------------------------------------------------- 1 | name: Build PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | jobs: 8 | build: 9 | name: Build PR 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Set up Go ^1.21 13 | uses: actions/setup-go@v5 14 | with: 15 | go-version: ^1.21 16 | 17 | - uses: actions/checkout@v4 18 | 19 | - name: Unit Test 20 | run: make test 21 | 22 | - name: Set up Docker Buildx 23 | uses: docker/setup-buildx-action@v3 24 | 25 | - name: Build 26 | uses: docker/build-push-action@v5 27 | with: 28 | push: false 29 | platforms: linux/amd64,linux/arm64 -------------------------------------------------------------------------------- /.github/workflows/helm_release.yaml: -------------------------------------------------------------------------------- 1 | name: Build and Release Container and Helm Chart 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | name: Release 11 | runs-on: ubuntu-latest 12 | steps: 13 | - id: github-repository 14 | uses: ASzc/change-string-case-action@v6 15 | with: 16 | string: ${{ github.repository }} 17 | 18 | - name: Set up Go ^1.21 19 | uses: actions/setup-go@v5 20 | with: 21 | go-version: ^1.21 22 | 23 | - name: Checkout 24 | uses: actions/checkout@v4 25 | with: 26 | fetch-depth: 0 27 | token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} 28 | 29 | - name: Unit Test 30 | run: make test 31 | 32 | - name: Configure Git 33 | run: | 34 | git config user.name "$GITHUB_ACTOR" 35 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 36 | 37 | - name: Code specific changes 38 | id: code-specific-changes 39 | uses: tj-actions/changed-files@v44 40 | with: 41 | files_ignore: | 42 | charts 43 | .github 44 | .run 45 | 46 | - name: Automated Code Version Bump 47 | if: steps.code-specific-changes.outputs.any_modified == 'true' 48 | id: code-version-bump 49 | uses: phips28/gh-action-bump-version@v11.0.4 50 | env: 51 | GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} 52 | with: 53 | commit-message: 'CI: Bump app version to {{version}} [skip ci]' 54 | 55 | - name: Set up Docker Buildx 56 | if: steps.code-specific-changes.outputs.any_modified == 'true' 57 | uses: docker/setup-buildx-action@v3 58 | 59 | - name: Login to DockerHub 60 | if: steps.code-specific-changes.outputs.any_modified == 'true' 61 | uses: docker/login-action@v3 62 | with: 63 | username: ${{ secrets.DOCKER_HUB_USERNAME }} 64 | password: ${{ secrets.DOCKER_HUB_PASSWORD }} 65 | 66 | - name: Build and push merge to main 67 | if: steps.code-specific-changes.outputs.any_modified == 'true' 68 | uses: docker/build-push-action@v5 69 | with: 70 | push: true 71 | tags: ${{ steps.github-repository.outputs.lowercase }}:${{ steps.code-version-bump.outputs.newTag }},${{ steps.github-repository.outputs.lowercase }}:latest 72 | platforms: linux/amd64,linux/arm64 73 | 74 | - name: Get specific changed files 75 | id: helm-specific-changes 76 | uses: tj-actions/changed-files@v44 77 | with: 78 | files: | 79 | charts/kubernetes-sidecar-injector/** 80 | 81 | - name: Automated Helm Version Bump 82 | if: steps.helm-specific-changes.outputs.any_modified == 'true' 83 | id: helm-version-bump 84 | uses: phips28/gh-action-bump-version@v11.0.4 85 | env: 86 | GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} 87 | PACKAGEJSON_DIR: charts 88 | with: 89 | skip-tag: 'true' 90 | commit-message: 'CI: Bump Helm chart version to {{version}} [skip ci]' 91 | 92 | - name: Extract version from package.json 93 | uses: sergeysova/jq-action@v2 94 | id: version 95 | with: 96 | cmd: 'jq .version package.json -r' 97 | 98 | - name: update Chart.yaml 99 | if: steps.helm-specific-changes.outputs.any_modified == 'true' 100 | working-directory: charts/kubernetes-sidecar-injector 101 | run: | 102 | cat < Chart.yaml 103 | name: ${GITHUB_REPOSITORY#*/} 104 | home: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} 105 | version: ${{ steps.helm-version-bump.outputs.newTag }} 106 | apiVersion: v2 107 | appVersion: "${{ steps.version.outputs.value }}" 108 | keywords: 109 | - kubernetes 110 | - sidecar-injection 111 | sources: 112 | - ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} 113 | EOF 114 | 115 | - name: commit the new Chart.yml 116 | if: steps.helm-specific-changes.outputs.any_modified == 'true' 117 | uses: stefanzweifel/git-auto-commit-action@v5 118 | with: 119 | commit_message: Automated Change [skip ci] 120 | 121 | - name: Install Helm 122 | if: steps.helm-specific-changes.outputs.any_modified == 'true' 123 | uses: azure/setup-helm@v4 124 | with: 125 | version: v3.8.0 126 | 127 | - name: Run chart-releaser 128 | if: steps.helm-specific-changes.outputs.any_modified == 'true' 129 | uses: helm/chart-releaser-action@v1.6.0 130 | env: 131 | CR_TOKEN: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #intellij 2 | .idea 3 | *.iml 4 | *.ipr 5 | *.iws 6 | kubernetes-sidecar-injector 7 | !charts/kubernetes-sidecar-injector 8 | generated-*.yaml 9 | 10 | Gopkg.lock 11 | /vendor/ 12 | -------------------------------------------------------------------------------- /.run/go build kubernetes-sidecar-injector.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DEVELOP.md: -------------------------------------------------------------------------------- 1 | ![example branch parameter](https://github.com/ExpediaGroup/kubernetes-sidecar-injector/actions/workflows/deploy.yaml/badge.svg?branch=main) 2 | [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/ExpediaGroup/kubernetes-sidecar-injector/blob/main/LICENSE) 3 | 4 | ## Contributing 5 | 6 | Code contributions are always welcome. 7 | 8 | * Open an issue in the repo with defect/enhancements 9 | * We can also be reached @ https://gitter.im/expedia-haystack/Lobby 10 | * Fork, make the changes, build and test it locally 11 | * Issue a PR- watch the PR build in [deploy](https://github.com/ExpediaGroup/kubernetes-sidecar-injector/actions) 12 | * Once merged to main, GitHub Actions will build and release the container with latest tag 13 | 14 | 15 | ## Dependencies 16 | 17 | * Ensure [GOROOT, GOPATH and GOBIN](https://www.programming-books.io/essential/go/d6da4b8481f94757bae43be1fdfa9e73-gopath-goroot-gobin) environment variables are set correctly. 18 | 19 | ## Build and run using an IDE (JetBrains) 20 | Run the included [`go build kubernetes-sidecar-injector`](.run/go build kubernetes-sidecar-injector.run.xml) `Go Build` job. 21 | 22 | ## Build and deploy in Kubernetes 23 | 24 | ### Deploy using Kubectl 25 | 26 | To deploy and test this in [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation/) 27 | 28 | * run the command 29 | 30 | ```bash 31 | make kind-install 32 | ``` 33 | (To understand the command above - check the [README](README.md) file) 34 | 35 | After deployment, one can check the service running by 36 | 37 | ```bash 38 | kubectl get pods -n sidecar-injector 39 | 40 | NAME READY STATUS RESTARTS AGE 41 | kubernetes-sidecar-injector-78648d458b-7cv7l 1/1 Running 0 32m 42 | ``` 43 | 44 | ### Test the webhook 45 | 46 | Run the following command to deploy a sample `echo-server`. Note, this [deployment spec carries an annotation](sample/chart/echo-server/templates/deployment.yaml#L16) `sidecar-injector.expedia.com/inject: "haystack-agent"` that triggers injection of `haystack-agent` sidecar defined in [sidecar-configmap.yaml](sample/chart/echo-server/templates/sidecar-configmap.yaml) file. 47 | 48 | ```bash 49 | make install-sample-container 50 | ``` 51 | 52 | One can then run the following command to confirm the sidecar has been injected 53 | 54 | ```bash 55 | kubectl get pod -n sample 56 | 57 | NAME READY STATUS RESTARTS AGE 58 | echo-server-deployment-849b87649d-9x95k 2/2 Running 0 4m 59 | ``` 60 | 61 | Note the **2 containers** in the echo-server pod instead of one. 62 | 63 | ### Clean up webhook 64 | 65 | Run the following commands to delete and cleanup the deployed webhook 66 | 67 | ``` 68 | helm delete -n sidecar-injector kubernetes-sidecar-injector 69 | helm delete -n sample sample-echo-server-sidecar-injector 70 | ``` 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.21 as build 2 | RUN go install honnef.co/go/tools/cmd/staticcheck@latest 3 | WORKDIR /build 4 | COPY . ./ 5 | RUN make release 6 | 7 | FROM scratch 8 | WORKDIR / 9 | COPY --from=build /build/kubernetes-sidecar-injector / 10 | 11 | ENTRYPOINT ["/kubernetes-sidecar-injector"] 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2017 Expedia, Inc. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | CONTAINER_NAME=expediagroup/kubernetes-sidecar-injector 3 | IMAGE_TAG?=$(shell git rev-parse HEAD) 4 | KIND_REPO?="kindest/node" 5 | KUBE_VERSION = v1.21.12 6 | KIND_CLUSTER?=cluster1 7 | 8 | SRC=$(shell find . -type f -name '*.go' -not -path "./vendor/*") 9 | 10 | lint: 11 | staticcheck ./... 12 | 13 | vet: 14 | go vet ./... 15 | 16 | test: 17 | go test ./... 18 | 19 | tidy: 20 | go mod tidy 21 | 22 | imports: 23 | goimports -w ${SRC} 24 | 25 | clean: 26 | go clean 27 | 28 | build: clean vet lint 29 | go build -o kubernetes-sidecar-injector 30 | 31 | release: clean vet lint 32 | CGO_ENABLED=0 GOOS=linux go build -o kubernetes-sidecar-injector 33 | 34 | docker: 35 | docker build --no-cache -t ${CONTAINER_NAME}:${IMAGE_TAG} . 36 | 37 | kind-load: docker 38 | kind load docker-image ${CONTAINER_NAME}:${IMAGE_TAG} --name ${KIND_CLUSTER} 39 | 40 | helm-install: 41 | helm upgrade -i kubernetes-sidecar-injector ./charts/kubernetes-sidecar-injector/. --namespace=sidecar-injector --create-namespace --set image.tag=${IMAGE_TAG} 42 | 43 | helm-template: 44 | helm template kubernetes-sidecar-injector ./charts/kubernetes-sidecar-injector 45 | 46 | kind-create: 47 | -kind create cluster --image "${KIND_REPO}:${KUBE_VERSION}" --name ${KIND_CLUSTER} 48 | 49 | kind-install: kind-load helm-install 50 | 51 | kind: kind-create kind-install 52 | 53 | follow-logs: 54 | kubectl logs -n sidecar-injector deployment/kubernetes-sidecar-injector --follow 55 | 56 | install-sample-container: 57 | helm upgrade -i inject-container ./sample/chart/echo-server/. --namespace=sample --create-namespace 58 | 59 | install-sample-init-container: 60 | helm upgrade -i inject-init-container ./sample/chart/nginx/. --namespace=sample --create-namespace -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![helm-release-gha](https://github.com/ExpediaGroup/kubernetes-sidecar-injector/actions/workflows/helm_release.yaml/badge.svg?branch=main) 2 | [![semantic-release: conventionalcommits](https://img.shields.io/badge/semantic--release-conventionalcommits-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) 3 | [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/ExpediaGroup/kubernetes-sidecar-injector/blob/main/LICENSE) 4 | 5 | Kubernetes Mutating Webhook 6 | =========== 7 | 8 | https://hub.docker.com/r/expediagroup/kubernetes-sidecar-injector 9 | 10 | This [mutating webhook](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) was developed to inject sidecars to a Kubernetes pod. 11 | 12 | ## Developing 13 | 14 | If one is interested in contributing to this codebase, please read the [developer documentation](DEVELOP.md) on how to build and test this codebase. 15 | 16 | ## Using this webhook 17 | 18 | We have provided two ways to deploy this webhook. Using [Helm](https://helm.sh/) and using [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/). Deployment files are in `deployment/helm` and `deployment/kubectl` respectively. 19 | 20 | ### ConfigMap Sidecar Configuration 21 | 22 | NOTE: Applications only have access to sidecars in their own namespaces. 23 | 24 | ``` 25 | apiVersion: v1 26 | kind: ConfigMap 27 | metadata: 28 | name: my-app-sidecar 29 | namespace: my-app-namespace 30 | data: 31 | sidecars.yaml: | 32 | - name: # Sidcar Name 33 | initContainers: 34 | - name: # Example 1 35 | image: # Example 1 36 | containers: 37 | - name: # Example 2 38 | image: # Example 2 39 | volumes: 40 | - name: # Example 3 41 | configMap: 42 | name: # Example 3 43 | imagePullSecrets: 44 | - name: # Example 4 45 | ``` 46 | 47 | 48 | ### How to enable sidecar injection using this webhook 49 | 50 | 1. Deploy this mutating webhook by cloning this repository and running the following command (needs kubectl installed and configured to point to the kubernetes cluster or minikube) 51 | 52 | ```bash 53 | make helm-install 54 | ``` 55 | 56 | 2. By default, all namespaces are watched except `kube-system` and `kube-public`. This can be configured in your [helm values](charts/kubernetes-sidecar-injector/values.yaml#L13-L19). 57 | 58 | 3. Add the annotation ([`sidecar-injector.expedia.com/inject`](charts/kubernetes-sidecar-injector/values.yaml#L9-L10) by default) with ConfigMap sidecar name to inject in pod spec where sidecar needs to be injected. [This sample spec](sample/chart/echo-server/templates/deployment.yaml#L16) shows such an annotation added to a pod spec to inject `haystack-agent`. 59 | 60 | 4. Create your ConfigMap sidecar configuration 61 | 62 | ``` 63 | apiVersion: v1 64 | kind: ConfigMap 65 | metadata: 66 | name: my-app-sidecar 67 | namespace: {{ .Release.Namespace }} 68 | data: 69 | sidecars.yaml: | 70 | - name: busybox 71 | initContainers: 72 | - name: busybox 73 | image: busybox 74 | command: [ "/bin/sh" ] 75 | args: [ "-c", "echo '

Hi!

' >> /work-dir/index.html" ] 76 | volumeMounts: 77 | - name: workdir 78 | mountPath: "/work-dir" 79 | ``` 80 | ## How to use the kubernetes-sidecar-injector Helm repository 81 | 82 | You need to add this repository to your Helm repositories: 83 | 84 | ``` 85 | helm repo add kubernetes-sidecar-injector https://opensource.expediagroup.com/kubernetes-sidecar-injector/ 86 | helm repo update 87 | ``` 88 | 89 | ### Kind Testing 90 | ```shell 91 | make kind 92 | make install-sample-init-container # or make install-sample-container 93 | make follow-logs 94 | ``` -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: kubernetes-sidecar-injector 2 | home: https://github.com/ExpediaGroup/kubernetes-sidecar-injector 3 | version: 1.3.0 4 | apiVersion: v2 5 | appVersion: "1.5.0" 6 | keywords: 7 | - kubernetes 8 | - sidecar-injection 9 | sources: 10 | - https://github.com/ExpediaGroup/kubernetes-sidecar-injector 11 | -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/templates/_vars.tpl: -------------------------------------------------------------------------------- 1 | {{- define "common.labels" }} 2 | app.kubernetes.io/name: {{ .Release.Name }} 3 | app.kubernetes.io/component: webhook 4 | app.kubernetes.io/instance: {{ .Release.Name }} 5 | {{- end }} 6 | 7 | {{- define "certs.secret.name" }} 8 | {{- .Release.Name }} 9 | {{- end }} 10 | 11 | {{- define "service.name" }} 12 | {{- .Release.Name }} 13 | {{- end }} 14 | 15 | {{- define "serviceaccount.name" }} 16 | {{- .Release.Name }} 17 | {{- end }} 18 | 19 | {{- define "clusterrole.name" }} 20 | {{- .Release.Name }} 21 | {{- end }} 22 | 23 | {{- define "clusterrolebinding.name" }} 24 | {{- .Release.Name }} 25 | {{- end }} -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/templates/mutatingwebhook.yaml: -------------------------------------------------------------------------------- 1 | {{- $caPrefix := printf "%s-ca" .Release.Name }} 2 | {{- $ca := genCA $caPrefix 3650 }} 3 | {{- $cn := .Release.Name }} 4 | {{- $altName1 := printf "%s.%s.svc" (include "service.name" .) .Release.Namespace }} 5 | {{- $cert := genSignedCert $cn nil (list $altName1) 3650 $ca }} 6 | --- 7 | apiVersion: v1 8 | kind: Secret 9 | metadata: 10 | name: {{ include "certs.secret.name" . }} 11 | namespace: {{ .Release.Namespace }} 12 | labels: 13 | {{- include "common.labels" . | indent 4 }} 14 | data: 15 | cert.pem: {{ b64enc $cert.Cert }} 16 | key.pem: {{ b64enc $cert.Key }} 17 | --- 18 | apiVersion: admissionregistration.k8s.io/v1 19 | kind: MutatingWebhookConfiguration 20 | metadata: 21 | name: {{ .Release.Name }} 22 | labels: 23 | {{- include "common.labels" . | indent 4 }} 24 | webhooks: 25 | - name: kubernetes-sidecar-injector.expedia.com 26 | clientConfig: 27 | service: 28 | name: {{ .Release.Name }} 29 | namespace: {{ .Release.Namespace }} 30 | path: "/mutate" 31 | caBundle: {{ b64enc $ca.Cert }} 32 | failurePolicy: Fail 33 | sideEffects: None 34 | admissionReviewVersions: 35 | - v1 36 | rules: 37 | - apiGroups: 38 | - "" 39 | resources: 40 | - pods 41 | apiVersions: 42 | - "*" 43 | operations: 44 | - CREATE 45 | scope: Namespaced 46 | namespaceSelector: 47 | matchExpressions: 48 | {{- with .Values.selectors.namespaceSelector.matchExpressions }} 49 | {{- toYaml . | nindent 8 }} 50 | {{- end }} 51 | - key: {{ .Values.selectors.injectPrefix }}/{{ .Values.selectors.disableInjectLabel }} 52 | operator: NotIn 53 | values: 54 | - "true" 55 | - key: kubernetes.io/metadata.name 56 | operator: NotIn 57 | values: 58 | - {{ .Release.Namespace }} 59 | objectSelector: 60 | {{- with .Values.selectors.objectSelector.matchLabels }} 61 | matchLabels: 62 | {{- toYaml . | nindent 8 }} 63 | {{- end }} 64 | matchExpressions: 65 | - key: {{ .Values.selectors.injectPrefix }}/{{ .Values.selectors.injectName }} 66 | operator: NotIn 67 | values: 68 | - skip 69 | - key: {{ .Values.selectors.injectPrefix }}/{{ .Values.selectors.disableInjectLabel }} 70 | operator: NotIn 71 | values: 72 | - "true" 73 | --- 74 | apiVersion: apps/v1 75 | kind: Deployment 76 | metadata: 77 | name: {{ .Release.Name }} 78 | namespace: {{ .Release.Namespace }} 79 | labels: 80 | {{- include "common.labels" . | indent 4 }} 81 | spec: 82 | replicas: {{ .Values.replicaCount }} 83 | selector: 84 | matchLabels: 85 | {{- include "common.labels" . | indent 6 }} 86 | template: 87 | metadata: 88 | annotations: 89 | generated-cert: {{ sha256sum $cert.Cert }} 90 | {{- with .Values.podAnnotations }} 91 | {{- toYaml . | nindent 8 }} 92 | {{- end }} 93 | labels: 94 | {{- include "common.labels" . | indent 8 }} 95 | {{- with .Values.podLabels }} 96 | {{- toYaml . | nindent 8 }} 97 | {{- end }} 98 | spec: 99 | serviceAccountName: {{ include "serviceaccount.name" . }} 100 | containers: 101 | - name: kubernetes-sidecar-injector 102 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 103 | imagePullPolicy: {{ .Values.image.pullPolicy }} 104 | args: 105 | - --port={{ .Values.container.port }} 106 | - --metricsPort={{ .Values.container.metricsPort }} 107 | - --certFile=/opt/kubernetes-sidecar-injector/certs/cert.pem 108 | - --keyFile=/opt/kubernetes-sidecar-injector/certs/key.pem 109 | - --injectPrefix={{ trimSuffix "/" .Values.selectors.injectPrefix }} 110 | - --injectName={{ .Values.selectors.injectName }} 111 | - --sidecarDataKey={{ .Values.sidecars.dataKey }} 112 | volumeMounts: 113 | - name: {{ .Release.Name }}-certs 114 | mountPath: /opt/kubernetes-sidecar-injector/certs 115 | readOnly: true 116 | ports: 117 | - name: https 118 | containerPort: {{ .Values.container.port }} 119 | protocol: TCP 120 | {{- if ne .Values.container.port .Values.container.metricsPort }} 121 | - name: metrics 122 | containerPort: {{ .Values.container.metricsPort }} 123 | protocol: TCP 124 | {{- end }} 125 | livenessProbe: 126 | httpGet: 127 | path: /healthz 128 | port: https 129 | scheme: HTTPS 130 | initialDelaySeconds: 5 131 | periodSeconds: 10 132 | successThreshold: 1 133 | failureThreshold: 5 134 | timeoutSeconds: 4 135 | readinessProbe: 136 | httpGet: 137 | path: /healthz 138 | port: https 139 | scheme: HTTPS 140 | initialDelaySeconds: 30 141 | periodSeconds: 10 142 | successThreshold: 1 143 | failureThreshold: 5 144 | timeoutSeconds: 4 145 | {{- with .Values.podSecurityContext }} 146 | securityContext: 147 | {{- toYaml . | nindent 8 }} 148 | {{- end }} 149 | imagePullSecrets: 150 | {{- toYaml .Values.image.pullSecrets | nindent 8 }} 151 | volumes: 152 | - name: {{ .Release.Name }}-certs 153 | secret: 154 | secretName: {{ include "certs.secret.name" . }} -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/templates/poddisruptionbudget.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.pdb.create }} 2 | apiVersion: policy/v1beta1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | name: {{ .Release.Name }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "common.labels" . | indent 4 }} 9 | spec: 10 | minAvailable: {{ .Values.pdb.minAvailable }} 11 | maxUnavailable: {{ .Values.pdb.maxUnavailable }} 12 | selector: 13 | matchLabels: 14 | {{- include "common.labels" . | indent 6 }} 15 | {{- end }} -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "serviceaccount.name" . }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "common.labels" . | indent 4 }} 9 | --- 10 | apiVersion: rbac.authorization.k8s.io/v1 11 | kind: ClusterRole 12 | metadata: 13 | name: {{ include "clusterrole.name" . }} 14 | labels: 15 | {{- include "common.labels" . | indent 4 }} 16 | rules: 17 | - apiGroups: 18 | - "" 19 | resources: 20 | - configmaps 21 | verbs: 22 | - get 23 | - list 24 | --- 25 | apiVersion: rbac.authorization.k8s.io/v1 26 | kind: ClusterRoleBinding 27 | metadata: 28 | name: {{ include "clusterrolebinding.name" . }} 29 | labels: 30 | {{- include "common.labels" . | indent 4 }} 31 | roleRef: 32 | apiGroup: rbac.authorization.k8s.io 33 | kind: ClusterRole 34 | name: {{ include "clusterrole.name" . }} 35 | subjects: 36 | - kind: ServiceAccount 37 | name: {{ include "serviceaccount.name" . }} 38 | namespace: {{ .Release.Namespace }} 39 | -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "service.name" . }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | {{- include "common.labels" . | indent 4 }} 8 | spec: 9 | ports: 10 | - name: https 11 | port: {{ .Values.service.port }} 12 | targetPort: https 13 | {{- if ne .Values.service.port .Values.service.metricsPort }} 14 | - name: metrics 15 | port: {{ .Values.service.metricsPort }} 16 | targetPort: metrics 17 | {{- end }} 18 | selector: 19 | {{- include "common.labels" . | indent 4 }} 20 | -------------------------------------------------------------------------------- /charts/kubernetes-sidecar-injector/values.yaml: -------------------------------------------------------------------------------- 1 | image: 2 | repository: expediagroup/kubernetes-sidecar-injector 3 | tag: latest 4 | pullPolicy: IfNotPresent 5 | pullSecrets: [] 6 | 7 | replicaCount: 1 8 | 9 | service: 10 | port: 443 11 | metricsPort: 9090 12 | 13 | container: 14 | port: 8443 15 | metricsPort: 9090 16 | 17 | podAnnotations: {} 18 | podLabels: {} 19 | podSecurityContext: {} 20 | 21 | pdb: 22 | create: false 23 | minAvailable: 1 24 | maxUnavailable: 1 25 | 26 | sidecars: 27 | dataKey: sidecars.yaml 28 | 29 | selectors: 30 | injectPrefix: sidecar-injector.expedia.com 31 | injectName: inject 32 | disableInjectLabel: disable-inject 33 | objectSelector: {} 34 | namespaceSelector: 35 | matchExpressions: 36 | - key: kubernetes.io/metadata.name 37 | operator: NotIn 38 | values: 39 | - kube-system 40 | - kube-public 41 | -------------------------------------------------------------------------------- /charts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kubernetes-sidecar-injector", 3 | "version": "1.3.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git+https://github.com/ExpediaGroup/kubernetes-sidecar-injector.git" 7 | }, 8 | "homepage": "https://github.com/ExpediaGroup/kubernetes-sidecar-injector#README.md" 9 | } 10 | -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/expediagroup/kubernetes-sidecar-injector/pkg/httpd" 7 | log "github.com/sirupsen/logrus" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | var ( 12 | httpdConf httpd.SimpleServer 13 | debug bool 14 | ) 15 | 16 | var rootCmd = &cobra.Command{ 17 | Use: "kubernetes-sidecar-injector", 18 | Short: "Responsible for injecting sidecars into pod containers", 19 | RunE: func(cmd *cobra.Command, args []string) error { 20 | if debug { 21 | log.SetLevel(log.DebugLevel) 22 | } 23 | log.Infof("SimpleServer starting to listen in port %v", httpdConf.Port) 24 | return httpdConf.Start() 25 | }, 26 | } 27 | 28 | // Execute Kicks off the application 29 | func Execute() { 30 | if err := rootCmd.Execute(); err != nil { 31 | log.Errorf("Failed to start server: %v", err) 32 | os.Exit(1) 33 | } 34 | } 35 | 36 | func init() { 37 | rootCmd.Flags().IntVar(&httpdConf.Port, "port", 443, "server port.") 38 | rootCmd.Flags().IntVar(&httpdConf.MetricsPort, "metricsPort", 9090, "metrics server port.") 39 | rootCmd.Flags().StringVar(&httpdConf.CertFile, "certFile", "/etc/mutator/certs/cert.pem", "File containing tls certificate") 40 | rootCmd.Flags().StringVar(&httpdConf.KeyFile, "keyFile", "/etc/mutator/certs/key.pem", "File containing tls private key") 41 | rootCmd.Flags().BoolVar(&httpdConf.Local, "local", false, "Local run mode") 42 | rootCmd.Flags().StringVar(&(&httpdConf.Patcher).InjectPrefix, "injectPrefix", "sidecar-injector.expedia.com", "Injector Prefix") 43 | rootCmd.Flags().StringVar(&(&httpdConf.Patcher).InjectName, "injectName", "inject", "Injector Name") 44 | rootCmd.Flags().StringVar(&(&httpdConf.Patcher).SidecarDataKey, "sidecarDataKey", "sidecars.yaml", "ConfigMap Sidecar Data Key") 45 | rootCmd.Flags().BoolVar(&debug, "debug", false, "enable debug logs") 46 | } 47 | -------------------------------------------------------------------------------- /docker-run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | make docker 3 | 4 | docker run -d --name injector -p 8443:443 --mount type=bind,src=${GOPATH}/src/github.com/expediagroup/kubernetes-sidecar-injector/sample,dst=/etc/mutator expediagroup/kubernetes-sidecar-injector:latest -logtostderr 5 | 6 | docker logs -f $(docker ps -f name=injector -q) 7 | 8 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/expediagroup/kubernetes-sidecar-injector 2 | 3 | // Make sure you change the Dockerfile 4 | go 1.21 5 | 6 | require ( 7 | github.com/ghodss/yaml v1.0.0 8 | github.com/pkg/errors v0.9.1 9 | github.com/prometheus/client_golang v1.19.1 10 | github.com/samber/lo v1.11.0 11 | github.com/sirupsen/logrus v1.8.1 12 | github.com/spf13/cobra v1.4.0 13 | github.com/stretchr/testify v1.7.0 14 | k8s.io/api v0.23.5 15 | k8s.io/apimachinery v0.23.5 16 | k8s.io/client-go v0.23.5 17 | ) 18 | 19 | require ( 20 | github.com/beorn7/perks v1.0.1 // indirect 21 | github.com/cespare/xxhash/v2 v2.2.0 // indirect 22 | github.com/davecgh/go-spew v1.1.1 // indirect 23 | github.com/evanphx/json-patch v4.12.0+incompatible // indirect 24 | github.com/go-logr/logr v1.2.0 // indirect 25 | github.com/gogo/protobuf v1.3.2 // indirect 26 | github.com/golang/protobuf v1.5.3 // indirect 27 | github.com/google/go-cmp v0.6.0 // indirect 28 | github.com/google/gofuzz v1.1.0 // indirect 29 | github.com/googleapis/gnostic v0.5.5 // indirect 30 | github.com/imdario/mergo v0.3.5 // indirect 31 | github.com/inconshreveable/mousetrap v1.0.0 // indirect 32 | github.com/json-iterator/go v1.1.12 // indirect 33 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 34 | github.com/modern-go/reflect2 v1.0.2 // indirect 35 | github.com/pmezard/go-difflib v1.0.0 // indirect 36 | github.com/prometheus/client_model v0.5.0 // indirect 37 | github.com/prometheus/common v0.48.0 // indirect 38 | github.com/prometheus/procfs v0.12.0 // indirect 39 | github.com/spf13/pflag v1.0.5 // indirect 40 | golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect 41 | golang.org/x/net v0.20.0 // indirect 42 | golang.org/x/oauth2 v0.16.0 // indirect 43 | golang.org/x/sys v0.17.0 // indirect 44 | golang.org/x/term v0.16.0 // indirect 45 | golang.org/x/text v0.14.0 // indirect 46 | golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect 47 | google.golang.org/appengine v1.6.7 // indirect 48 | google.golang.org/protobuf v1.33.0 // indirect 49 | gopkg.in/inf.v0 v0.9.1 // indirect 50 | gopkg.in/yaml.v2 v2.4.0 // indirect 51 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect 52 | k8s.io/klog/v2 v2.30.0 // indirect 53 | k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect 54 | k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect 55 | sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect 56 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect 57 | sigs.k8s.io/yaml v1.2.0 // indirect 58 | ) 59 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 9 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 10 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 11 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 12 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 13 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 14 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 15 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 16 | cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= 17 | cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= 18 | cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= 19 | cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 20 | cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= 21 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 22 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 23 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 24 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 25 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 26 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 27 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 28 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 29 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 30 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 31 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 32 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 33 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 34 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 35 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 36 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 37 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 38 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 39 | github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= 40 | github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= 41 | github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= 42 | github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= 43 | github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= 44 | github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= 45 | github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= 46 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 47 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 48 | github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= 49 | github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= 50 | github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= 51 | github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= 52 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 53 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 54 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 55 | github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= 56 | github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 57 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 58 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 59 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 60 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 61 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 62 | github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 63 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 64 | github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 65 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 66 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 67 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 68 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 69 | github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= 70 | github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= 71 | github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 72 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 73 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 74 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 75 | github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 76 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 77 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 78 | github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= 79 | github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 80 | github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= 81 | github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= 82 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 83 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 84 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 85 | github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= 86 | github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= 87 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 88 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 89 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 90 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 91 | github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= 92 | github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= 93 | github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= 94 | github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 95 | github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= 96 | github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= 97 | github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= 98 | github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 99 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 100 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 101 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 102 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 103 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 104 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 105 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 106 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 107 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 108 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 109 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 110 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 111 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 112 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 113 | github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= 114 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 115 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 116 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 117 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 118 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 119 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 120 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 121 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 122 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 123 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 124 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 125 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 126 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 127 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 128 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 129 | github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 130 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 131 | github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= 132 | github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 133 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 134 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 135 | github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= 136 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 137 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 138 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 139 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 140 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 141 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 142 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 143 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 144 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 145 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 146 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 147 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 148 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 149 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 150 | github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= 151 | github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 152 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 153 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 154 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 155 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 156 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 157 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 158 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 159 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 160 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 161 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 162 | github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 163 | github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 164 | github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 165 | github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 166 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 167 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 168 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 169 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 170 | github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= 171 | github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= 172 | github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= 173 | github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 174 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 175 | github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 176 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 177 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 178 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 179 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 180 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 181 | github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= 182 | github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= 183 | github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= 184 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 185 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 186 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 187 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 188 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 189 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 190 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 191 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 192 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 193 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 194 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 195 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 196 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 197 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 198 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 199 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 200 | github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 201 | github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 202 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 203 | github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= 204 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 205 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 206 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 207 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 208 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 209 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 210 | github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 211 | github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= 212 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 213 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 214 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 215 | github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 216 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 217 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 218 | github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= 219 | github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 220 | github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 221 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 222 | github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= 223 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 224 | github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 225 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 226 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 227 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 228 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 229 | github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= 230 | github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= 231 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 232 | github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= 233 | github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= 234 | github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= 235 | github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= 236 | github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= 237 | github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= 238 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 239 | github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= 240 | github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 241 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 242 | github.com/samber/lo v1.11.0 h1:JfeYozXL1xfkhRUFOfH13ociyeiLSC/GRJjGKI668xM= 243 | github.com/samber/lo v1.11.0/go.mod h1:2I7tgIv8Q1SG2xEIkRq0F2i2zgxVpnyPOP0d3Gj2r+A= 244 | github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= 245 | github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 246 | github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= 247 | github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= 248 | github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= 249 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 250 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 251 | github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= 252 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 253 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 254 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 255 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 256 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 257 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 258 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 259 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 260 | github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= 261 | github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= 262 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 263 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 264 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 265 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 266 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 267 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 268 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 269 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 270 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 271 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 272 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 273 | go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 274 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 275 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 276 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 277 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 278 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 279 | golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 280 | golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 281 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 282 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 283 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 284 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 285 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 286 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 287 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 288 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 289 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 290 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 291 | golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= 292 | golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= 293 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 294 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 295 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 296 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 297 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 298 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 299 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 300 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 301 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 302 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 303 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 304 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 305 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 306 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 307 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 308 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 309 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 310 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 311 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 312 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 313 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 314 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 315 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 316 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 317 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 318 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 319 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 320 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 321 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 322 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 323 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 324 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 325 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 326 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 327 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 328 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 329 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 330 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 331 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 332 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 333 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 334 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 335 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 336 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 337 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 338 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 339 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 340 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 341 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 342 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 343 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 344 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 345 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 346 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 347 | golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 348 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 349 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 350 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 351 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 352 | golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= 353 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 354 | golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 355 | golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= 356 | golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= 357 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 358 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 359 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 360 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 361 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 362 | golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 363 | golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 364 | golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 365 | golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 366 | golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 367 | golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 368 | golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 369 | golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= 370 | golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 371 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 372 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 373 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 374 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 375 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 376 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 377 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 378 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 379 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 380 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 381 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 382 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 383 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 384 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 385 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 386 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 387 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 388 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 389 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 390 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 391 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 392 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 393 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 394 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 395 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 396 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 397 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 398 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 399 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 400 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 401 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 402 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 403 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 404 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 405 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 406 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 407 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 408 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 409 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 410 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 411 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 412 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 413 | golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 414 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 415 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 416 | golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 417 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 418 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 419 | golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 420 | golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 421 | golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 422 | golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 423 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 424 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 425 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 426 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 427 | golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 428 | golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= 429 | golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 430 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 431 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 432 | golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= 433 | golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= 434 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 435 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 436 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 437 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 438 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 439 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 440 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 441 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 442 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 443 | golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= 444 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 445 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 446 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 447 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 448 | golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= 449 | golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 450 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 451 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 452 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 453 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 454 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 455 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 456 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 457 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 458 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 459 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 460 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 461 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 462 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 463 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 464 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 465 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 466 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 467 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 468 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 469 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 470 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 471 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 472 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 473 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 474 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 475 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 476 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 477 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 478 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 479 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 480 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 481 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 482 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 483 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 484 | golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 485 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 486 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 487 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 488 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 489 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 490 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 491 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 492 | golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= 493 | golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 494 | golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 495 | golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 496 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 497 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 498 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 499 | golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 500 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 501 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 502 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 503 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 504 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 505 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 506 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 507 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 508 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 509 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 510 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 511 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 512 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 513 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 514 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 515 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 516 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 517 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 518 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 519 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 520 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 521 | google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 522 | google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 523 | google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 524 | google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= 525 | google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= 526 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 527 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 528 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 529 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 530 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 531 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 532 | google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= 533 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 534 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 535 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 536 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 537 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 538 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 539 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 540 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 541 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 542 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 543 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 544 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 545 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 546 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 547 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 548 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 549 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 550 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 551 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 552 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 553 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 554 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 555 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 556 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 557 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 558 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 559 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 560 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 561 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 562 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 563 | google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 564 | google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 565 | google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 566 | google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 567 | google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 568 | google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 569 | google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 570 | google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 571 | google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 572 | google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 573 | google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= 574 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 575 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 576 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 577 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 578 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 579 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 580 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 581 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 582 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 583 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 584 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 585 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 586 | google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 587 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= 588 | google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= 589 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 590 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 591 | google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 592 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 593 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 594 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 595 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 596 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 597 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 598 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 599 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 600 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 601 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 602 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 603 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 604 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 605 | google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= 606 | google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 607 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 608 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 609 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 610 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 611 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 612 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 613 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 614 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 615 | gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= 616 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 617 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 618 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 619 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 620 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 621 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 622 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 623 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 624 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 625 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 626 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 627 | gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 628 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= 629 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 630 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 631 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 632 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 633 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 634 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 635 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 636 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 637 | k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= 638 | k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= 639 | k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= 640 | k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= 641 | k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= 642 | k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= 643 | k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= 644 | k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= 645 | k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= 646 | k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= 647 | k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= 648 | k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= 649 | k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= 650 | k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 651 | k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= 652 | k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 653 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 654 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 655 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 656 | sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= 657 | sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= 658 | sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= 659 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= 660 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= 661 | sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= 662 | sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= 663 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/expediagroup/kubernetes-sidecar-injector/cmd" 4 | 5 | func main() { 6 | cmd.Execute() 7 | } 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kubernetes-sidecar-injector", 3 | "version": "1.5.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git+https://github.com/ExpediaGroup/kubernetes-sidecar-injector.git" 7 | }, 8 | "homepage": "https://github.com/ExpediaGroup/kubernetes-sidecar-injector#README.md" 9 | } 10 | -------------------------------------------------------------------------------- /pkg/admission/admission.go: -------------------------------------------------------------------------------- 1 | package admission 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "errors" 7 | "fmt" 8 | log "github.com/sirupsen/logrus" 9 | "io" 10 | admissionv1 "k8s.io/api/admission/v1" 11 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 12 | "net/http" 13 | ) 14 | 15 | // PatchOperation JsonPatch struct http://jsonpatch.com/ 16 | type PatchOperation struct { 17 | Op string `json:"op"` 18 | Path string `json:"path"` 19 | Value interface{} `json:"value,omitempty"` 20 | } 21 | 22 | // RequestHandler AdmissionRequest handler 23 | type RequestHandler interface { 24 | handleAdmissionCreate(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) 25 | handleAdmissionUpdate(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) 26 | handleAdmissionDelete(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) 27 | } 28 | 29 | // Handler Generic handler for Admission 30 | type Handler struct { 31 | Handler RequestHandler 32 | } 33 | 34 | // HandleAdmission HttpServer function to handle Admissions 35 | func (handler *Handler) HandleAdmission(writer http.ResponseWriter, request *http.Request) { 36 | if err := validateRequest(request); err != nil { 37 | log.Error(err.Error()) 38 | handler.writeErrorAdmissionReview(http.StatusBadRequest, err.Error(), writer) 39 | return 40 | } 41 | 42 | body, err := readRequestBody(request) 43 | if err != nil { 44 | log.Error(err.Error()) 45 | handler.writeErrorAdmissionReview(http.StatusInternalServerError, err.Error(), writer) 46 | return 47 | } 48 | 49 | admReview := admissionv1.AdmissionReview{} 50 | 51 | err = json.Unmarshal(body, &admReview) 52 | if err != nil { 53 | message := fmt.Sprintf("Could not decode body: %v", err) 54 | log.Error(message) 55 | handler.writeErrorAdmissionReview(http.StatusInternalServerError, message, writer) 56 | return 57 | } 58 | 59 | ctx := context.Background() 60 | 61 | req := admReview.Request 62 | log.Infof("AdmissionReview for Kind=%v, Namespace=%v Name=%v UID=%v patchOperation=%v UserInfo=%v", req.Kind, req.Namespace, req.Name, req.UID, req.Operation, req.UserInfo) 63 | if patchOperations, err := handler.Process(ctx, req); err != nil { 64 | message := fmt.Sprintf("request for object '%s' with name '%s' in namespace '%s' denied: %v", req.Kind.String(), req.Name, req.Namespace, err) 65 | log.Error(message) 66 | handler.writeDeniedAdmissionResponse(&admReview, message, writer) 67 | } else if patchBytes, err := json.Marshal(patchOperations); err != nil { 68 | message := fmt.Sprintf("request for object '%s' with name '%s' in namespace '%s' denied: %v", req.Kind.String(), req.Name, req.Namespace, err) 69 | log.Error(message) 70 | handler.writeDeniedAdmissionResponse(&admReview, message, writer) 71 | } else { 72 | handler.writeAllowedAdmissionReview(&admReview, patchBytes, writer) 73 | } 74 | } 75 | 76 | // Process Handles the AdmissionRequest via the handler 77 | func (handler *Handler) Process(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) { 78 | switch request.Operation { 79 | case admissionv1.Create: 80 | return handler.Handler.handleAdmissionCreate(ctx, request) 81 | case admissionv1.Update: 82 | return handler.Handler.handleAdmissionUpdate(ctx, request) 83 | case admissionv1.Delete: 84 | return handler.Handler.handleAdmissionDelete(ctx, request) 85 | default: 86 | return nil, fmt.Errorf("unhandled request operations type %s", request.Operation) 87 | } 88 | } 89 | 90 | func validateRequest(req *http.Request) error { 91 | if req.Method != http.MethodPost { 92 | return fmt.Errorf("wrong http verb. got %s", req.Method) 93 | } 94 | if req.Body == nil { 95 | return errors.New("empty body") 96 | } 97 | contentType := req.Header.Get("Content-Type") 98 | if contentType != "application/json" { 99 | return fmt.Errorf("wrong content type. expected 'application/json', got: '%s'", contentType) 100 | } 101 | return nil 102 | } 103 | 104 | func readRequestBody(req *http.Request) ([]byte, error) { 105 | body, err := io.ReadAll(req.Body) 106 | if err != nil { 107 | return nil, fmt.Errorf("unable to read Request Body: %v", err) 108 | } 109 | return body, nil 110 | } 111 | 112 | func (handler *Handler) writeAllowedAdmissionReview(ar *admissionv1.AdmissionReview, patch []byte, res http.ResponseWriter) { 113 | ar.Response = handler.admissionResponse(http.StatusOK, "") 114 | ar.Response.Allowed = true 115 | ar.Response.UID = ar.Request.UID 116 | if patch != nil { 117 | pt := admissionv1.PatchTypeJSONPatch 118 | ar.Response.Patch = patch 119 | ar.Response.PatchType = &pt 120 | } 121 | handler.write(ar, res) 122 | } 123 | 124 | func (handler *Handler) writeDeniedAdmissionResponse(ar *admissionv1.AdmissionReview, message string, res http.ResponseWriter) { 125 | ar.Response = handler.admissionResponse(http.StatusForbidden, message) 126 | ar.Response.UID = ar.Request.UID 127 | handler.write(ar, res) 128 | } 129 | 130 | func (handler *Handler) writeErrorAdmissionReview(status int, message string, res http.ResponseWriter) { 131 | admResp := handler.errorAdmissionReview(status, message) 132 | handler.write(admResp, res) 133 | } 134 | 135 | func (handler *Handler) errorAdmissionReview(httpErrorCode int, message string) *admissionv1.AdmissionReview { 136 | r := baseAdmissionReview() 137 | r.Response = handler.admissionResponse(httpErrorCode, message) 138 | return r 139 | } 140 | 141 | func (handler *Handler) admissionResponse(httpErrorCode int, message string) *admissionv1.AdmissionResponse { 142 | return &admissionv1.AdmissionResponse{ 143 | Result: &metav1.Status{ 144 | Code: int32(httpErrorCode), 145 | Message: message, 146 | }, 147 | } 148 | } 149 | 150 | func baseAdmissionReview() *admissionv1.AdmissionReview { 151 | gvk := admissionv1.SchemeGroupVersion.WithKind("AdmissionReview") 152 | return &admissionv1.AdmissionReview{ 153 | TypeMeta: metav1.TypeMeta{ 154 | Kind: gvk.Kind, 155 | APIVersion: gvk.GroupVersion().String(), 156 | }, 157 | } 158 | } 159 | 160 | func (handler *Handler) write(r *admissionv1.AdmissionReview, res http.ResponseWriter) { 161 | resp, err := json.Marshal(r) 162 | if err != nil { 163 | log.Errorf("Error marshalling decision: %v", err) 164 | res.WriteHeader(http.StatusInternalServerError) 165 | return 166 | } 167 | _, err = res.Write(resp) 168 | if err != nil { 169 | log.Errorf("Error writing response: %v", err) 170 | res.WriteHeader(http.StatusInternalServerError) 171 | return 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /pkg/admission/podpatcher.go: -------------------------------------------------------------------------------- 1 | package admission 2 | 3 | import ( 4 | "context" 5 | corev1 "k8s.io/api/core/v1" 6 | ) 7 | 8 | // PodPatcher Pod patching interface 9 | type PodPatcher interface { 10 | PatchPodCreate(ctx context.Context, namespace string, pod corev1.Pod) ([]PatchOperation, error) 11 | PatchPodUpdate(ctx context.Context, namespace string, oldPod corev1.Pod, newPod corev1.Pod) ([]PatchOperation, error) 12 | PatchPodDelete(ctx context.Context, namespace string, pod corev1.Pod) ([]PatchOperation, error) 13 | } 14 | -------------------------------------------------------------------------------- /pkg/admission/podrequesthandler.go: -------------------------------------------------------------------------------- 1 | package admission 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "github.com/pkg/errors" 7 | admissionv1 "k8s.io/api/admission/v1" 8 | corev1 "k8s.io/api/core/v1" 9 | ) 10 | 11 | // PodAdmissionRequestHandler PodAdmissionRequest handler 12 | type PodAdmissionRequestHandler struct { 13 | PodHandler PodPatcher 14 | } 15 | 16 | func (handler *PodAdmissionRequestHandler) handleAdmissionCreate(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) { 17 | pod, err := unmarshalPod(request.Object.Raw) 18 | if err != nil { 19 | return nil, err 20 | } 21 | return handler.PodHandler.PatchPodCreate(ctx, request.Namespace, pod) 22 | } 23 | 24 | func (handler *PodAdmissionRequestHandler) handleAdmissionUpdate(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) { 25 | oldPod, err := unmarshalPod(request.OldObject.Raw) 26 | if err != nil { 27 | return nil, err 28 | } 29 | newPod, err := unmarshalPod(request.Object.Raw) 30 | if err != nil { 31 | return nil, err 32 | } 33 | return handler.PodHandler.PatchPodUpdate(ctx, request.Namespace, oldPod, newPod) 34 | } 35 | 36 | func (handler *PodAdmissionRequestHandler) handleAdmissionDelete(ctx context.Context, request *admissionv1.AdmissionRequest) ([]PatchOperation, error) { 37 | pod, err := unmarshalPod(request.OldObject.Raw) 38 | if err != nil { 39 | return nil, err 40 | } 41 | return handler.PodHandler.PatchPodDelete(ctx, request.Namespace, pod) 42 | } 43 | 44 | func unmarshalPod(rawObject []byte) (corev1.Pod, error) { 45 | var pod corev1.Pod 46 | err := json.Unmarshal(rawObject, &pod) 47 | return pod, errors.Wrapf(err, "error unmarshalling object") 48 | } 49 | -------------------------------------------------------------------------------- /pkg/httpd/simpleserver.go: -------------------------------------------------------------------------------- 1 | package httpd 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os" 7 | "path/filepath" 8 | 9 | "github.com/expediagroup/kubernetes-sidecar-injector/pkg/admission" 10 | "github.com/expediagroup/kubernetes-sidecar-injector/pkg/webhook" 11 | "github.com/pkg/errors" 12 | "github.com/prometheus/client_golang/prometheus/promhttp" 13 | log "github.com/sirupsen/logrus" 14 | "k8s.io/client-go/kubernetes" 15 | "k8s.io/client-go/rest" 16 | "k8s.io/client-go/tools/clientcmd" 17 | ) 18 | 19 | /*SimpleServer is the required config to create httpd server*/ 20 | type SimpleServer struct { 21 | Local bool 22 | Port int 23 | MetricsPort int 24 | CertFile string 25 | KeyFile string 26 | Patcher webhook.SidecarInjectorPatcher 27 | Debug bool 28 | } 29 | 30 | /*Start the simple http server supporting TLS*/ 31 | func (simpleServer *SimpleServer) Start() error { 32 | k8sClient, err := simpleServer.CreateClient() 33 | if err != nil { 34 | return err 35 | } 36 | 37 | simpleServer.Patcher.K8sClient = k8sClient 38 | server := &http.Server{ 39 | Addr: fmt.Sprintf(":%d", simpleServer.Port), 40 | } 41 | 42 | mux := http.NewServeMux() 43 | server.Handler = mux 44 | 45 | admissionHandler := &admission.Handler{ 46 | Handler: &admission.PodAdmissionRequestHandler{ 47 | PodHandler: &simpleServer.Patcher, 48 | }, 49 | } 50 | mux.HandleFunc("/healthz", webhook.HealthCheckHandler) 51 | mux.HandleFunc("/mutate", admissionHandler.HandleAdmission) 52 | 53 | metricsHandler := promhttp.Handler() 54 | if simpleServer.MetricsPort != simpleServer.Port { 55 | go simpleServer.startMetricsServer(metricsHandler) 56 | } else { 57 | mux.Handle("/metrics", metricsHandler) 58 | } 59 | 60 | if simpleServer.Local { 61 | return server.ListenAndServe() 62 | } 63 | return server.ListenAndServeTLS(simpleServer.CertFile, simpleServer.KeyFile) 64 | } 65 | 66 | func (simpleServer *SimpleServer) startMetricsServer(metricsHandler http.Handler) { 67 | log.Printf("Starting metrics server on port %d\n", simpleServer.MetricsPort) 68 | metricsRouter := http.NewServeMux() 69 | metricsRouter.Handle("/metrics", metricsHandler) 70 | 71 | metricsServer := &http.Server{ 72 | Addr: fmt.Sprintf(":%d", simpleServer.MetricsPort), 73 | Handler: metricsRouter, 74 | } 75 | 76 | if err := metricsServer.ListenAndServe(); err != nil { 77 | log.Fatal("Failed to start metrics server:", err) 78 | } 79 | } 80 | 81 | // CreateClient Create the server 82 | func (simpleServer *SimpleServer) CreateClient() (*kubernetes.Clientset, error) { 83 | config, err := simpleServer.buildConfig() 84 | 85 | if err != nil { 86 | return nil, errors.Wrapf(err, "error setting up cluster config") 87 | } 88 | 89 | return kubernetes.NewForConfig(config) 90 | } 91 | 92 | func (simpleServer *SimpleServer) buildConfig() (*rest.Config, error) { 93 | if simpleServer.Local { 94 | log.Debug("Using local kubeconfig.") 95 | kubeconfig := filepath.Join(os.Getenv("HOME"), ".kube", "config") 96 | return clientcmd.BuildConfigFromFlags("", kubeconfig) 97 | } 98 | log.Debug("Using in cluster kubeconfig.") 99 | return rest.InClusterConfig() 100 | } 101 | -------------------------------------------------------------------------------- /pkg/webhook/health.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import "net/http" 4 | 5 | // HealthCheckHandler HttpServer function to handle Health check 6 | func HealthCheckHandler(writer http.ResponseWriter, _ *http.Request) { 7 | writer.WriteHeader(http.StatusOK) 8 | } 9 | -------------------------------------------------------------------------------- /pkg/webhook/sidecarhandler.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "context" 5 | "strings" 6 | 7 | "github.com/expediagroup/kubernetes-sidecar-injector/pkg/admission" 8 | "github.com/ghodss/yaml" 9 | "github.com/samber/lo" 10 | log "github.com/sirupsen/logrus" 11 | corev1 "k8s.io/api/core/v1" 12 | k8serrors "k8s.io/apimachinery/pkg/api/errors" 13 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 14 | "k8s.io/client-go/kubernetes" 15 | ) 16 | 17 | // Sidecar Kubernetes Sidecar Injector schema 18 | type Sidecar struct { 19 | Name string `yaml:"name"` 20 | InitContainers []corev1.Container `yaml:"initContainers"` 21 | Containers []corev1.Container `yaml:"containers"` 22 | Volumes []corev1.Volume `yaml:"volumes"` 23 | ImagePullSecrets []corev1.LocalObjectReference `yaml:"imagePullSecrets"` 24 | Annotations map[string]string `yaml:"annotations"` 25 | Labels map[string]string `yaml:"labels"` 26 | } 27 | 28 | // SidecarInjectorPatcher Sidecar Injector patcher 29 | type SidecarInjectorPatcher struct { 30 | K8sClient kubernetes.Interface 31 | InjectPrefix string 32 | InjectName string 33 | SidecarDataKey string 34 | AllowAnnotationOverrides bool 35 | AllowLabelOverrides bool 36 | } 37 | 38 | func (patcher *SidecarInjectorPatcher) sideCarInjectionAnnotation() string { 39 | return patcher.InjectPrefix + "/" + patcher.InjectName 40 | } 41 | 42 | func (patcher *SidecarInjectorPatcher) configmapSidecarNames(namespace string, pod corev1.Pod) []string { 43 | podName := pod.GetName() 44 | if podName == "" { 45 | podName = pod.GetGenerateName() 46 | } 47 | annotations := map[string]string{} 48 | if pod.GetAnnotations() != nil { 49 | annotations = pod.GetAnnotations() 50 | } 51 | if sidecars, ok := annotations[patcher.sideCarInjectionAnnotation()]; ok { 52 | parts := lo.Map[string, string](strings.Split(sidecars, ","), func(part string, _ int) string { 53 | return strings.TrimSpace(part) 54 | }) 55 | 56 | if len(parts) > 0 { 57 | log.Infof("sideCar injection for %v/%v: sidecars: %v", namespace, podName, sidecars) 58 | return parts 59 | } 60 | } 61 | log.Infof("Skipping mutation for [%v]. No action required", pod.GetName()) 62 | return nil 63 | } 64 | 65 | func createArrayPatches[T any](newCollection []T, existingCollection []T, path string) []admission.PatchOperation { 66 | var patches []admission.PatchOperation 67 | for index, item := range newCollection { 68 | indexPath := path 69 | var value interface{} 70 | first := index == 0 && len(existingCollection) == 0 71 | if !first { 72 | indexPath = indexPath + "/-" 73 | value = item 74 | } else { 75 | value = []T{item} 76 | } 77 | patches = append(patches, admission.PatchOperation{ 78 | Op: "add", 79 | Path: indexPath, 80 | Value: value, 81 | }) 82 | } 83 | return patches 84 | } 85 | 86 | func createObjectPatches(newMap map[string]string, existingMap map[string]string, path string, override bool) []admission.PatchOperation { 87 | var patches []admission.PatchOperation 88 | if existingMap == nil { 89 | patches = append(patches, admission.PatchOperation{ 90 | Op: "add", 91 | Path: path, 92 | Value: newMap, 93 | }) 94 | } else { 95 | for key, value := range newMap { 96 | if _, ok := existingMap[key]; !ok || (ok && override) { 97 | key = escapeJSONPath(key) 98 | op := "add" 99 | if ok { 100 | op = "replace" 101 | } 102 | patches = append(patches, admission.PatchOperation{ 103 | Op: op, 104 | Path: path + "/" + key, 105 | Value: value, 106 | }) 107 | } 108 | } 109 | } 110 | return patches 111 | } 112 | 113 | // Escape keys that may contain `/`s or `~`s to have a valid patch 114 | // Order matters here, otherwise `/` --> ~01, instead of ~1 115 | func escapeJSONPath(k string) string { 116 | k = strings.ReplaceAll(k, "~", "~0") 117 | return strings.ReplaceAll(k, "/", "~1") 118 | } 119 | 120 | // PatchPodCreate Handle Pod Create Patch 121 | func (patcher *SidecarInjectorPatcher) PatchPodCreate(ctx context.Context, namespace string, pod corev1.Pod) ([]admission.PatchOperation, error) { 122 | podName := pod.GetName() 123 | if podName == "" { 124 | podName = pod.GetGenerateName() 125 | } 126 | var patches []admission.PatchOperation 127 | if configmapSidecarNames := patcher.configmapSidecarNames(namespace, pod); configmapSidecarNames != nil { 128 | for _, configmapSidecarName := range configmapSidecarNames { 129 | configmapSidecar, err := patcher.K8sClient.CoreV1().ConfigMaps(namespace).Get(ctx, configmapSidecarName, metav1.GetOptions{}) 130 | if k8serrors.IsNotFound(err) { 131 | log.Warnf("sidecar configmap %s/%s was not found", namespace, configmapSidecarName) 132 | } else if err != nil { 133 | log.Errorf("error fetching sidecar configmap %s/%s - %v", namespace, configmapSidecarName, err) 134 | } else if sidecarsStr, ok := configmapSidecar.Data[patcher.SidecarDataKey]; ok { 135 | var sidecars []Sidecar 136 | if err := yaml.Unmarshal([]byte(sidecarsStr), &sidecars); err != nil { 137 | log.Errorf("error unmarshalling %s from configmap %s/%s", patcher.SidecarDataKey, pod.GetNamespace(), configmapSidecarName) 138 | } 139 | if sidecars != nil { 140 | for _, sidecar := range sidecars { 141 | patches = append(patches, createArrayPatches(sidecar.InitContainers, pod.Spec.InitContainers, "/spec/initContainers")...) 142 | patches = append(patches, createArrayPatches(sidecar.Containers, pod.Spec.Containers, "/spec/containers")...) 143 | patches = append(patches, createArrayPatches(sidecar.Volumes, pod.Spec.Volumes, "/spec/volumes")...) 144 | patches = append(patches, createArrayPatches(sidecar.ImagePullSecrets, pod.Spec.ImagePullSecrets, "/spec/imagePullSecrets")...) 145 | patches = append(patches, createObjectPatches(sidecar.Annotations, pod.Annotations, "/metadata/annotations", patcher.AllowAnnotationOverrides)...) 146 | patches = append(patches, createObjectPatches(sidecar.Labels, pod.Labels, "/metadata/labels", patcher.AllowLabelOverrides)...) 147 | } 148 | log.Debugf("sidecar patches being applied for %v/%v: patches: %v", namespace, podName, patches) 149 | } 150 | } 151 | } 152 | } 153 | return patches, nil 154 | } 155 | 156 | /*PatchPodUpdate not supported, only support create */ 157 | func (patcher *SidecarInjectorPatcher) PatchPodUpdate(_ context.Context, _ string, _ corev1.Pod, _ corev1.Pod) ([]admission.PatchOperation, error) { 158 | return nil, nil 159 | } 160 | 161 | /*PatchPodDelete not supported, only support create */ 162 | func (patcher *SidecarInjectorPatcher) PatchPodDelete(_ context.Context, _ string, _ corev1.Pod) ([]admission.PatchOperation, error) { 163 | return nil, nil 164 | } 165 | -------------------------------------------------------------------------------- /pkg/webhook/sidecarhandler_test.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "reflect" 7 | "testing" 8 | 9 | "github.com/expediagroup/kubernetes-sidecar-injector/pkg/admission" 10 | "github.com/stretchr/testify/assert" 11 | v1 "k8s.io/api/core/v1" 12 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 13 | "k8s.io/client-go/kubernetes" 14 | "k8s.io/client-go/kubernetes/fake" 15 | ) 16 | 17 | func TestSidecarInjectorPatcher_PatchPodCreate(t *testing.T) { 18 | ctx := context.Background() 19 | type fields struct { 20 | K8sClient kubernetes.Interface 21 | InjectPrefix string 22 | InjectName string 23 | SidecarDataKey string 24 | AllowAnnotationOverrides bool 25 | AllowLabelOverrides bool 26 | } 27 | type args struct { 28 | namespace string 29 | pod v1.Pod 30 | } 31 | tests := []struct { 32 | name string 33 | fields fields 34 | args args 35 | configmap *v1.ConfigMap 36 | want []admission.PatchOperation 37 | wantErr assert.ErrorAssertionFunc 38 | }{ 39 | { 40 | name: "pod with no annotations", 41 | fields: fields{ 42 | K8sClient: fake.NewSimpleClientset(), 43 | InjectPrefix: "sidecar-injector.expedia.com", 44 | InjectName: "inject", 45 | SidecarDataKey: "sidecars.yaml", 46 | }, 47 | args: args{ 48 | namespace: "test", 49 | pod: v1.Pod{}, 50 | }, 51 | want: nil, 52 | wantErr: assert.NoError, 53 | }, 54 | { 55 | name: "pod with sidecar annotations no sidecar", 56 | fields: fields{ 57 | K8sClient: fake.NewSimpleClientset(), 58 | InjectPrefix: "sidecar-injector.expedia.com", 59 | InjectName: "inject", 60 | SidecarDataKey: "sidecars.yaml", 61 | }, 62 | args: args{ 63 | namespace: "test", 64 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 65 | Annotations: map[string]string{ 66 | "sidecar-injector.expedia.com/inject": "non-sidecar", 67 | }, 68 | }}, 69 | }, 70 | configmap: &v1.ConfigMap{}, 71 | want: nil, 72 | wantErr: assert.NoError, 73 | }, 74 | { 75 | name: "pod with sidecar annotations sidecar with no data", 76 | fields: fields{ 77 | K8sClient: fake.NewSimpleClientset(), 78 | InjectPrefix: "sidecar-injector.expedia.com", 79 | InjectName: "inject", 80 | SidecarDataKey: "sidecars.yaml", 81 | }, 82 | args: args{ 83 | namespace: "test", 84 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 85 | Annotations: map[string]string{ 86 | "sidecar-injector.expedia.com/inject": "my-sidecar", 87 | }, 88 | }}, 89 | }, 90 | configmap: &v1.ConfigMap{ObjectMeta: metav1.ObjectMeta{ 91 | Name: "my-sidecar", 92 | }}, 93 | want: nil, 94 | wantErr: assert.NoError, 95 | }, 96 | { 97 | name: "pod with sidecar annotations sidecar with missing sidecar data key", 98 | fields: fields{ 99 | K8sClient: fake.NewSimpleClientset(), 100 | InjectPrefix: "sidecar-injector.expedia.com", 101 | InjectName: "inject", 102 | SidecarDataKey: "sidecars.yaml", 103 | }, 104 | args: args{ 105 | namespace: "test", 106 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 107 | Annotations: map[string]string{ 108 | "sidecar-injector.expedia.com/inject": "my-sidecar", 109 | }, 110 | }}, 111 | }, 112 | configmap: &v1.ConfigMap{ 113 | ObjectMeta: metav1.ObjectMeta{ 114 | Name: "my-sidecar", 115 | }, 116 | Data: map[string]string{"wrongKey.yaml": ""}, 117 | }, 118 | want: nil, 119 | wantErr: assert.NoError, 120 | }, 121 | { 122 | name: "pod with sidecar annotations sidecar with sidecar data key but data empty", 123 | fields: fields{ 124 | K8sClient: fake.NewSimpleClientset(), 125 | InjectPrefix: "sidecar-injector.expedia.com", 126 | InjectName: "inject", 127 | SidecarDataKey: "sidecars.yaml", 128 | }, 129 | args: args{ 130 | namespace: "test", 131 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 132 | Annotations: map[string]string{ 133 | "sidecar-injector.expedia.com/inject": "my-sidecar", 134 | }, 135 | }}, 136 | }, 137 | configmap: &v1.ConfigMap{ 138 | ObjectMeta: metav1.ObjectMeta{ 139 | Name: "my-sidecar", 140 | }, 141 | Data: map[string]string{"sidecars.yaml": ""}, 142 | }, 143 | want: nil, 144 | wantErr: assert.NoError, 145 | }, 146 | { 147 | name: "pod with sidecar annotations sidecar with sidecar data key but data empty", 148 | fields: fields{ 149 | K8sClient: fake.NewSimpleClientset(), 150 | InjectPrefix: "sidecar-injector.expedia.com", 151 | InjectName: "inject", 152 | SidecarDataKey: "sidecars.yaml", 153 | }, 154 | args: args{ 155 | namespace: "test", 156 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 157 | Annotations: map[string]string{ 158 | "sidecar-injector.expedia.com/inject": "my-sidecar", 159 | }, 160 | }}, 161 | }, 162 | configmap: &v1.ConfigMap{ 163 | ObjectMeta: metav1.ObjectMeta{ 164 | Name: "my-sidecar", 165 | }, 166 | Data: map[string]string{"sidecars.yaml": ` 167 | - annotations: 168 | my: annotation 169 | labels: 170 | my: label`, 171 | }, 172 | }, 173 | want: []admission.PatchOperation{ 174 | {Op: "add", Path: "/metadata/annotations/my", Value: "annotation"}, 175 | {Op: "add", Path: "/metadata/labels", Value: map[string]string{"my": "label"}}}, 176 | wantErr: assert.NoError, 177 | }, 178 | } 179 | for _, tt := range tests { 180 | t.Run(tt.name, func(t *testing.T) { 181 | patcher := &SidecarInjectorPatcher{ 182 | K8sClient: tt.fields.K8sClient, 183 | InjectPrefix: tt.fields.InjectPrefix, 184 | InjectName: tt.fields.InjectName, 185 | SidecarDataKey: tt.fields.SidecarDataKey, 186 | AllowAnnotationOverrides: tt.fields.AllowAnnotationOverrides, 187 | AllowLabelOverrides: tt.fields.AllowLabelOverrides, 188 | } 189 | _, err := patcher.K8sClient.CoreV1().ConfigMaps(tt.args.namespace).Create(ctx, tt.configmap, metav1.CreateOptions{}) 190 | if err != nil { 191 | return 192 | } 193 | got, err := patcher.PatchPodCreate(ctx, tt.args.namespace, tt.args.pod) 194 | if !tt.wantErr(t, err, fmt.Sprintf("PatchPodCreate(%v, %v)", tt.args.namespace, tt.args.pod)) { 195 | return 196 | } 197 | assert.Equalf(t, tt.want, got, "PatchPodCreate(%v, %v)", tt.args.namespace, tt.args.pod) 198 | }) 199 | } 200 | } 201 | 202 | func TestSidecarInjectorPatcher_PatchPodDelete(t *testing.T) { 203 | type fields struct { 204 | K8sClient kubernetes.Interface 205 | InjectPrefix string 206 | InjectName string 207 | SidecarDataKey string 208 | AllowAnnotationOverrides bool 209 | AllowLabelOverrides bool 210 | } 211 | type args struct { 212 | namespace string 213 | pod v1.Pod 214 | } 215 | tests := []struct { 216 | name string 217 | fields fields 218 | args args 219 | want []admission.PatchOperation 220 | wantErr assert.ErrorAssertionFunc 221 | }{ 222 | { 223 | name: "PatchPodDelete is not supported", 224 | args: args{ 225 | namespace: "test", 226 | pod: v1.Pod{}, 227 | }, 228 | want: nil, 229 | wantErr: assert.NoError, 230 | }, 231 | } 232 | for _, tt := range tests { 233 | t.Run(tt.name, func(t *testing.T) { 234 | patcher := &SidecarInjectorPatcher{ 235 | K8sClient: tt.fields.K8sClient, 236 | InjectPrefix: tt.fields.InjectPrefix, 237 | InjectName: tt.fields.InjectName, 238 | SidecarDataKey: tt.fields.SidecarDataKey, 239 | AllowAnnotationOverrides: tt.fields.AllowAnnotationOverrides, 240 | AllowLabelOverrides: tt.fields.AllowLabelOverrides, 241 | } 242 | ctx := context.Background() 243 | got, err := patcher.PatchPodDelete(ctx, tt.args.namespace, tt.args.pod) 244 | if !tt.wantErr(t, err, fmt.Sprintf("PatchPodDelete(%v, %v)", tt.args.namespace, tt.args.pod)) { 245 | return 246 | } 247 | assert.Equalf(t, tt.want, got, "PatchPodDelete(%v, %v)", tt.args.namespace, tt.args.pod) 248 | }) 249 | } 250 | } 251 | 252 | func TestSidecarInjectorPatcher_PatchPodUpdate(t *testing.T) { 253 | type fields struct { 254 | K8sClient kubernetes.Interface 255 | InjectPrefix string 256 | InjectName string 257 | SidecarDataKey string 258 | AllowAnnotationOverrides bool 259 | AllowLabelOverrides bool 260 | } 261 | type args struct { 262 | namespace string 263 | oldPod v1.Pod 264 | newPod v1.Pod 265 | } 266 | tests := []struct { 267 | name string 268 | fields fields 269 | args args 270 | want []admission.PatchOperation 271 | wantErr assert.ErrorAssertionFunc 272 | }{ 273 | { 274 | name: "PatchPodUpdate is not supported", 275 | args: args{ 276 | namespace: "test", 277 | oldPod: v1.Pod{}, 278 | newPod: v1.Pod{}, 279 | }, 280 | want: nil, 281 | wantErr: assert.NoError, 282 | }, 283 | } 284 | for _, tt := range tests { 285 | t.Run(tt.name, func(t *testing.T) { 286 | patcher := &SidecarInjectorPatcher{ 287 | K8sClient: tt.fields.K8sClient, 288 | InjectPrefix: tt.fields.InjectPrefix, 289 | InjectName: tt.fields.InjectName, 290 | SidecarDataKey: tt.fields.SidecarDataKey, 291 | AllowAnnotationOverrides: tt.fields.AllowAnnotationOverrides, 292 | AllowLabelOverrides: tt.fields.AllowLabelOverrides, 293 | } 294 | ctx := context.Background() 295 | got, err := patcher.PatchPodUpdate(ctx, tt.args.namespace, tt.args.oldPod, tt.args.newPod) 296 | if !tt.wantErr(t, err, fmt.Sprintf("PatchPodUpdate(%v, %v, %v)", tt.args.namespace, tt.args.oldPod, tt.args.newPod)) { 297 | return 298 | } 299 | assert.Equalf(t, tt.want, got, "PatchPodUpdate(%v, %v, %v)", tt.args.namespace, tt.args.oldPod, tt.args.newPod) 300 | }) 301 | } 302 | } 303 | 304 | func TestSidecarInjectorPatcher_configmapSidecarNames(t *testing.T) { 305 | type fields struct { 306 | K8sClient kubernetes.Interface 307 | InjectPrefix string 308 | InjectName string 309 | SidecarDataKey string 310 | AllowAnnotationOverrides bool 311 | AllowLabelOverrides bool 312 | } 313 | type args struct { 314 | namespace string 315 | pod v1.Pod 316 | } 317 | tests := []struct { 318 | name string 319 | fields fields 320 | args args 321 | want []string 322 | }{ 323 | { 324 | name: "configmap sidecars has no annotations", 325 | args: args{ 326 | namespace: "test", 327 | pod: v1.Pod{}, 328 | }, 329 | fields: fields{ 330 | K8sClient: fake.NewSimpleClientset(), 331 | InjectPrefix: "sidecar-injector.expedia.com", 332 | InjectName: "inject", 333 | }, 334 | want: nil, 335 | }, 336 | { 337 | name: "configmap sidecars has annotations but no sidecars", 338 | args: args{ 339 | namespace: "test", 340 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 341 | Annotations: map[string]string{ 342 | "test": "annotation", 343 | }, 344 | }}, 345 | }, 346 | fields: fields{ 347 | K8sClient: fake.NewSimpleClientset(), 348 | InjectPrefix: "sidecar-injector.expedia.com", 349 | InjectName: "inject", 350 | }, 351 | want: nil, 352 | }, 353 | { 354 | name: "configmap sidecars has a sidecar", 355 | args: args{ 356 | namespace: "test", 357 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 358 | Annotations: map[string]string{ 359 | "sidecar-injector.expedia.com/inject": "my-sidecar", 360 | }, 361 | }}, 362 | }, 363 | fields: fields{ 364 | K8sClient: fake.NewSimpleClientset(), 365 | InjectPrefix: "sidecar-injector.expedia.com", 366 | InjectName: "inject", 367 | }, 368 | want: []string{"my-sidecar"}, 369 | }, 370 | { 371 | name: "configmap sidecars has multiple sidecar", 372 | args: args{ 373 | namespace: "test", 374 | pod: v1.Pod{ObjectMeta: metav1.ObjectMeta{ 375 | Annotations: map[string]string{ 376 | "sidecar-injector.expedia.com/inject": "my-sidecar,my-sidecar2", 377 | }, 378 | }}, 379 | }, 380 | fields: fields{ 381 | K8sClient: fake.NewSimpleClientset(), 382 | InjectPrefix: "sidecar-injector.expedia.com", 383 | InjectName: "inject", 384 | }, 385 | want: []string{"my-sidecar", "my-sidecar2"}, 386 | }, 387 | } 388 | for _, tt := range tests { 389 | t.Run(tt.name, func(t *testing.T) { 390 | patcher := &SidecarInjectorPatcher{ 391 | K8sClient: tt.fields.K8sClient, 392 | InjectPrefix: tt.fields.InjectPrefix, 393 | InjectName: tt.fields.InjectName, 394 | SidecarDataKey: tt.fields.SidecarDataKey, 395 | AllowAnnotationOverrides: tt.fields.AllowAnnotationOverrides, 396 | AllowLabelOverrides: tt.fields.AllowLabelOverrides, 397 | } 398 | got := patcher.configmapSidecarNames(tt.args.namespace, tt.args.pod) 399 | assert.Equalf(t, tt.want, got, "configmapSidecarNames(%v, %v)", tt.args.namespace, tt.args.pod) 400 | }) 401 | } 402 | } 403 | 404 | func TestSidecarInjectorPatcher_sideCarInjectionAnnotation(t *testing.T) { 405 | type fields struct { 406 | K8sClient kubernetes.Interface 407 | InjectPrefix string 408 | InjectName string 409 | } 410 | tests := []struct { 411 | name string 412 | fields fields 413 | want string 414 | }{ 415 | { 416 | name: "sidecar injection annotation properly constructed", 417 | fields: fields{ 418 | K8sClient: fake.NewSimpleClientset(), 419 | InjectPrefix: "sidecar-injector.expedia.com", 420 | InjectName: "inject", 421 | }, 422 | want: "sidecar-injector.expedia.com/inject", 423 | }, 424 | } 425 | for _, tt := range tests { 426 | t.Run(tt.name, func(t *testing.T) { 427 | patcher := &SidecarInjectorPatcher{ 428 | K8sClient: tt.fields.K8sClient, 429 | InjectPrefix: tt.fields.InjectPrefix, 430 | InjectName: tt.fields.InjectName, 431 | } 432 | assert.Equalf(t, tt.want, patcher.sideCarInjectionAnnotation(), "sideCarInjectionAnnotation()") 433 | }) 434 | } 435 | } 436 | 437 | func Test_createArrayPatches(t *testing.T) { 438 | type args[T any] struct { 439 | newCollection []T 440 | existingCollection []T 441 | path string 442 | } 443 | containerTests := []struct { 444 | name string 445 | args args[v1.Container] 446 | want []admission.PatchOperation 447 | }{ 448 | { 449 | name: "test patching initContainer first", 450 | args: args[v1.Container]{ 451 | newCollection: []v1.Container{{Name: "Test"}}, 452 | existingCollection: []v1.Container{}, 453 | path: "/spec/initContainers", 454 | }, 455 | want: []admission.PatchOperation{{ 456 | Op: "add", 457 | Path: "/spec/initContainers", 458 | Value: []v1.Container{{Name: "Test"}}, 459 | }}, 460 | }, { 461 | name: "test patching initContainer not first", 462 | args: args[v1.Container]{ 463 | newCollection: []v1.Container{{Name: "Test2"}}, 464 | existingCollection: []v1.Container{{Name: "Test"}}, 465 | path: "/spec/initContainers", 466 | }, 467 | want: []admission.PatchOperation{{ 468 | Op: "add", 469 | Path: "/spec/initContainers/-", 470 | Value: v1.Container{Name: "Test2"}, 471 | }}, 472 | }, { 473 | name: "test patching multiple initContainer not first", 474 | args: args[v1.Container]{ 475 | newCollection: []v1.Container{{Name: "Test2"}, {Name: "Test3"}}, 476 | existingCollection: []v1.Container{{Name: "Test"}}, 477 | path: "/spec/initContainers", 478 | }, 479 | want: []admission.PatchOperation{{ 480 | Op: "add", 481 | Path: "/spec/initContainers/-", 482 | Value: v1.Container{Name: "Test2"}, 483 | }, { 484 | Op: "add", 485 | Path: "/spec/initContainers/-", 486 | Value: v1.Container{Name: "Test3"}, 487 | }}, 488 | }, 489 | } 490 | for _, tt := range containerTests { 491 | t.Run(tt.name, func(t *testing.T) { 492 | assert.Equalf(t, tt.want, createArrayPatches(tt.args.newCollection, tt.args.existingCollection, tt.args.path), "createArrayPatches(%v, %v, %v)", tt.args.newCollection, tt.args.existingCollection, tt.args.path) 493 | }) 494 | } 495 | } 496 | 497 | func Test_createObjectPatches(t *testing.T) { 498 | type args struct { 499 | newMap map[string]string 500 | existingMap map[string]string 501 | path string 502 | override bool 503 | } 504 | tests := []struct { 505 | name string 506 | args args 507 | want []admission.PatchOperation 508 | }{ 509 | { 510 | name: "test patching empty annotation", 511 | args: args{ 512 | newMap: map[string]string{"my": "annotation"}, 513 | existingMap: map[string]string{}, 514 | path: "/metadata/annotations", 515 | }, 516 | want: []admission.PatchOperation{{ 517 | Op: "add", 518 | Path: "/metadata/annotations/my", 519 | Value: "annotation", 520 | }}, 521 | }, 522 | { 523 | name: "test patching empty annotation with forward slash", 524 | args: args{ 525 | newMap: map[string]string{"example.com/my": "annotation"}, 526 | existingMap: map[string]string{}, 527 | path: "/metadata/annotations", 528 | }, 529 | want: []admission.PatchOperation{{ 530 | Op: "add", 531 | Path: "/metadata/annotations/example.com~1my", 532 | Value: "annotation", 533 | }}, 534 | }, 535 | { 536 | name: "test patching empty annotation with tilde", 537 | args: args{ 538 | newMap: map[string]string{"example.com~my": "annotation"}, 539 | existingMap: map[string]string{}, 540 | path: "/metadata/annotations", 541 | }, 542 | want: []admission.PatchOperation{{ 543 | Op: "add", 544 | Path: "/metadata/annotations/example.com~0my", 545 | Value: "annotation", 546 | }}, 547 | }, 548 | { 549 | name: "test patching nil annotation", 550 | args: args{ 551 | newMap: map[string]string{"my": "annotation"}, 552 | existingMap: nil, 553 | path: "/metadata/annotations", 554 | }, 555 | want: []admission.PatchOperation{{ 556 | Op: "add", 557 | Path: "/metadata/annotations", 558 | Value: map[string]string{"my": "annotation"}, 559 | }}, 560 | }, 561 | { 562 | name: "test patching annotation no override", 563 | args: args{ 564 | newMap: map[string]string{"my": "annotation"}, 565 | existingMap: map[string]string{"my": "override-annotation"}, 566 | path: "/metadata/annotations", 567 | }, 568 | want: nil, 569 | }, 570 | { 571 | name: "test patching annotation with override", 572 | args: args{ 573 | newMap: map[string]string{"my": "annotation"}, 574 | existingMap: map[string]string{"my": "override-annotation"}, 575 | path: "/metadata/annotations", 576 | override: true, 577 | }, 578 | want: []admission.PatchOperation{{ 579 | Op: "replace", 580 | Path: "/metadata/annotations/my", 581 | Value: "annotation", 582 | }}, 583 | }, 584 | { 585 | name: "test patching empty labels", 586 | args: args{ 587 | newMap: map[string]string{"my": "label"}, 588 | existingMap: map[string]string{}, 589 | path: "/metadata/labels", 590 | }, 591 | want: []admission.PatchOperation{{ 592 | Op: "add", 593 | Path: "/metadata/labels/my", 594 | Value: "label", 595 | }}, 596 | }, 597 | { 598 | name: "test patching empty labels with forward slash", 599 | args: args{ 600 | newMap: map[string]string{"example.com/my": "label"}, 601 | existingMap: map[string]string{}, 602 | path: "/metadata/labels", 603 | }, 604 | want: []admission.PatchOperation{{ 605 | Op: "add", 606 | Path: "/metadata/labels/example.com~1my", 607 | Value: "label", 608 | }}, 609 | }, 610 | { 611 | name: "test patching empty labels with tilde", 612 | args: args{ 613 | newMap: map[string]string{"example.com~my": "label"}, 614 | existingMap: map[string]string{}, 615 | path: "/metadata/labels", 616 | }, 617 | want: []admission.PatchOperation{{ 618 | Op: "add", 619 | Path: "/metadata/labels/example.com~0my", 620 | Value: "label", 621 | }}, 622 | }, 623 | { 624 | name: "test patching nil labels", 625 | args: args{ 626 | newMap: map[string]string{"my": "label"}, 627 | existingMap: nil, 628 | path: "/metadata/labels", 629 | }, 630 | want: []admission.PatchOperation{{ 631 | Op: "add", 632 | Path: "/metadata/labels", 633 | Value: map[string]string{"my": "label"}, 634 | }}, 635 | }, 636 | { 637 | name: "test patching label no override", 638 | args: args{ 639 | newMap: map[string]string{"my": "label"}, 640 | existingMap: map[string]string{"my": "override-label"}, 641 | path: "/metadata/labels", 642 | }, 643 | want: nil, 644 | }, 645 | { 646 | name: "test patching label with override", 647 | args: args{ 648 | newMap: map[string]string{"my": "label"}, 649 | existingMap: map[string]string{"my": "override-label"}, 650 | path: "/metadata/labels", 651 | override: true, 652 | }, 653 | want: []admission.PatchOperation{{ 654 | Op: "replace", 655 | Path: "/metadata/labels/my", 656 | Value: "label", 657 | }}, 658 | }, 659 | } 660 | for _, tt := range tests { 661 | t.Run(tt.name, func(t *testing.T) { 662 | if got := createObjectPatches(tt.args.newMap, tt.args.existingMap, tt.args.path, tt.args.override); !reflect.DeepEqual(got, tt.want) { 663 | assert.Fail(t, "annotation patching failed", "createObjectPatches() = %v, want %v", got, tt.want) 664 | } 665 | }) 666 | } 667 | } 668 | -------------------------------------------------------------------------------- /sample/admission-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Pod", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "generateName": "echo-server-deployment-56bbb8f899-", 6 | "creationTimestamp": null, 7 | "labels": { 8 | "app.kubernetes.io/name": "echo-server", 9 | "pod-template-hash": "56bbb8f899" 10 | }, 11 | "annotations": { 12 | "kubectl.kubernetes.io/restartedAt": "2022-03-25T13:36:51-05:00", 13 | "sidecar-injector.expedia.com/inject": "haystack-agent-sidecar", 14 | "sidecar-injector.expedia.com/some-api-key": "6feab492-fc9b-4c38-b50d-3791718c8203" 15 | }, 16 | "ownerReferences": [ 17 | { 18 | "apiVersion": "apps/v1", 19 | "kind": "ReplicaSet", 20 | "name": "echo-server-deployment-56bbb8f899", 21 | "uid": "4b993347-90c2-4107-9e4f-39c6e13f36e3", 22 | "controller": true, 23 | "blockOwnerDeletion": true 24 | } 25 | ] 26 | }, 27 | "spec": { 28 | "volumes": [ 29 | { 30 | "name": "kube-api-access-w2tkv", 31 | "projected": { 32 | "sources": [ 33 | { 34 | "serviceAccountToken": { 35 | "expirationSeconds": 3607, 36 | "path": "token" 37 | } 38 | }, 39 | { 40 | "configMap": { 41 | "name": "kube-root-ca.crt", 42 | "items": [ 43 | { 44 | "key": "ca.crt", 45 | "path": "ca.crt" 46 | } 47 | ] 48 | } 49 | }, 50 | { 51 | "downwardAPI": { 52 | "items": [ 53 | { 54 | "path": "namespace", 55 | "fieldRef": { 56 | "apiVersion": "v1", 57 | "fieldPath": "metadata.namespace" 58 | } 59 | } 60 | ] 61 | } 62 | } 63 | ] 64 | } 65 | } 66 | ], 67 | "containers": [ 68 | { 69 | "name": "echo-server", 70 | "image": "hashicorp/http-echo", 71 | "args": [ 72 | "-listen=:8080", 73 | "-text=\"hello world\"" 74 | ], 75 | "resources": {}, 76 | "volumeMounts": [ 77 | { 78 | "name": "kube-api-access-w2tkv", 79 | "readOnly": true, 80 | "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" 81 | } 82 | ], 83 | "terminationMessagePath": "/dev/termination-log", 84 | "terminationMessagePolicy": "File", 85 | "imagePullPolicy": "IfNotPresent" 86 | } 87 | ], 88 | "restartPolicy": "Always", 89 | "terminationGracePeriodSeconds": 30, 90 | "dnsPolicy": "ClusterFirst", 91 | "serviceAccountName": "default", 92 | "serviceAccount": "default", 93 | "securityContext": {}, 94 | "schedulerName": "default-scheduler", 95 | "tolerations": [ 96 | { 97 | "key": "node.kubernetes.io/not-ready", 98 | "operator": "Exists", 99 | "effect": "NoExecute", 100 | "tolerationSeconds": 300 101 | }, 102 | { 103 | "key": "node.kubernetes.io/unreachable", 104 | "operator": "Exists", 105 | "effect": "NoExecute", 106 | "tolerationSeconds": 300 107 | } 108 | ], 109 | "priority": 0, 110 | "enableServiceLinks": true, 111 | "preemptionPolicy": "PreemptLowerPriority" 112 | }, 113 | "status": {} 114 | } -------------------------------------------------------------------------------- /sample/certs/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDpTCCAo2gAwIBAgIUGEXlDs4d2kyKI6y+adUuF3/rLnMwDQYJKoZIhvcNAQEL 3 | BQAwFTETMBEGA1UEAxMKbWluaWt1YmVDQTAeFw0xOTAyMTIwMjIxMDBaFw0yMDAy 4 | MTIwMjIxMDBaMDMxMTAvBgNVBAMTKHNpZGVjYXItaW5qZWN0b3Itd2ViaG9vay1z 5 | dmMuZGVmYXVsdC5zdmMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDy 6 | DzrRz9LNWhxp4NeA5nXKB7hSEASuVDgj7s4b+3e0LC6F1DnbKGyJ6wIkOGGdgJKW 7 | kygmG6DOoGAOEtMEdheWxOD0skOngAduOZrPrKbFigzhZDqXIfPHdgqvvT9JKY9M 8 | p5xj6NzXi/3zIauAAM2ZSxFu7HKMoFh3GVnsQ2FvPuLFWuSV8TZo/RS8n9FswwD/ 9 | egMFsgpKPJnDMhooQP26HLqN6sTC19MTpcOCF0mbMFiXvSifcaO/07+9m1vtm7NE 10 | XQA2P1xPWhyy7AI8102h9ay6IlbaCbtGUSErasQcYiPpP3ExShoOfmLeX5OQ5Uau 11 | cc4IGTTyArHw7mEdlOJtAgMBAAGjgc4wgcswDgYDVR0PAQH/BAQDAgWgMBMGA1Ud 12 | JQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFNh/73oRYPol 13 | XQgHm/hCqUXMyrt3MHcGA1UdEQRwMG6CHHNpZGVjYXItaW5qZWN0b3Itd2ViaG9v 14 | ay1zdmOCJHNpZGVjYXItaW5qZWN0b3Itd2ViaG9vay1zdmMuZGVmYXVsdIIoc2lk 15 | ZWNhci1pbmplY3Rvci13ZWJob29rLXN2Yy5kZWZhdWx0LnN2YzANBgkqhkiG9w0B 16 | AQsFAAOCAQEAlPgqs//H3NKH1ZkFif4HnEXTQLW1E7g8Nna92p9E7UuTfb7s6P2N 17 | dS24Q1HXxcm7fGDYvZI3Zii2E8hdFjKqC7cYL+/fFIniNcL0EZiIH6QXT4wTpb1N 18 | OwHUAjdHUMsp4JZgrcOZtar8Ct/bKC4A+zwyBKXIalZHnfBuFMNAIBDJfgdVE2MS 19 | BjRmSeThn/0AHM80mcBbE3lBAuiNd+5RiCHp5zq+eB66Eez1as46EAKidpY5xD2Q 20 | CosEtj+3nHiv3zX6lWaj2yLFFQz3qL2zW2Cax9x9P7aN+5JpKLE969anmvmWbcSK 21 | 7490PDBw7in9g61zHOqK8mhGCPU3O2HYoA== 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /sample/certs/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA8g860c/SzVocaeDXgOZ1yge4UhAErlQ4I+7OG/t3tCwuhdQ5 3 | 2yhsiesCJDhhnYCSlpMoJhugzqBgDhLTBHYXlsTg9LJDp4AHbjmaz6ymxYoM4WQ6 4 | lyHzx3YKr70/SSmPTKecY+jc14v98yGrgADNmUsRbuxyjKBYdxlZ7ENhbz7ixVrk 5 | lfE2aP0UvJ/RbMMA/3oDBbIKSjyZwzIaKED9uhy6jerEwtfTE6XDghdJmzBYl70o 6 | n3Gjv9O/vZtb7ZuzRF0ANj9cT1ocsuwCPNdNofWsuiJW2gm7RlEhK2rEHGIj6T9x 7 | MUoaDn5i3l+TkOVGrnHOCBk08gKx8O5hHZTibQIDAQABAoIBAQC4ldSM2qYt4mF4 8 | e/TaXuPDxE9ShNSM+7wz6o9R11lZE7gGZegYr6LVKVjgtf36VWlzWZRsOvVNnA6j 9 | rMctx8AFQO0qrCXbPU5tR5A+fbJPQQ7BceUcCtATcniDuxTffcnA8q/XoGOIG0D0 10 | fuCBJBukohIRPE293yiW6cYg3OEYKqiacxaGYet9gnLcF1QUGhUGIlOHsCewWaDJ 11 | CCip+11vdOQ3wU3jUj/l3ElPsk0IoHgbPF+3TFqix65XBsacClm/pSz0um3EELiM 12 | 7nlQUHYtUdRZBuKFUcOXmuB9S8DcoP1nekZxDDF/wXqtHOr/N8ck+mxyarYRO/QY 13 | gu/BwLAhAoGBAP2LA9yvA38rV8X2RdBrJbmW4EdBnn7+r9oRLADbGwNA8YtB1TVh 14 | 7v9q1eE5mgqw1HI4n/0adYOpGj378x3/0ISQweIuJcMQhInOVDKhVwNVZGc6foDJ 15 | RWYmnean4OzdPUWQdFKlfJYTPYruIpCP3UVNkqK82aoxCM/yVxrmcs4zAoGBAPRn 16 | uf3lPwKF/EPCPg4Prgiq6LFYxc8SqcwuOnZQcnMP4UeTCGBu4gH3REU6iaNscPWt 17 | 0Bzz79zN+U504EXyS+kwmXRdta1qR80tlTJ/YUa+xxw3qcKUIDRKxw/vYA0NDrAp 18 | DcNO7zqRD0lgm04uN7bP4K2VoXChKmAbZ5KT06zfAoGAVv3Zh2BtHLbsWLnU3lvF 19 | B9ZigVBcZ0pPX8zAglKrBATGW3dtBfHiJLStSaeP2NcvLTmMezUW2OOuY1IM6mAZ 20 | VUKto0MeJb2HHBk0/mIpDrW/y0NgoCNuskvRpZA4Nkz6duHHZ4vsITncxcxLA7q4 21 | usyQ4VFWhXRph5+oj0w+W80CgYEAtspJMZnd+U4qMKc68BtMBxGD/Peu4cNMmPfO 22 | I6ThJCsxSu2tqynjAKNlPP2d6Ur2ZNh9ONo8gADQv5vsDIQ9wAboDj7z3OILF2pL 23 | FrxsDZQrqG/9GBjeyR1QKhvW04v7e0cJExSbGUtain+lR+CLLL/mgwzQ9EKlRcHZ 24 | Qagr/TMCgYAAjFPgKrTcS60RYfHfaTCFaTyyJGJHEyLuKSfePIaQBHQO0MmfiZTr 25 | efsOpXWulf/YgbUGO4HB3ZynYzMDLVbG6lK1FBo6ErN04PuMyO/a0PaRB+FIzUtx 26 | fQ85yoXMknueDKyu1ipz7lBev9BxjXRm8enXkhjaKvMIDp5ctdnw/Q== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /sample/chart/echo-server/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: inject-container 2 | home: https://github.com/expediagroup/kubernetes-sidecar-injector 3 | version: 0.0.1 4 | appVersion: "0.1" 5 | apiVersion: 6 | -------------------------------------------------------------------------------- /sample/chart/echo-server/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | app.kubernetes.io/name: {{ .Chart.Name }} 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app.kubernetes.io/name: {{ .Chart.Name }} 13 | template: 14 | metadata: 15 | annotations: 16 | sidecar-injector.expedia.com/inject: "haystack-agent-sidecar" 17 | sidecar-injector.expedia.com/some-api-key: "6feab492-fc9b-4c38-b50d-3791718c8203" 18 | labels: 19 | app.kubernetes.io/name: {{ .Chart.Name }} 20 | spec: 21 | serviceAccountName: {{ .Chart.Name }} 22 | containers: 23 | - name: echo-server 24 | image: hashicorp/http-echo:alpine 25 | imagePullPolicy: IfNotPresent 26 | args: 27 | - -listen=:8080 28 | - -text="hello world" 29 | -------------------------------------------------------------------------------- /sample/chart/echo-server/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | app.kubernetes.io/name: {{ .Chart.Name }} 8 | spec: 9 | ports: 10 | - port: 8080 11 | targetPort: 8080 12 | type: NodePort 13 | selector: 14 | app.kubernetes.io/name: {{ .Chart.Name }} -------------------------------------------------------------------------------- /sample/chart/echo-server/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | 7 | -------------------------------------------------------------------------------- /sample/chart/echo-server/templates/sidecar-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: haystack-agent-sidecar 5 | namespace: {{ .Release.Namespace}} 6 | data: 7 | sidecars.yaml: | 8 | - name: haystack-agent 9 | containers: 10 | - name: haystack-agent 11 | image: expediadotcom/haystack-agent 12 | imagePullPolicy: IfNotPresent 13 | args: 14 | - --config-provider 15 | - file 16 | - --file-path 17 | - /app/haystack/agent.conf 18 | ports: 19 | - containerPort: 35000 20 | volumeMounts: 21 | - name: agent-conf 22 | mountPath: /app/haystack 23 | volumes: 24 | - name: agent-conf 25 | configMap: 26 | name: haystack-agent-conf-configmap 27 | annotations: 28 | my: annotation 29 | labels: 30 | my: label 31 | --- 32 | apiVersion: v1 33 | kind: ConfigMap 34 | metadata: 35 | name: haystack-agent-conf-configmap 36 | namespace: {{ .Release.Namespace}} 37 | data: 38 | agent.conf: | 39 | agents { 40 | spans { 41 | enabled = true 42 | port = 35000 43 | dispatchers { 44 | kafka { 45 | bootstrap.servers = "kafkasvc:9092" 46 | producerTopic = "proto-spans" 47 | buffer.memory = 1048576 48 | retries = 2 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /sample/chart/echo-server/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpediaGroup/kubernetes-sidecar-injector/e49c3ed6b72980958e2062ce7309410c4978ca5e/sample/chart/echo-server/values.yaml -------------------------------------------------------------------------------- /sample/chart/nginx/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: inject-init-container 2 | home: https://github.com/expediagroup/kubernetes-sidecar-injector 3 | version: 0.0.1 4 | appVersion: "0.1" 5 | apiVersion: 6 | -------------------------------------------------------------------------------- /sample/chart/nginx/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | app.kubernetes.io/name: {{ .Chart.Name }} 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app.kubernetes.io/name: {{ .Chart.Name }} 13 | template: 14 | metadata: 15 | annotations: 16 | sidecar-injector.expedia.com/inject: {{ .Chart.Name }}-sidecar 17 | labels: 18 | app.kubernetes.io/name: {{ .Chart.Name }} 19 | spec: 20 | serviceAccountName: {{ .Chart.Name }} 21 | containers: 22 | - name: nginx 23 | image: nginx:1.20.2 24 | ports: 25 | - containerPort: 80 26 | volumeMounts: 27 | - name: workdir 28 | mountPath: /usr/share/nginx/html 29 | dnsPolicy: Default 30 | volumes: 31 | - name: workdir 32 | emptyDir: {} 33 | -------------------------------------------------------------------------------- /sample/chart/nginx/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | app.kubernetes.io/name: {{ .Chart.Name }} 8 | spec: 9 | ports: 10 | - port: 8080 11 | targetPort: 80 12 | type: NodePort 13 | selector: 14 | app.kubernetes.io/name: {{ .Chart.Name }} -------------------------------------------------------------------------------- /sample/chart/nginx/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | 7 | -------------------------------------------------------------------------------- /sample/chart/nginx/templates/sidecar-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ .Chart.Name }}-sidecar 5 | namespace: {{ .Release.Namespace }} 6 | data: 7 | sidecars.yaml: | 8 | - name: busybox 9 | initContainers: 10 | - name: busybox 11 | image: busybox 12 | command: [ "/bin/sh" ] 13 | args: [ "-c", "echo '

I am an init container injected by the sidcar-injector!

' >> /work-dir/index.html" ] 14 | volumeMounts: 15 | - name: workdir 16 | mountPath: "/work-dir" 17 | annotations: 18 | my: annotation 19 | labels: 20 | my: label -------------------------------------------------------------------------------- /sample/chart/nginx/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpediaGroup/kubernetes-sidecar-injector/e49c3ed6b72980958e2062ce7309410c4978ca5e/sample/chart/nginx/values.yaml --------------------------------------------------------------------------------