From dacf3d70dce62dab3a2fd3bd1a03c3e46aa5cace Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 16 May 2023 11:16:23 -0300 Subject: [PATCH] refactor: migrate kubebuilder, k8s dependencies and go version (#216) * rename dir `apis` to `api` * move main.go and Dockerfile to cmd/manager/ * move controllers from controllers/ to internal/controller/ dir * update PROJECT * update suite_test.go * update go and dependencies * update github workflows * simplifies Makefile * fix manifests target in Makefile * ignoring doc dirs when adding license header * generate manifests * fix worker Dockerfile * update config/ files * move status.go from pkg/apis/ to api/zora/v1alpha1/ * annotate package discovery to generate deepcopy implementation * removing TODOs * moving saas payloads to saas package * update .gitignore * merge packages plugins/errparse and plugins/cronjobs * move saas package to internal * delete worker/run/ package * add template target in Makefile * update rbac-proxy version * 0.5.2-rc1 * fix Makefile * fix manager Dockerfile * add kustomize labels in config/ manifests * rename config/rbac/ files --- .github/workflows/build.yaml | 26 - .github/workflows/docker.yaml | 20 +- .github/workflows/docs.yaml | 24 +- .github/workflows/license.yaml | 17 - .github/workflows/release.yaml | 21 +- .github/workflows/test.yaml | 27 + .gitignore | 1 + Makefile | 274 ++++++--- PROJECT | 8 +- {apis => api}/zora/v1alpha1/cluster_types.go | 14 +- .../zora/v1alpha1/clusterissue_types.go | 4 +- .../zora/v1alpha1/clusterscan_types.go | 11 +- .../zora/v1alpha1/clusterscan_types_test.go | 0 .../zora/v1alpha1/groupversion_info.go | 4 +- {apis => api}/zora/v1alpha1/plugin_types.go | 0 {pkg/apis => api/zora/v1alpha1}/status.go | 13 +- .../zora/v1alpha1/zz_generated.deepcopy.go | 23 + charts/zora/Chart.yaml | 4 +- charts/zora/README.md | 8 +- .../crds/zora.undistro.io_clusterissues.yaml | 8 +- .../zora/crds/zora.undistro.io_clusters.yaml | 13 +- .../crds/zora.undistro.io_clusterscans.yaml | 17 +- .../zora/crds/zora.undistro.io_plugins.yaml | 34 +- charts/zora/values.yaml | 5 +- Dockerfile => cmd/manager/Dockerfile | 10 +- main.go => cmd/manager/main.go | 14 +- cmd/worker/Dockerfile | 4 +- cmd/worker/main.go | 4 +- .../bases/zora.undistro.io_clusterissues.yaml | 22 +- .../crd/bases/zora.undistro.io_clusters.yaml | 27 +- .../bases/zora.undistro.io_clusterscans.yaml | 31 +- .../crd/bases/zora.undistro.io_plugins.yaml | 48 +- config/crd/kustomization.yaml | 14 - config/crd/kustomizeconfig.yaml | 14 - .../patches/cainjection_in_clusterissues.yaml | 14 - .../crd/patches/cainjection_in_clusters.yaml | 14 - .../patches/cainjection_in_clusterscans.yaml | 14 - .../crd/patches/cainjection_in_plugins.yaml | 14 - .../crd/patches/webhook_in_clusterissues.yaml | 14 - config/crd/patches/webhook_in_clusters.yaml | 14 - .../crd/patches/webhook_in_clusterscans.yaml | 14 - config/crd/patches/webhook_in_plugins.yaml | 14 - config/default/kustomization.yaml | 152 +++-- config/default/manager_auth_proxy_patch.yaml | 21 +- config/default/manager_config_patch.yaml | 24 - config/manager/controller_manager_config.yaml | 25 - config/manager/kustomization.yaml | 28 - config/manager/manager.yaml | 58 +- config/prometheus/kustomization.yaml | 14 - config/prometheus/monitor.yaml | 20 +- .../rbac/auth_proxy_client_clusterrole.yaml | 7 + config/rbac/auth_proxy_role.yaml | 7 + config/rbac/auth_proxy_role_binding.yaml | 7 + config/rbac/auth_proxy_service.yaml | 6 + config/rbac/leader_election_role.yaml | 7 + config/rbac/leader_election_role_binding.yaml | 7 + config/rbac/role.yaml | 14 - config/rbac/role_binding.yaml | 7 + config/rbac/service_account.yaml | 7 + ...ole.yaml => zora_cluster_editor_role.yaml} | 7 + ...ole.yaml => zora_cluster_viewer_role.yaml} | 7 + ...aml => zora_clusterissue_editor_role.yaml} | 9 +- ...aml => zora_clusterissue_viewer_role.yaml} | 7 + ...yaml => zora_clusterscan_editor_role.yaml} | 7 + ...yaml => zora_clusterscan_viewer_role.yaml} | 7 + ...role.yaml => zora_plugin_editor_role.yaml} | 7 + ...role.yaml => zora_plugin_viewer_role.yaml} | 7 + ...ng.yaml => zora_plugins_role_binding.yaml} | 0 config/samples/kustomization.yaml | 7 + config/samples/zora_v1alpha1_cluster.yaml | 20 +- .../samples/zora_v1alpha1_clusterissue.yaml | 48 +- config/samples/zora_v1alpha1_clusterscan.yaml | 20 +- .../samples/zora_v1alpha1_plugin_marvin.yaml | 20 +- .../samples/zora_v1alpha1_plugin_popeye.yaml | 20 +- go.mod | 81 ++- go.sum | 539 +++--------------- hack/make/config.mk | 32 -- hack/make/misc.mk | 68 --- .../rbac/auth_proxy_client_clusterrole.patch | 7 - hack/patches/rbac/auth_proxy_role.patch | 7 - .../rbac/auth_proxy_role_binding.patch | 18 - hack/patches/rbac/leader_election_role.patch | 10 - .../rbac/leader_election_role_binding.patch | 17 - hack/patches/rbac/role.patch | 11 - hack/patches/rbac/role_binding.patch | 17 - hack/patches/rbac/service_account.patch | 18 - hack/scripts/gen_zora_view_kubeconfig.sh | 253 -------- hack/scripts/m4/common_calls.sh.in | 3 - hack/scripts/m4/common_calls_and_vars.sh.in | 16 - hack/scripts/m4/common_create_funcs.sh.in | 113 ---- hack/scripts/m4/common_get_funcs.sh.in | 50 -- hack/scripts/m4/common_opts_and_vars.sh.in | 9 - hack/scripts/m4/common_setup_funcs.sh.in | 28 - .../scripts/m4/gen_zora_view_kubeconfig.sh.m4 | 20 - hack/scripts/m4/targetcluster.sh.m4 | 51 -- hack/scripts/setup_zora_view.sh | 76 --- .../controller}/zora/cluster_controller.go | 4 +- .../zora/clusterscan_controller.go | 14 +- .../controller}/zora/suite_test.go | 18 +- {pkg => internal}/saas/client.go | 10 +- .../v1alpha1 => internal/saas}/clusters.go | 6 +- .../saas}/clusters_test.go | 4 +- {pkg => internal}/saas/hooks.go | 8 +- .../v1alpha1 => internal/saas}/issues.go | 4 +- .../v1alpha1 => internal/saas}/issues_test.go | 4 +- .../testdata/cluster/always_disconnected.yml | 0 .../cluster/always_without_metrics.yml | 0 .../saas}/testdata/cluster/disconnected.yml | 0 .../saas}/testdata/cluster/ok.yml | 0 .../testdata/cluster/without_metrics.yml | 0 .../testdata/cluster/without_provider.yml | 0 .../cluster/without_provider_and_metrics.yml | 0 .../saas}/testdata/payload/1.json | 0 .../saas}/testdata/payload/10.json | 0 .../saas}/testdata/payload/2.json | 0 .../saas}/testdata/payload/3.json | 0 .../saas}/testdata/payload/4.json | 0 .../saas}/testdata/payload/5.json | 0 .../saas}/testdata/payload/6.json | 0 .../saas}/testdata/payload/7.json | 0 .../saas}/testdata/payload/8.json | 0 .../saas}/testdata/payload/9.json | 0 pkg/apis/zz_generated.deepcopy.go | 46 -- pkg/clientset/versioned/clientset.go | 7 +- pkg/clientset/versioned/fake/register.go | 16 +- pkg/clientset/versioned/scheme/register.go | 16 +- .../versioned/typed/zora/v1alpha1/cluster.go | 2 +- .../typed/zora/v1alpha1/clusterissue.go | 2 +- .../typed/zora/v1alpha1/clusterscan.go | 2 +- .../typed/zora/v1alpha1/fake/fake_cluster.go | 2 +- .../zora/v1alpha1/fake/fake_clusterissue.go | 2 +- .../zora/v1alpha1/fake/fake_clusterscan.go | 2 +- .../typed/zora/v1alpha1/zora_client.go | 2 +- pkg/discovery/types.go | 5 +- pkg/discovery/zz_generated.deepcopy.go | 34 +- pkg/plugins/{cronjobs => }/cronjob.go | 18 +- pkg/plugins/{errparse => }/parse.go | 6 +- pkg/plugins/{errparse => }/parse_test.go | 8 +- .../{errparse => }/testdata/dummy_err_1.txt | 0 .../{errparse => }/testdata/marvin_err_1.txt | 0 .../{errparse => }/testdata/marvin_err_2.txt | 0 .../{errparse => }/testdata/marvin_err_3.txt | 0 .../{errparse => }/testdata/marvin_err_4.txt | 0 .../{errparse => }/testdata/marvin_err_5.txt | 0 .../{errparse => }/testdata/marvin_err_6.txt | 0 .../{errparse => }/testdata/marvin_err_7.txt | 0 .../{errparse => }/testdata/marvin_err_8.txt | 0 .../{errparse => }/testdata/popeye_err_1.txt | 0 .../{errparse => }/testdata/popeye_err_2.txt | 0 .../{errparse => }/testdata/popeye_err_3.txt | 0 .../{errparse => }/testdata/popeye_err_4.txt | 0 pkg/worker/config/config.go | 2 +- pkg/worker/report/marvin/parse.go | 2 +- pkg/worker/report/marvin/parse_test.go | 2 +- pkg/worker/report/parse.go | 2 +- pkg/worker/report/parse_test.go | 2 +- pkg/worker/report/popeye/parse.go | 2 +- pkg/worker/report/popeye/parse_test.go | 2 +- pkg/worker/report/popeye/parse_types.go | 2 +- pkg/worker/{run => }/run.go | 4 +- pkg/worker/{run => }/run_test.go | 2 +- 161 files changed, 953 insertions(+), 2235 deletions(-) delete mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/license.yaml create mode 100644 .github/workflows/test.yaml rename {apis => api}/zora/v1alpha1/cluster_types.go (97%) rename {apis => api}/zora/v1alpha1/clusterissue_types.go (98%) rename {apis => api}/zora/v1alpha1/clusterscan_types.go (98%) rename {apis => api}/zora/v1alpha1/clusterscan_types_test.go (100%) rename {apis => api}/zora/v1alpha1/groupversion_info.go (95%) rename {apis => api}/zora/v1alpha1/plugin_types.go (100%) rename {pkg/apis => api/zora/v1alpha1}/status.go (78%) rename {apis => api}/zora/v1alpha1/zz_generated.deepcopy.go (96%) rename Dockerfile => cmd/manager/Dockerfile (85%) rename main.go => cmd/manager/main.go (95%) delete mode 100644 config/manager/controller_manager_config.yaml rename config/rbac/{cluster_editor_role.yaml => zora_cluster_editor_role.yaml} (78%) rename config/rbac/{cluster_viewer_role.yaml => zora_cluster_viewer_role.yaml} (77%) rename config/rbac/{clusterissue_editor_role.yaml => zora_clusterissue_editor_role.yaml} (76%) rename config/rbac/{clusterissue_viewer_role.yaml => zora_clusterissue_viewer_role.yaml} (77%) rename config/rbac/{clusterscan_editor_role.yaml => zora_clusterscan_editor_role.yaml} (78%) rename config/rbac/{clusterscan_viewer_role.yaml => zora_clusterscan_viewer_role.yaml} (77%) rename config/rbac/{plugin_editor_role.yaml => zora_plugin_editor_role.yaml} (78%) rename config/rbac/{plugin_viewer_role.yaml => zora_plugin_viewer_role.yaml} (77%) rename config/rbac/{plugins_role_binding.yaml => zora_plugins_role_binding.yaml} (100%) create mode 100644 config/samples/kustomization.yaml delete mode 100644 hack/make/config.mk delete mode 100644 hack/make/misc.mk delete mode 100644 hack/patches/rbac/auth_proxy_client_clusterrole.patch delete mode 100644 hack/patches/rbac/auth_proxy_role.patch delete mode 100644 hack/patches/rbac/auth_proxy_role_binding.patch delete mode 100644 hack/patches/rbac/leader_election_role.patch delete mode 100644 hack/patches/rbac/leader_election_role_binding.patch delete mode 100644 hack/patches/rbac/role.patch delete mode 100644 hack/patches/rbac/role_binding.patch delete mode 100644 hack/patches/rbac/service_account.patch delete mode 100755 hack/scripts/gen_zora_view_kubeconfig.sh delete mode 100644 hack/scripts/m4/common_calls.sh.in delete mode 100644 hack/scripts/m4/common_calls_and_vars.sh.in delete mode 100644 hack/scripts/m4/common_create_funcs.sh.in delete mode 100644 hack/scripts/m4/common_get_funcs.sh.in delete mode 100644 hack/scripts/m4/common_opts_and_vars.sh.in delete mode 100644 hack/scripts/m4/common_setup_funcs.sh.in delete mode 100644 hack/scripts/m4/gen_zora_view_kubeconfig.sh.m4 delete mode 100644 hack/scripts/m4/targetcluster.sh.m4 delete mode 100755 hack/scripts/setup_zora_view.sh rename {controllers => internal/controller}/zora/cluster_controller.go (98%) rename {controllers => internal/controller}/zora/clusterscan_controller.go (98%) rename {controllers => internal/controller}/zora/suite_test.go (83%) rename {pkg => internal}/saas/client.go (93%) rename {pkg/payloads/v1alpha1 => internal/saas}/clusters.go (98%) rename {pkg/payloads/v1alpha1 => internal/saas}/clusters_test.go (98%) rename {pkg => internal}/saas/hooks.go (94%) rename {pkg/payloads/v1alpha1 => internal/saas}/issues.go (97%) rename {pkg/payloads/v1alpha1 => internal/saas}/issues_test.go (98%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/always_disconnected.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/always_without_metrics.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/disconnected.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/ok.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/without_metrics.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/without_provider.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/cluster/without_provider_and_metrics.yml (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/1.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/10.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/2.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/3.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/4.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/5.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/6.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/7.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/8.json (100%) rename {pkg/payloads/v1alpha1 => internal/saas}/testdata/payload/9.json (100%) delete mode 100644 pkg/apis/zz_generated.deepcopy.go rename pkg/plugins/{cronjobs => }/cronjob.go (94%) rename pkg/plugins/{errparse => }/parse.go (92%) rename pkg/plugins/{errparse => }/parse_test.go (95%) rename pkg/plugins/{errparse => }/testdata/dummy_err_1.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_1.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_2.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_3.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_4.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_5.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_6.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_7.txt (100%) rename pkg/plugins/{errparse => }/testdata/marvin_err_8.txt (100%) rename pkg/plugins/{errparse => }/testdata/popeye_err_1.txt (100%) rename pkg/plugins/{errparse => }/testdata/popeye_err_2.txt (100%) rename pkg/plugins/{errparse => }/testdata/popeye_err_3.txt (100%) rename pkg/plugins/{errparse => }/testdata/popeye_err_4.txt (100%) rename pkg/worker/{run => }/run.go (97%) rename pkg/worker/{run => }/run_test.go (99%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 08a25922..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build -on: - pull_request: - branches: [main] - push: - branches: [main] -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.17" - - name: Show Go Version - run: go version - - name: Get dependencies - run: go mod download - - - name: Run unit tests - run: make test - - name: Call build target - run: make diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e8b08946..fa75cd36 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,4 +1,4 @@ -name: Create and publish Docker images +name: docker on: workflow_dispatch: workflow_call: @@ -9,7 +9,7 @@ env: jobs: docker: - name: Build and push Docker image (${{ matrix.image }}) + name: build and push '${{ matrix.image }}' runs-on: ubuntu-latest permissions: contents: read @@ -18,28 +18,28 @@ jobs: fail-fast: false matrix: include: - - dockerfile: Dockerfile + - dockerfile: cmd/manager/Dockerfile image: operator - dockerfile: cmd/worker/Dockerfile image: worker steps: - - name: Checkout repository + - name: checkout uses: actions/checkout@v3 - - name: Set up QEMU + - name: setup qemu uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx + - name: setup docker buildx uses: docker/setup-buildx-action@v2 - - name: Log in to the Container registry + - name: login uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker + - name: metadata id: meta uses: docker/metadata-action@v4 with: @@ -51,12 +51,12 @@ jobs: type=ref,event=pr,prefix=pr- type=sha,prefix=,format=long - - name: Create Dockerfile for cross-platform support + - name: create dockerfile.cross run: | sed -e '1 s/\(^FROM\)/FROM --platform=\$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$\{BUILDPLATFORM\}/' ${{ matrix.dockerfile }} > ${{ matrix.dockerfile }}.cross cat ${{ matrix.dockerfile }}.cross - - name: Build and push Docker image + - name: build and push uses: docker/build-push-action@v3 with: platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 36350013..552e6fa9 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,4 +1,4 @@ -name: Update docs +name: docs on: workflow_dispatch: inputs: @@ -12,49 +12,51 @@ on: dev: description: 'dev' type: boolean + env: GIT_USER: "github-actions" GIT_EMAIL: "github-actions@github.com" + jobs: docs: - name: Update docs ${{ inputs.version }} + name: update docs ${{ inputs.version }} runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: checkout uses: actions/checkout@v3 - - name: Set up Python + - name: setup python uses: actions/setup-python@v4 with: python-version: '3.10' - - name: Set up Go + - name: setup go uses: actions/setup-go@v3 - - name: Install MkDocs and Mike + - name: install mkdocs and mike run: pip install mkdocs-material mike - - name: Set 'latest' alias + - name: set 'latest' alias if: inputs.latest run: echo 'alias=latest' >> $GITHUB_ENV - - name: Set 'dev' alias + - name: set 'dev' alias if: inputs.dev run: echo 'alias=dev' >> $GITHUB_ENV - - name: Fetch gh-pages branch + - name: fetch gh-pages branch run: | git config --global user.email "$GIT_EMAIL" git config --global user.name "$GIT_USER" git fetch origin gh-pages --depth=1 - - name: Mike deploy + - name: mike deploy run: | cp -f charts/zora/README.md docs/helm-chart.md cp -f charts/zora/values.yaml docs/values.yaml mike deploy --update-aliases ${{ inputs.version }} ${{ env.alias }} - - name: Update titles and push + - name: update titles and push run: | git checkout gh-pages go run update_titles.go diff --git a/.github/workflows/license.yaml b/.github/workflows/license.yaml deleted file mode 100644 index 2da423ba..00000000 --- a/.github/workflows/license.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check Copyright License Header -on: - pull_request: - branches: [main] -jobs: - license_check: - name: Check Copyright License Header - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.17" - - name: Call check-license target - run: make check-license diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 512c65d2..2dd55ac3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Publish Docker images and Helm chart +name: release on: workflow_dispatch: push: @@ -22,24 +22,24 @@ jobs: secrets: inherit goreleaser: - name: Create GitHub release runs-on: ubuntu-latest needs: [docker] steps: - - name: Checkout repository + - name: checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Fetch tags + - name: fetch tags run: git fetch --force --tags - - name: Set up Go + - name: setup go uses: actions/setup-go@v4 with: go-version: stable + cache: true - - name: Release + - name: release uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser @@ -49,16 +49,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} helm: - name: Update Helm repository runs-on: ubuntu-latest needs: [goreleaser] steps: - - name: Checkout repository + - name: checkout uses: actions/checkout@v3 with: path: main - - name: Checkout charts repository + - name: checkout charts uses: actions/checkout@v3 with: repository: undistro/charts.undistro.io @@ -67,10 +66,10 @@ jobs: token: ${{ secrets.BOT_TOKEN }} # GITHUB_TOKEN is scoped to the current repository, so we need a PAT to checkout a different repository and commit on it. path: ${{ env.CHARTS_REPOSITORY_PATH }} - - name: Sync charts + - name: sync run: rsync -avh --delete main/$CHART_PATH/ ${{ env.CHARTS_REPOSITORY_PATH }}/$CHART_PATH - - name: Commit and push + - name: commit and push working-directory: ${{ env.CHARTS_REPOSITORY_PATH }} run: | git config --global user.email "$GIT_EMAIL" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..64737758 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,27 @@ +name: test +on: + pull_request: + branches: [main] + push: + branches: [main] +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: setup go + uses: actions/setup-go@v3 + with: + go-version: "1.19" + cache: true + + - name: test + run: make test + + - name: check license headers + run: make check-license + + - name: build + run: make build diff --git a/.gitignore b/.gitignore index 27363f84..c8a4baac 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.dylib bin testbin/* +Dockerfile.cross # Test binary, build with `go test -c` *.test diff --git a/Makefile b/Makefile index 97671186..a50993b7 100644 --- a/Makefile +++ b/Makefile @@ -1,118 +1,202 @@ -include hack/make/* - -##@ Tooling Download - -controller-gen: ## Download controller-gen locally if necessary. - $(call go-install-tool,${CONTROLLER_GEN},sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0) -kustomize: ## Download kustomize locally if necessary. - $(call go-install-tool,${KUSTOMIZE},sigs.k8s.io/kustomize/kustomize/v4@v4.5.2) -envtest: ## Download envtest-setup locally if necessary. - $(call go-install-tool,${ENVTEST},sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) -addlicense: ## Download addlicense locally if necessary. - $(call go-install-tool,${ADDLICENSE},github.com/google/addlicense@latest) - +# Image URL to use all building/pushing image targets +IMG ?= controller:latest +# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. +ENVTEST_K8S_VERSION = 1.26.1 + +# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) +ifeq (,$(shell go env GOBIN)) +GOBIN=$(shell go env GOPATH)/bin +else +GOBIN=$(shell go env GOBIN) +endif + +# Setting SHELL to bash allows bash commands to be executed by recipes. +# Options are set to exit when a recipe line exits non-zero or a piped command fails. +SHELL = /usr/bin/env bash -o pipefail +.SHELLFLAGS = -ec + +.PHONY: all +all: build + +##@ General + +# The help target prints out all targets with their descriptions organized +# beneath their categories. The categories are represented by '##@' and the +# target descriptions by '##'. The awk commands is responsible for reading the +# entire set of makefiles included in this invocation, looking for lines of the +# file as xyz: ## something, and then pretty-format the target and help. Then, +# if there's a line with ##@ something, that gets pretty-printed as a category. +# More info on the usage of ANSI control characters for terminal formatting: +# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters +# More info on the awk command: +# http://linuxcommand.org/lc3_adv_awk.php + +.PHONY: help +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) ##@ Development -fmt: ## Run go fmt against code. - go fmt ./... -vet: ## Run go vet against code. - go vet ./... -test: manifests generate fmt vet envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell ${ENVTEST} use ${ENVTEST_K8S_VERSION} -p path)" go test ./... -coverprofile cover.out - -charts/zora/templates/operator/rbac.yaml: config/rbac/service_account.yaml \ - config/rbac/leader_election_role.yaml \ - config/rbac/role.yaml \ - config/rbac/auth_proxy_client_clusterrole.yaml \ - config/rbac/auth_proxy_role.yaml \ - config/rbac/leader_election_role_binding.yaml \ - config/rbac/role_binding.yaml \ - config/rbac/auth_proxy_role_binding.yaml - @ rm $@ - @ for f in $^; do \ - patch -Nfi "hack/patches/rbac/$$(basename -s '.yaml' $$f).patch" \ - --no-backup-if-mismatch \ - -p 1 -o - | sed '/#/{N; d}' >> $@; \ - echo "---" >> $@; \ - done - -manifest-consitency: charts/zora/templates/operator/rbac.yaml - -manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - ${CONTROLLER_GEN} rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases +.PHONY: manifests +manifests: controller-gen addlicense ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. + $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases @cp -r config/crd/bases/*.yaml charts/zora/crds/ - ${MAKE} manifest-consitency license + $(ADDLICENSE) -c "Undistro Authors" -l "apache" -ignore ".github/**" -ignore ".idea/**" -ignore "dist/**" -ignore "site/**" -ignore "config/**" -ignore "docs/overrides/**" -ignore "docs/stylesheets/**" . -hack/scripts/gen_zora_view_kubeconfig.sh docs/targetcluster.sh: hack/scripts/m4/* - @ m4 -I hack/scripts/m4 $(shell basename $@.m4) > $@ +.PHONY: generate +generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. + $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." -script-consitency: hack/scripts/gen_zora_view_kubeconfig.sh docs/targetcluster.sh - -generate: controller-gen script-consitency license ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - ${CONTROLLER_GEN} object:headerFile="hack/boilerplate.go.txt" paths="./..." - -clientset-gen: ## Generate clientset +PROJECT_PACKAGE ?= $(shell go list -m) +.PHONY: generate-client +generate-client: ## Generate client @rm -r pkg/clientset || echo -n @docker run -i --rm \ - -v ${PWD}:/go/src/${PROJECT_PACKAGE} \ - -e PROJECT_PACKAGE=${PROJECT_PACKAGE} \ - -e CLIENT_GENERATOR_OUT=${PROJECT_PACKAGE}/pkg \ - -e APIS_ROOT=${PROJECT_PACKAGE}/apis \ + -v $(PWD):/go/src/$(PROJECT_PACKAGE) \ + -e PROJECT_PACKAGE=$(PROJECT_PACKAGE) \ + -e CLIENT_GENERATOR_OUT=$(PROJECT_PACKAGE)/pkg \ + -e APIS_ROOT=$(PROJECT_PACKAGE)/api \ -e GROUPS_VERSION="zora:v1alpha1" \ -e GENERATION_TARGETS="client" \ -e BOILERPLATE_PATH="hack/boilerplate.go.txt" \ - quay.io/slok/kube-code-generator:v1.23.0 - - -##@ Build and Execution - -build: generate fmt vet ## Build manager binary. - go build -o bin/manager main.go - go build -o bin/worker cmd/worker/main.go + quay.io/slok/kube-code-generator:v1.26.0 -run: install manifests generate ## Run a controller from your host. - go run ./main.go -default-plugins-names ${PLUGINS} -worker-image ${WORKER_IMG} +.PHONY: generate-helm-docs +generate-helm-docs: helm-docs ## Generate documentation for helm chart. + $(HELM_DOCS) -s=file --badge-style="flat-square&color=3CA9DD" -docker-build: test ## Build manager Docker image. - docker build -t ${IMG} -f ${DOCKERFILE} . -docker-build-worker: ## Build worker Docker image. - ${MAKE} IMG=${WORKER_IMG} DOCKERFILE=cmd/worker/Dockerfile docker-build +.PHONY: fmt +fmt: ## Run go fmt against code. + go fmt ./... +.PHONY: vet +vet: ## Run go vet against code. + go vet ./... -##@ Deployment +.PHONY: check-license +check-license: ## Check license headers. + $(ADDLICENSE) -c "Undistro Authors" -l "apache" -ignore ".github/**" -ignore ".idea/**" -ignore "dist/**" -ignore "site/**" -ignore "config/**" -ignore "docs/overrides/**" -ignore "docs/stylesheets/**" -check . -install: manifests kustomize ## Install default configuration (RBAC for plugins) and CRDs on the current cluster. - ${KUSTOMIZE} build config/crd | kubectl apply -f - - @kubectl apply -f config/rbac/clusterissue_editor_role.yaml - @kubectl apply -f config/samples/zora_v1alpha1_plugin_popeye.yaml - @kubectl apply -f config/samples/zora_v1alpha1_plugin_marvin.yaml - @kubectl create -f config/rbac/plugins_role_binding.yaml || true +.PHONY: test +test: manifests generate fmt vet envtest ## Run tests. + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out -uninstall: manifests kustomize ## Uninstall CRDs from the current cluster. - ${KUSTOMIZE} build config/crd | kubectl delete --ignore-not-found=${IGNORE_NOT_FOUND} -f - +##@ Build -deploy: docker-build generate install ## Deploy controller on the current cluster. - cd config/manager && ${KUSTOMIZE} edit set image controller=${IMG} - ${KUSTOMIZE} build config/default | kubectl apply -f - -undeploy: ## Undeploy controller from current cluster. - ${KUSTOMIZE} build config/default | kubectl delete --ignore-not-found=${IGNORE_NOT_FOUND} -f - +.PHONY: build +build: manifests generate fmt vet ## Build manager and worker binaries. + go build -o bin/manager cmd/manager/main.go + go build -o bin/worker cmd/worker/main.go -gen-zora-view-kubeconfig: ## Create a service account and config RBAC for it. - ./hack/scripts/gen_zora_view_kubeconfig.sh -setup-zora-view: install ## Create and apply view secret. - ./hack/scripts/setup_zora_view.sh +.PHONY: run +run: manifests generate fmt vet ## Run a controller from your host. + go run ./cmd/manager/main.go + +# If you wish built the manager image targeting other platforms you can use the --platform flag. +# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. +# More info: https://docs.docker.com/develop/develop-images/build_enhancements/ +.PHONY: docker-build +docker-build: test ## Build docker image with the manager. + docker build -t ${IMG} . + +.PHONY: docker-push +docker-push: ## Push docker image with the manager. + docker push ${IMG} + +# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple +# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: +# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ +# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ +# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> then the export will fail) +# To properly provided solutions that supports more than one platform you should use this option. +PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le +.PHONY: docker-buildx +docker-buildx: test ## Build and push docker image for the manager for cross-platform support. + # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile + sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' cmd/manager/Dockerfile > Dockerfile.cross + - docker buildx create --name project-v3-builder + docker buildx use project-v3-builder + - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . + - docker buildx rm project-v3-builder + rm Dockerfile.cross -##@ Documentation +##@ Deployment -helm-docs: ## Generate documentation for helm charts - @docker run -it --rm \ - -v ${PWD}:/helm-docs \ - jnorwood/helm-docs:v1.8.1 \ - helm-docs -s=file --badge-style="flat-square&color=3CA9DD" +ifndef ignore-not-found + ignore-not-found = false +endif -license: addlicense ## Add license header to source files - $(call addlicense-tool,) +.PHONY: install +install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. + $(KUSTOMIZE) build config/crd | kubectl apply -f - + @kubectl apply -f config/samples/zora_v1alpha1_plugin_popeye.yaml + @kubectl apply -f config/samples/zora_v1alpha1_plugin_marvin.yaml + @kubectl apply -f config/rbac/zora_clusterissue_editor_role.yaml + @kubectl create -f config/rbac/zora_plugins_role_binding.yaml || true + +.PHONY: uninstall +uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. + $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - + +.PHONY: deploy +deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. + cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + $(KUSTOMIZE) build config/default | kubectl apply -f - + +.PHONY: template +template: manifests kustomize ## Build kustomize configurations. + $(KUSTOMIZE) build config/default + +.PHONY: undeploy +undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. + $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - + +##@ Build Dependencies + +## Location to install dependencies to +LOCALBIN ?= $(shell pwd)/bin +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +## Tool Binaries +KUSTOMIZE ?= $(LOCALBIN)/kustomize +CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen +ENVTEST ?= $(LOCALBIN)/setup-envtest +ADDLICENSE ?= $(LOCALBIN)/addlicense +HELM_DOCS ?= $(LOCALBIN)/helm-docs + +## Tool Versions +KUSTOMIZE_VERSION ?= v5.0.0 +CONTROLLER_TOOLS_VERSION ?= v0.11.3 + +KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" +.PHONY: kustomize +kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading. +$(KUSTOMIZE): $(LOCALBIN) + @if test -x $(LOCALBIN)/kustomize && ! $(LOCALBIN)/kustomize version | grep -q $(KUSTOMIZE_VERSION); then \ + echo "$(LOCALBIN)/kustomize version is not expected $(KUSTOMIZE_VERSION). Removing it before installing."; \ + rm -rf $(LOCALBIN)/kustomize; \ + fi + test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) --output install_kustomize.sh && bash install_kustomize.sh $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); rm install_kustomize.sh; } + +.PHONY: controller-gen +controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten. +$(CONTROLLER_GEN): $(LOCALBIN) + test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + +.PHONY: envtest +envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. +$(ENVTEST): $(LOCALBIN) + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + +.PHONY: addlicense +addlicense: $(ADDLICENSE) ## Download addlicense locally if necessary +$(ADDLICENSE): $(LOCALBIN) + test -s $(LOCALBIN)/addlicense || GOBIN=$(LOCALBIN) go install github.com/google/addlicense@latest + +.PHONY: helm-docs +helm-docs: $(HELM_DOCS) ## Download helm-docs if necessary +$(HELM_DOCS): $(LOCALBIN) + test -s $(LOCALBIN)/helm-docs || GOBIN=$(LOCALBIN) go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.8.1 -check-license: addlicense ## Check license header to source files - $(call addlicense-tool,"-check") diff --git a/PROJECT b/PROJECT index 992e34d9..8604c435 100644 --- a/PROJECT +++ b/PROJECT @@ -1,6 +1,6 @@ domain: undistro.io layout: -- go.kubebuilder.io/v3 +- go.kubebuilder.io/v4 multigroup: true projectName: zora repo: github.com/undistro/zora @@ -20,7 +20,7 @@ resources: domain: undistro.io group: zora kind: Plugin - path: github.com/undistro/zora/apis/zora/v1alpha1 + path: github.com/undistro/zora/api/zora/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -28,7 +28,7 @@ resources: domain: undistro.io group: zora kind: ClusterIssue - path: github.com/undistro/zora/apis/zora/v1alpha1 + path: github.com/undistro/zora/api/zora/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -37,6 +37,6 @@ resources: domain: undistro.io group: zora kind: ClusterScan - path: github.com/undistro/zora/apis/zora/v1alpha1 + path: github.com/undistro/zora/api/zora/v1alpha1 version: v1alpha1 version: "3" diff --git a/apis/zora/v1alpha1/cluster_types.go b/api/zora/v1alpha1/cluster_types.go similarity index 97% rename from apis/zora/v1alpha1/cluster_types.go rename to api/zora/v1alpha1/cluster_types.go index 3a031083..c312517e 100644 --- a/apis/zora/v1alpha1/cluster_types.go +++ b/api/zora/v1alpha1/cluster_types.go @@ -15,12 +15,12 @@ package v1alpha1 import ( - "github.com/undistro/zora/pkg/apis" - "github.com/undistro/zora/pkg/discovery" - "github.com/undistro/zora/pkg/formats" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + + "github.com/undistro/zora/pkg/discovery" + "github.com/undistro/zora/pkg/formats" ) const ( @@ -39,7 +39,7 @@ type ClusterSpec struct { // ClusterStatus defines the observed state of Cluster type ClusterStatus struct { - apis.Status `json:",inline"` + Status `json:",inline"` discovery.ClusterInfo `json:",inline"` // KubernetesVersion is the server's kubernetes version (git version). @@ -91,9 +91,9 @@ func (in *ClusterStatus) SetResources(res discovery.ClusterResources) { //+kubebuilder:printcolumn:name="Region",type="string",priority=1,JSONPath=".status.region" // Cluster is the Schema for the clusters API -//+genclient -//+genclient:onlyVerbs=list,get -//+genclient:noStatus +// +genclient +// +genclient:onlyVerbs=list,get +// +genclient:noStatus type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/apis/zora/v1alpha1/clusterissue_types.go b/api/zora/v1alpha1/clusterissue_types.go similarity index 98% rename from apis/zora/v1alpha1/clusterissue_types.go rename to api/zora/v1alpha1/clusterissue_types.go index daa254fc..0988e7d5 100644 --- a/apis/zora/v1alpha1/clusterissue_types.go +++ b/api/zora/v1alpha1/clusterissue_types.go @@ -64,8 +64,8 @@ type ClusterIssueStatus struct { //+kubebuilder:printcolumn:name="Total",type="integer",JSONPath=".spec.totalResources",priority=1 // ClusterIssue is the Schema for the clusterissues API -//+genclient -//+genclient:noStatus +// +genclient +// +genclient:noStatus type ClusterIssue struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/apis/zora/v1alpha1/clusterscan_types.go b/api/zora/v1alpha1/clusterscan_types.go similarity index 98% rename from apis/zora/v1alpha1/clusterscan_types.go rename to api/zora/v1alpha1/clusterscan_types.go index aa1e6aff..fdab5331 100644 --- a/apis/zora/v1alpha1/clusterscan_types.go +++ b/api/zora/v1alpha1/clusterscan_types.go @@ -22,8 +22,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - - "github.com/undistro/zora/pkg/apis" ) // ClusterScanSpec defines the desired state of ClusterScan @@ -84,7 +82,7 @@ func (in *PluginReference) PluginKey(defaultNamespace string) types.NamespacedNa // ClusterScanStatus defines the observed state of ClusterScan type ClusterScanStatus struct { - apis.Status `json:",inline"` + Status `json:",inline"` // Information of the last scans of plugins Plugins map[string]*PluginScanStatus `json:"plugins,omitempty"` @@ -195,7 +193,6 @@ func (in *ClusterScanStatus) LastScanIDs(successful bool) []string { return lastScans } -// +k8s:deepcopy-gen=true type PluginScanStatus struct { // Information when was the last time the job was scheduled. LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` @@ -251,9 +248,9 @@ type PluginScanStatus struct { //+kubebuilder:printcolumn:name="Next Schedule",type="string",JSONPath=".status.nextScheduleTime",priority=1 // ClusterScan is the Schema for the clusterscans API -//+genclient -//+genclient:onlyVerbs=list,get -//+genclient:noStatus +// +genclient +// +genclient:onlyVerbs=list,get +// +genclient:noStatus type ClusterScan struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/apis/zora/v1alpha1/clusterscan_types_test.go b/api/zora/v1alpha1/clusterscan_types_test.go similarity index 100% rename from apis/zora/v1alpha1/clusterscan_types_test.go rename to api/zora/v1alpha1/clusterscan_types_test.go diff --git a/apis/zora/v1alpha1/groupversion_info.go b/api/zora/v1alpha1/groupversion_info.go similarity index 95% rename from apis/zora/v1alpha1/groupversion_info.go rename to api/zora/v1alpha1/groupversion_info.go index c2882bde..8fdeedbc 100644 --- a/apis/zora/v1alpha1/groupversion_info.go +++ b/api/zora/v1alpha1/groupversion_info.go @@ -13,8 +13,8 @@ // limitations under the License. // Package v1alpha1 contains API Schema definitions for the zora v1alpha1 API group -//+kubebuilder:object:generate=true -//+groupName=zora.undistro.io +// +kubebuilder:object:generate=true +// +groupName=zora.undistro.io package v1alpha1 import ( diff --git a/apis/zora/v1alpha1/plugin_types.go b/api/zora/v1alpha1/plugin_types.go similarity index 100% rename from apis/zora/v1alpha1/plugin_types.go rename to api/zora/v1alpha1/plugin_types.go diff --git a/pkg/apis/status.go b/api/zora/v1alpha1/status.go similarity index 78% rename from pkg/apis/status.go rename to api/zora/v1alpha1/status.go index 2c22539a..9f1f9b37 100644 --- a/pkg/apis/status.go +++ b/api/zora/v1alpha1/status.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package apis +package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/meta" @@ -20,17 +20,12 @@ import ( ) // Status is the minimally expected status subresource. -// +k8s:deepcopy-gen=true type Status struct { // ObservedGeneration is the 'Generation' of the resource that // was last processed by the controller. - // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Conditions the latest available observations of a resource's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } @@ -45,9 +40,9 @@ func (s *Status) ConditionIsTrue(t string) bool { } // SetCondition sets the newCondition in conditions. -// 1. if the condition of the specified type already exists, all fields of the existing condition are updated to -// newCondition, LastTransitionTime is set to now if the new status differs from the old status -// 2. if a condition of the specified type does not exist, LastTransitionTime is set to now() if unset and newCondition is appended +// 1. if the condition of the specified type already exists, all fields of the existing condition are updated to +// newCondition, LastTransitionTime is set to now if the new status differs from the old status +// 2. if a condition of the specified type does not exist, LastTransitionTime is set to now() if unset and newCondition is appended func (s *Status) SetCondition(newCondition metav1.Condition) { if s.Conditions == nil { s.Conditions = []metav1.Condition{} diff --git a/apis/zora/v1alpha1/zz_generated.deepcopy.go b/api/zora/v1alpha1/zz_generated.deepcopy.go similarity index 96% rename from apis/zora/v1alpha1/zz_generated.deepcopy.go rename to api/zora/v1alpha1/zz_generated.deepcopy.go index f9850184..10b3e7de 100644 --- a/apis/zora/v1alpha1/zz_generated.deepcopy.go +++ b/api/zora/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ package v1alpha1 import ( "github.com/undistro/zora/pkg/discovery" "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -563,3 +564,25 @@ func (in *PluginStatus) DeepCopy() *PluginStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Status) DeepCopyInto(out *Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status. +func (in *Status) DeepCopy() *Status { + if in == nil { + return nil + } + out := new(Status) + in.DeepCopyInto(out) + return out +} diff --git a/charts/zora/Chart.yaml b/charts/zora/Chart.yaml index 0f4e5e5c..0269085e 100644 --- a/charts/zora/Chart.yaml +++ b/charts/zora/Chart.yaml @@ -17,7 +17,7 @@ name: zora description: Zora scans multiple Kubernetes clusters and reports potential issues. icon: https://zora-docs.undistro.io/assets/logo.png type: application -version: 0.5.1 -appVersion: "v0.5.1" +version: 0.5.2-rc1 +appVersion: "v0.5.2-rc1" sources: - https://github.com/undistro/zora diff --git a/charts/zora/README.md b/charts/zora/README.md index a7a14f96..6fc139a2 100644 --- a/charts/zora/README.md +++ b/charts/zora/README.md @@ -1,6 +1,6 @@ # Zora Helm Chart -![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square&color=3CA9DD) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square&color=3CA9DD) ![AppVersion: v0.5.1](https://img.shields.io/badge/AppVersion-v0.5.1-informational?style=flat-square&color=3CA9DD) +![Version: 0.5.2-rc1](https://img.shields.io/badge/Version-0.5.2--rc1-informational?style=flat-square&color=3CA9DD) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square&color=3CA9DD) ![AppVersion: v0.5.2-rc1](https://img.shields.io/badge/AppVersion-v0.5.2--rc1-informational?style=flat-square&color=3CA9DD) Zora scans multiple Kubernetes clusters and reports potential issues. @@ -12,7 +12,7 @@ To install the chart with the release name `zora`: helm repo add undistro https://charts.undistro.io --force-update helm upgrade --install zora undistro/zora \ -n zora-system \ - --version 0.5.1 \ + --version 0.5.2-rc1 \ --create-namespace --wait ``` @@ -80,9 +80,9 @@ The following table lists the configurable parameters of the Zora chart and thei | operator.serviceMonitor.enabled | bool | `false` | Specifies whether a Prometheus `ServiceMonitor` should be enabled | | operator.resources | object | `{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}` | [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers) to add to `manager` container | | operator.rbacProxy.image.repository | string | `"gcr.io/kubebuilder/kube-rbac-proxy"` | `kube-rbac-proxy` image repository | -| operator.rbacProxy.image.tag | string | `"v0.8.0"` | `kube-rbac-proxy` image tag | +| operator.rbacProxy.image.tag | string | `"v0.13.1"` | `kube-rbac-proxy` image tag | | operator.rbacProxy.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | -| operator.rbacProxy.securityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true}` | [Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context) to add to `kube-rbac-proxy` container | +| operator.rbacProxy.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}` | [Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context) to add to `kube-rbac-proxy` container | | operator.rbacProxy.resources | object | `{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"5m","memory":"64Mi"}}` | [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers) to add to `kube-rbac-proxy` container | | operator.nodeSelector | object | `{}` | [Node selection](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) to constrain a Pod to only be able to run on particular Node(s) | | operator.tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration) for pod assignment | diff --git a/charts/zora/crds/zora.undistro.io_clusterissues.yaml b/charts/zora/crds/zora.undistro.io_clusterissues.yaml index 72e0f9d0..bc78751f 100644 --- a/charts/zora/crds/zora.undistro.io_clusterissues.yaml +++ b/charts/zora/crds/zora.undistro.io_clusterissues.yaml @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusterissues.zora.undistro.io spec: @@ -113,9 +113,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/charts/zora/crds/zora.undistro.io_clusters.yaml b/charts/zora/crds/zora.undistro.io_clusters.yaml index 58cc72e8..e8fd268e 100644 --- a/charts/zora/crds/zora.undistro.io_clusters.yaml +++ b/charts/zora/crds/zora.undistro.io_clusters.yaml @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusters.zora.undistro.io spec: @@ -91,6 +91,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic type: object status: description: ClusterStatus defines the observed state of Cluster @@ -102,8 +103,8 @@ spec: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, - type FooStatus struct{ // Represents the observations of a foo's - current state. // Known .status.conditions.type are: \"Available\", + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" @@ -235,9 +236,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/charts/zora/crds/zora.undistro.io_clusterscans.yaml b/charts/zora/crds/zora.undistro.io_clusterscans.yaml index 5b296f3f..eaadaa0f 100644 --- a/charts/zora/crds/zora.undistro.io_clusterscans.yaml +++ b/charts/zora/crds/zora.undistro.io_clusterscans.yaml @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusterscans.zora.undistro.io spec: @@ -97,6 +97,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic failedScansHistoryLimit: default: 1 description: FailedScansHistoryLimit specifies the amount of failed @@ -156,6 +157,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -174,6 +176,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, @@ -199,6 +202,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -220,6 +224,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -276,8 +281,8 @@ spec: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, - type FooStatus struct{ // Represents the observations of a foo's - current state. // Known .status.conditions.type are: \"Available\", + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" @@ -438,9 +443,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/charts/zora/crds/zora.undistro.io_plugins.yaml b/charts/zora/crds/zora.undistro.io_plugins.yaml index 2ccd11fb..88b72df1 100644 --- a/charts/zora/crds/zora.undistro.io_plugins.yaml +++ b/charts/zora/crds/zora.undistro.io_plugins.yaml @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: plugins.zora.undistro.io spec: @@ -124,6 +124,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -141,6 +142,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -165,6 +167,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -183,6 +186,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -209,6 +213,7 @@ spec: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. @@ -224,6 +229,7 @@ spec: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -238,6 +244,26 @@ spec: description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -433,9 +459,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/charts/zora/values.yaml b/charts/zora/values.yaml index c3184822..15daca48 100644 --- a/charts/zora/values.yaml +++ b/charts/zora/values.yaml @@ -98,13 +98,16 @@ operator: # -- `kube-rbac-proxy` image repository repository: gcr.io/kubebuilder/kube-rbac-proxy # -- `kube-rbac-proxy` image tag - tag: v0.8.0 + tag: v0.13.1 # -- Image pull policy pullPolicy: IfNotPresent # -- [Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context) to add to `kube-rbac-proxy` container securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true + capabilities: + drop: + - ALL # -- [Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers) to add to `kube-rbac-proxy` container resources: limits: diff --git a/Dockerfile b/cmd/manager/Dockerfile similarity index 85% rename from Dockerfile rename to cmd/manager/Dockerfile index 05cea773..f6c647f2 100644 --- a/Dockerfile +++ b/cmd/manager/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.17 as builder +FROM golang:1.19 as builder ARG TARGETOS ARG TARGETARCH @@ -21,12 +21,12 @@ COPY go.mod go.mod COPY go.sum go.sum RUN go mod download -COPY main.go main.go -COPY apis/ apis/ -COPY controllers/ controllers/ +COPY cmd/manager/main.go cmd/manager/main.go +COPY api/ api/ +COPY internal/ internal/ COPY pkg/ pkg/ -RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/manager/main.go FROM gcr.io/distroless/static:nonroot WORKDIR / diff --git a/main.go b/cmd/manager/main.go similarity index 95% rename from main.go rename to cmd/manager/main.go index 0d12fe64..2bc569ad 100644 --- a/main.go +++ b/cmd/manager/main.go @@ -21,21 +21,20 @@ import ( "strings" "time" - "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth" - "github.com/undistro/zora/pkg/saas" - "go.uber.org/zap/zapcore" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/kubernetes" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - zorav1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" - zoracontrollers "github.com/undistro/zora/controllers/zora" + zorav1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" + zoracontroller "github.com/undistro/zora/internal/controller/zora" + "github.com/undistro/zora/internal/saas" //+kubebuilder:scaffold:imports ) @@ -115,7 +114,7 @@ func main() { onClusterScanDelete = saas.DeleteClusterScanHook(saasClient, mgr.GetClient()) } - if err = (&zoracontrollers.ClusterReconciler{ + if err = (&zoracontroller.ClusterReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("cluster-controller"), @@ -133,7 +132,7 @@ func main() { os.Exit(1) } - if err = (&zoracontrollers.ClusterScanReconciler{ + if err = (&zoracontroller.ClusterScanReconciler{ Client: mgr.GetClient(), K8sClient: kcli, Scheme: mgr.GetScheme(), @@ -149,7 +148,6 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "ClusterScan") os.Exit(1) } - //+kubebuilder:scaffold:builder if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { diff --git a/cmd/worker/Dockerfile b/cmd/worker/Dockerfile index 24d067a8..34bc5bff 100644 --- a/cmd/worker/Dockerfile +++ b/cmd/worker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.17 as builder +FROM golang:1.19 as builder ARG TARGETOS ARG TARGETARCH @@ -22,7 +22,7 @@ COPY go.sum go.sum RUN go mod download COPY cmd/worker/main.go cmd/worker/main.go -COPY apis/ apis/ +COPY api/ api/ COPY pkg/ pkg/ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o worker cmd/worker/main.go diff --git a/cmd/worker/main.go b/cmd/worker/main.go index 72b2a2f4..a9d16174 100644 --- a/cmd/worker/main.go +++ b/cmd/worker/main.go @@ -22,7 +22,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/undistro/zora/pkg/worker/run" + "github.com/undistro/zora/pkg/worker" ) var log = ctrl.Log.WithName("worker") @@ -35,7 +35,7 @@ func main() { ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) log.Info("Starting worker") - if err := run.Run(log); err != nil { + if err := worker.Run(log); err != nil { log.Info("Worker crashed") panic(err) } diff --git a/config/crd/bases/zora.undistro.io_clusterissues.yaml b/config/crd/bases/zora.undistro.io_clusterissues.yaml index 72e0f9d0..14bcd3f6 100644 --- a/config/crd/bases/zora.undistro.io_clusterissues.yaml +++ b/config/crd/bases/zora.undistro.io_clusterissues.yaml @@ -1,23 +1,9 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusterissues.zora.undistro.io spec: @@ -113,9 +99,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/zora.undistro.io_clusters.yaml b/config/crd/bases/zora.undistro.io_clusters.yaml index 58cc72e8..d9675d2d 100644 --- a/config/crd/bases/zora.undistro.io_clusters.yaml +++ b/config/crd/bases/zora.undistro.io_clusters.yaml @@ -1,23 +1,9 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusters.zora.undistro.io spec: @@ -91,6 +77,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic type: object status: description: ClusterStatus defines the observed state of Cluster @@ -102,8 +89,8 @@ spec: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, - type FooStatus struct{ // Represents the observations of a foo's - current state. // Known .status.conditions.type are: \"Available\", + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" @@ -235,9 +222,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/zora.undistro.io_clusterscans.yaml b/config/crd/bases/zora.undistro.io_clusterscans.yaml index 5b296f3f..8b936dcc 100644 --- a/config/crd/bases/zora.undistro.io_clusterscans.yaml +++ b/config/crd/bases/zora.undistro.io_clusterscans.yaml @@ -1,23 +1,9 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: clusterscans.zora.undistro.io spec: @@ -97,6 +83,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic failedScansHistoryLimit: default: 1 description: FailedScansHistoryLimit specifies the amount of failed @@ -156,6 +143,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -174,6 +162,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, @@ -199,6 +188,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -220,6 +210,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -276,8 +267,8 @@ spec: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, - type FooStatus struct{ // Represents the observations of a foo's - current state. // Known .status.conditions.type are: \"Available\", + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" @@ -438,9 +429,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/zora.undistro.io_plugins.yaml b/config/crd/bases/zora.undistro.io_plugins.yaml index 2ccd11fb..e23c1b32 100644 --- a/config/crd/bases/zora.undistro.io_plugins.yaml +++ b/config/crd/bases/zora.undistro.io_plugins.yaml @@ -1,23 +1,9 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: plugins.zora.undistro.io spec: @@ -124,6 +110,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -141,6 +128,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -165,6 +153,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -183,6 +172,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -209,6 +199,7 @@ spec: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. @@ -224,6 +215,7 @@ spec: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -238,6 +230,26 @@ spec: description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -433,9 +445,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 451fe475..86d8392b 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # This kustomization.yaml is not intended to be run by itself, # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default diff --git a/config/crd/kustomizeconfig.yaml b/config/crd/kustomizeconfig.yaml index 3fdf520f..ec5c150a 100644 --- a/config/crd/kustomizeconfig.yaml +++ b/config/crd/kustomizeconfig.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # This file is for teaching kustomize how to substitute name and namespace reference in CRD nameReference: - kind: Service diff --git a/config/crd/patches/cainjection_in_clusterissues.yaml b/config/crd/patches/cainjection_in_clusterissues.yaml index a6c96db4..cab731ed 100644 --- a/config/crd/patches/cainjection_in_clusterissues.yaml +++ b/config/crd/patches/cainjection_in_clusterissues.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch adds a directive for certmanager to inject CA into the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/cainjection_in_clusters.yaml b/config/crd/patches/cainjection_in_clusters.yaml index c1dd4493..4885e603 100644 --- a/config/crd/patches/cainjection_in_clusters.yaml +++ b/config/crd/patches/cainjection_in_clusters.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch adds a directive for certmanager to inject CA into the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/cainjection_in_clusterscans.yaml b/config/crd/patches/cainjection_in_clusterscans.yaml index 0df39f92..9874020f 100644 --- a/config/crd/patches/cainjection_in_clusterscans.yaml +++ b/config/crd/patches/cainjection_in_clusterscans.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch adds a directive for certmanager to inject CA into the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/cainjection_in_plugins.yaml b/config/crd/patches/cainjection_in_plugins.yaml index f31cf970..f75ae0c9 100644 --- a/config/crd/patches/cainjection_in_plugins.yaml +++ b/config/crd/patches/cainjection_in_plugins.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch adds a directive for certmanager to inject CA into the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/webhook_in_clusterissues.yaml b/config/crd/patches/webhook_in_clusterissues.yaml index 3b79e66d..34c3858c 100644 --- a/config/crd/patches/webhook_in_clusterissues.yaml +++ b/config/crd/patches/webhook_in_clusterissues.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch enables a conversion webhook for the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/webhook_in_clusters.yaml b/config/crd/patches/webhook_in_clusters.yaml index a69fe080..6158ce90 100644 --- a/config/crd/patches/webhook_in_clusters.yaml +++ b/config/crd/patches/webhook_in_clusters.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch enables a conversion webhook for the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/webhook_in_clusterscans.yaml b/config/crd/patches/webhook_in_clusterscans.yaml index 61980dc2..07761c33 100644 --- a/config/crd/patches/webhook_in_clusterscans.yaml +++ b/config/crd/patches/webhook_in_clusterscans.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch enables a conversion webhook for the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/crd/patches/webhook_in_plugins.yaml b/config/crd/patches/webhook_in_plugins.yaml index e5d6d0b7..93055a8f 100644 --- a/config/crd/patches/webhook_in_plugins.yaml +++ b/config/crd/patches/webhook_in_plugins.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # The following patch enables a conversion webhook for the CRD apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 8a7cd8bd..2d146a0f 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Adds namespace to all resources. namespace: zora-system @@ -23,10 +9,12 @@ namespace: zora-system namePrefix: zora- # Labels to add to all resources and selectors. -#commonLabels: -# someName: someValue +#labels: +#- includeSelectors: true +# pairs: +# someName: someValue -bases: +resources: - ../crd - ../rbac - ../manager @@ -44,9 +32,7 @@ patchesStrategicMerge: # endpoint w/o any authn/z, please comment the following line. - manager_auth_proxy_patch.yaml -# Mount the controller config file for loading manager configurations -# through a ComponentConfig type -#- manager_config_patch.yaml + # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml @@ -57,32 +43,102 @@ patchesStrategicMerge: # 'CERTMANAGER' needs to be enabled to use ca injection #- webhookcainjection_patch.yaml -# the following config is for teaching kustomize how to do var substitution -vars: # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. -#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1 -# name: serving-cert # this name should match the one in certificate.yaml -# fieldref: -# fieldpath: metadata.namespace -#- name: CERTIFICATE_NAME -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1 -# name: serving-cert # this name should match the one in certificate.yaml -#- name: SERVICE_NAMESPACE # namespace of the service -# objref: -# kind: Service -# version: v1 -# name: webhook-service -# fieldref: -# fieldpath: metadata.namespace -#- name: SERVICE_NAME -# objref: -# kind: Service -# version: v1 -# name: webhook-service +# Uncomment the following replacements to add the cert-manager CA injection annotations +#replacements: +# - source: # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs +# kind: Certificate +# group: cert-manager.io +# version: v1 +# name: serving-cert # this name should match the one in certificate.yaml +# fieldPath: .metadata.namespace # namespace of the certificate CR +# targets: +# - select: +# kind: ValidatingWebhookConfiguration +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 0 +# create: true +# - select: +# kind: MutatingWebhookConfiguration +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 0 +# create: true +# - select: +# kind: CustomResourceDefinition +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 0 +# create: true +# - source: +# kind: Certificate +# group: cert-manager.io +# version: v1 +# name: serving-cert # this name should match the one in certificate.yaml +# fieldPath: .metadata.name +# targets: +# - select: +# kind: ValidatingWebhookConfiguration +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 1 +# create: true +# - select: +# kind: MutatingWebhookConfiguration +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 1 +# create: true +# - select: +# kind: CustomResourceDefinition +# fieldPaths: +# - .metadata.annotations.[cert-manager.io/inject-ca-from] +# options: +# delimiter: '/' +# index: 1 +# create: true +# - source: # Add cert-manager annotation to the webhook Service +# kind: Service +# version: v1 +# name: webhook-service +# fieldPath: .metadata.name # namespace of the service +# targets: +# - select: +# kind: Certificate +# group: cert-manager.io +# version: v1 +# fieldPaths: +# - .spec.dnsNames.0 +# - .spec.dnsNames.1 +# options: +# delimiter: '.' +# index: 0 +# create: true +# - source: +# kind: Service +# version: v1 +# name: webhook-service +# fieldPath: .metadata.namespace # namespace of the service +# targets: +# - select: +# kind: Certificate +# group: cert-manager.io +# version: v1 +# fieldPaths: +# - .spec.dnsNames.0 +# - .spec.dnsNames.1 +# options: +# delimiter: '.' +# index: 1 +# create: true diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index b4db887c..352b2e31 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # This patch inject a sidecar container which is a HTTP proxy for the # controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. apiVersion: apps/v1 @@ -24,7 +10,12 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" diff --git a/config/default/manager_config_patch.yaml b/config/default/manager_config_patch.yaml index 2633ea20..f6f58916 100644 --- a/config/default/manager_config_patch.yaml +++ b/config/default/manager_config_patch.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: apps/v1 kind: Deployment metadata: @@ -22,13 +8,3 @@ spec: spec: containers: - name: manager - args: - - "--config=controller_manager_config.yaml" - volumeMounts: - - name: manager-config - mountPath: /controller_manager_config.yaml - subPath: controller_manager_config.yaml - volumes: - - name: manager-config - configMap: - name: manager-config diff --git a/config/manager/controller_manager_config.yaml b/config/manager/controller_manager_config.yaml deleted file mode 100644 index 420fca87..00000000 --- a/config/manager/controller_manager_config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 -kind: ControllerManagerConfig -health: - healthProbeBindAddress: :8081 -metrics: - bindAddress: 127.0.0.1:8080 -webhook: - port: 9443 -leaderElection: - leaderElect: true - resourceName: e0f4eef4.zora.undistro.io diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index e18b0e37..5c5f0b84 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,30 +1,2 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - resources: - manager.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- files: - - controller_manager_config.yaml - name: manager-config -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: localhost:5000/operator - newTag: latest diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 43ec3d1e..714456f0 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -1,22 +1,14 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: v1 kind: Namespace metadata: labels: control-plane: controller-manager + app.kubernetes.io/name: namespace + app.kubernetes.io/instance: system + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: system --- apiVersion: apps/v1 @@ -26,6 +18,12 @@ metadata: namespace: system labels: control-plane: controller-manager + app.kubernetes.io/name: deployment + app.kubernetes.io/instance: controller-manager + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize spec: selector: matchLabels: @@ -38,8 +36,35 @@ spec: labels: control-plane: controller-manager spec: + # Uncomment the following code to configure the nodeAffinity expression + # according to the platforms which are supported by your solution. + # It is considered best practice to support multiple architectures. You can + # build your manager image using the makefile target docker-buildx. + # affinity: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/arch + # operator: In + # values: + # - amd64 + # - arm64 + # - ppc64le + # - s390x + # - key: kubernetes.io/os + # operator: In + # values: + # - linux securityContext: runAsNonRoot: true + # For common cases that do not require escalating privileges + # it is recommended to ensure that all your Pods/Containers are restrictive. + # More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted + # Please uncomment the following code if your project does NOT have to work on old Kubernetes + # versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ). + # seccompProfile: + # type: RuntimeDefault containers: - command: - /manager @@ -49,6 +74,9 @@ spec: name: manager securityContext: allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" livenessProbe: httpGet: path: /healthz @@ -61,8 +89,6 @@ spec: port: 8081 initialDelaySeconds: 5 periodSeconds: 10 - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: cpu: 500m diff --git a/config/prometheus/kustomization.yaml b/config/prometheus/kustomization.yaml index 45149ce8..ed137168 100644 --- a/config/prometheus/kustomization.yaml +++ b/config/prometheus/kustomization.yaml @@ -1,16 +1,2 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - resources: - monitor.yaml diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index c330212a..0c7d9b8e 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -1,17 +1,3 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Prometheus Monitor Service (Metrics) apiVersion: monitoring.coreos.com/v1 @@ -19,6 +5,12 @@ kind: ServiceMonitor metadata: labels: control-plane: controller-manager + app.kubernetes.io/name: servicemonitor + app.kubernetes.io/instance: controller-manager-metrics-monitor + app.kubernetes.io/component: metrics + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system spec: diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index 3023cc77..9a844fd5 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -15,6 +15,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: metrics-reader + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: - nonResourceURLs: diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml index 35a99e17..6e4f72e7 100644 --- a/config/rbac/auth_proxy_role.yaml +++ b/config/rbac/auth_proxy_role.yaml @@ -15,6 +15,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: proxy-role + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: proxy-role rules: - apiGroups: diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 01c15dbf..4a28c193 100644 --- a/config/rbac/auth_proxy_role_binding.yaml +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -15,6 +15,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: + labels: + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/instance: proxy-rolebinding + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 5961fdaa..cc35b8da 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -17,6 +17,12 @@ kind: Service metadata: labels: control-plane: controller-manager + app.kubernetes.io/name: service + app.kubernetes.io/instance: controller-manager-metrics-service + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system spec: diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index 128db712..362fd0c4 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: + labels: + app.kubernetes.io/name: role + app.kubernetes.io/instance: leader-election-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: - apiGroups: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 88e0955b..314a8be9 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -15,6 +15,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: + labels: + app.kubernetes.io/name: rolebinding + app.kubernetes.io/instance: leader-election-rolebinding + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 71402c0c..b2751021 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,17 +1,3 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 80a1f6ef..b697d33a 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -15,6 +15,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: + labels: + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/instance: manager-rolebinding + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index e9679712..704b5874 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -15,5 +15,12 @@ apiVersion: v1 kind: ServiceAccount metadata: + labels: + app.kubernetes.io/name: serviceaccount + app.kubernetes.io/instance: controller-manager-sa + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/rbac/cluster_editor_role.yaml b/config/rbac/zora_cluster_editor_role.yaml similarity index 78% rename from config/rbac/cluster_editor_role.yaml rename to config/rbac/zora_cluster_editor_role.yaml index 5f2909b2..d9f5972c 100644 --- a/config/rbac/cluster_editor_role.yaml +++ b/config/rbac/zora_cluster_editor_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: cluster-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: cluster-editor-role rules: - apiGroups: diff --git a/config/rbac/cluster_viewer_role.yaml b/config/rbac/zora_cluster_viewer_role.yaml similarity index 77% rename from config/rbac/cluster_viewer_role.yaml rename to config/rbac/zora_cluster_viewer_role.yaml index 1c0cd197..ed1739e0 100644 --- a/config/rbac/cluster_viewer_role.yaml +++ b/config/rbac/zora_cluster_viewer_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: cluster-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: cluster-viewer-role rules: - apiGroups: diff --git a/config/rbac/clusterissue_editor_role.yaml b/config/rbac/zora_clusterissue_editor_role.yaml similarity index 76% rename from config/rbac/clusterissue_editor_role.yaml rename to config/rbac/zora_clusterissue_editor_role.yaml index d2d04f85..27625472 100644 --- a/config/rbac/clusterissue_editor_role.yaml +++ b/config/rbac/zora_clusterissue_editor_role.yaml @@ -16,7 +16,14 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: clusterissues-editor + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: clusterissue-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize + name: clusterissue-editor-role rules: - apiGroups: - zora.undistro.io diff --git a/config/rbac/clusterissue_viewer_role.yaml b/config/rbac/zora_clusterissue_viewer_role.yaml similarity index 77% rename from config/rbac/clusterissue_viewer_role.yaml rename to config/rbac/zora_clusterissue_viewer_role.yaml index bc9fb9e9..6d554d19 100644 --- a/config/rbac/clusterissue_viewer_role.yaml +++ b/config/rbac/zora_clusterissue_viewer_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: clusterissue-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: clusterissue-viewer-role rules: - apiGroups: diff --git a/config/rbac/clusterscan_editor_role.yaml b/config/rbac/zora_clusterscan_editor_role.yaml similarity index 78% rename from config/rbac/clusterscan_editor_role.yaml rename to config/rbac/zora_clusterscan_editor_role.yaml index 9b10a903..f42c6ff3 100644 --- a/config/rbac/clusterscan_editor_role.yaml +++ b/config/rbac/zora_clusterscan_editor_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: clusterscan-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: clusterscan-editor-role rules: - apiGroups: diff --git a/config/rbac/clusterscan_viewer_role.yaml b/config/rbac/zora_clusterscan_viewer_role.yaml similarity index 77% rename from config/rbac/clusterscan_viewer_role.yaml rename to config/rbac/zora_clusterscan_viewer_role.yaml index 06283228..7138f59d 100644 --- a/config/rbac/clusterscan_viewer_role.yaml +++ b/config/rbac/zora_clusterscan_viewer_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: clusterscan-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: clusterscan-viewer-role rules: - apiGroups: diff --git a/config/rbac/plugin_editor_role.yaml b/config/rbac/zora_plugin_editor_role.yaml similarity index 78% rename from config/rbac/plugin_editor_role.yaml rename to config/rbac/zora_plugin_editor_role.yaml index 15529b25..ee34e7b1 100644 --- a/config/rbac/plugin_editor_role.yaml +++ b/config/rbac/zora_plugin_editor_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: plugin-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: plugin-editor-role rules: - apiGroups: diff --git a/config/rbac/plugin_viewer_role.yaml b/config/rbac/zora_plugin_viewer_role.yaml similarity index 77% rename from config/rbac/plugin_viewer_role.yaml rename to config/rbac/zora_plugin_viewer_role.yaml index e1a84cab..3448711e 100644 --- a/config/rbac/plugin_viewer_role.yaml +++ b/config/rbac/zora_plugin_viewer_role.yaml @@ -16,6 +16,13 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: plugin-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: zora + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize name: plugin-viewer-role rules: - apiGroups: diff --git a/config/rbac/plugins_role_binding.yaml b/config/rbac/zora_plugins_role_binding.yaml similarity index 100% rename from config/rbac/plugins_role_binding.yaml rename to config/rbac/zora_plugins_role_binding.yaml diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml new file mode 100644 index 00000000..7855e77d --- /dev/null +++ b/config/samples/kustomization.yaml @@ -0,0 +1,7 @@ +## Append samples of your project ## +resources: +- zora_v1alpha1_cluster.yaml +- zora_v1alpha1_plugin.yaml +- zora_v1alpha1_clusterissue.yaml +- zora_v1alpha1_clusterscan.yaml +#+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/zora_v1alpha1_cluster.yaml b/config/samples/zora_v1alpha1_cluster.yaml index dd728e93..c7eb6b81 100644 --- a/config/samples/zora_v1alpha1_cluster.yaml +++ b/config/samples/zora_v1alpha1_cluster.yaml @@ -1,20 +1,12 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: zora.undistro.io/v1alpha1 kind: Cluster metadata: + labels: + app.kubernetes.io/name: cluster + app.kubernetes.io/instance: mycluster + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: zora name: mycluster spec: kubeconfigRef: diff --git a/config/samples/zora_v1alpha1_clusterissue.yaml b/config/samples/zora_v1alpha1_clusterissue.yaml index d1a4956f..d5c3bcdd 100644 --- a/config/samples/zora_v1alpha1_clusterissue.yaml +++ b/config/samples/zora_v1alpha1_clusterissue.yaml @@ -1,44 +1,24 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: zora.undistro.io/v1alpha1 kind: ClusterIssue metadata: - name: mycluster-pop-106 labels: + category: Security cluster: mycluster - id: POP-106 - severity: Medium - category: Container + id: M-102 + plugin: marvin + scanID: b8622b8b-8be0-444c-8aaa-d67d3ac7bfd3 + severity: High + name: mycluster-m-102-d67d3ac7bfd3 + namespace: zora-system spec: + category: Security cluster: mycluster - id: POP-106 - message: No resources requests/limits defined - severity: Medium - category: Container - totalResources: 10 + id: M-102 + message: Privileged container resources: apps/v1/daemonsets: - - kube-system/aws-node - apps/v1/deployments: - - kube-system/cluster-autoscaler-aws-cluster-autoscaler - - cert-manager/cert-manager - - cert-manager/cert-manager-cainjector - - cert-manager/cert-manager-webhook - - kube-system/metrics-server + - kube-system/kube-proxy v1/pods: - - kube-system/aws-node-xls4r - - kube-system/cluster-autoscaler-aws-cluster-autoscaler-6549789d78-bfjdp - - kube-system/metrics-server-694d47d564-zxpwb - - kube-system/aws-node-5qb87 + - kube-system/kube-proxy-ggxqd + severity: High + url: https://kubernetes.io/docs/concepts/security/pod-security-standards/#baseline diff --git a/config/samples/zora_v1alpha1_clusterscan.yaml b/config/samples/zora_v1alpha1_clusterscan.yaml index 00bc3b5e..a013728b 100644 --- a/config/samples/zora_v1alpha1_clusterscan.yaml +++ b/config/samples/zora_v1alpha1_clusterscan.yaml @@ -1,20 +1,12 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: zora.undistro.io/v1alpha1 kind: ClusterScan metadata: + labels: + app.kubernetes.io/name: clusterscan + app.kubernetes.io/instance: mycluster + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: zora name: mycluster spec: clusterRef: diff --git a/config/samples/zora_v1alpha1_plugin_marvin.yaml b/config/samples/zora_v1alpha1_plugin_marvin.yaml index d572997c..93073bc2 100644 --- a/config/samples/zora_v1alpha1_plugin_marvin.yaml +++ b/config/samples/zora_v1alpha1_plugin_marvin.yaml @@ -1,20 +1,12 @@ -# Copyright 2023 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: zora.undistro.io/v1alpha1 kind: Plugin metadata: + labels: + app.kubernetes.io/name: plugin + app.kubernetes.io/instance: marvin + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: zora name: marvin spec: image: ghcr.io/undistro/marvin:v0.1.4 diff --git a/config/samples/zora_v1alpha1_plugin_popeye.yaml b/config/samples/zora_v1alpha1_plugin_popeye.yaml index ab6ee643..ab498858 100644 --- a/config/samples/zora_v1alpha1_plugin_popeye.yaml +++ b/config/samples/zora_v1alpha1_plugin_popeye.yaml @@ -1,20 +1,12 @@ -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - apiVersion: zora.undistro.io/v1alpha1 kind: Plugin metadata: + labels: + app.kubernetes.io/name: plugin + app.kubernetes.io/instance: popeye + app.kubernetes.io/part-of: zora + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: zora name: popeye spec: image: ghcr.io/undistro/popeye:pr252 diff --git a/go.mod b/go.mod index b3f2b938..1ba33bf1 100644 --- a/go.mod +++ b/go.mod @@ -1,76 +1,73 @@ module github.com/undistro/zora -go 1.17 +go 1.19 require ( - github.com/go-logr/logr v1.2.0 - github.com/google/go-cmp v0.5.5 - github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.17.0 + github.com/go-logr/logr v1.2.3 + github.com/google/go-cmp v0.5.9 + github.com/onsi/ginkgo/v2 v2.6.0 + github.com/onsi/gomega v1.24.1 github.com/robfig/cron/v3 v3.0.1 - go.uber.org/zap v1.19.1 - k8s.io/api v0.23.5 - k8s.io/apimachinery v0.23.5 - k8s.io/client-go v0.23.5 - k8s.io/metrics v0.23.5 - k8s.io/utils v0.0.0-20211116205334-6203023598ed - sigs.k8s.io/controller-runtime v0.11.0 + go.uber.org/zap v1.24.0 + k8s.io/api v0.26.1 + k8s.io/apimachinery v0.26.1 + k8s.io/client-go v0.26.1 + k8s.io/metrics v0.26.1 + k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 + sigs.k8s.io/controller-runtime v0.14.4 sigs.k8s.io/yaml v1.3.0 ) require ( - cloud.google.com/go v0.81.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.18 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/go-logr/zapr v1.2.0 // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nxadm/tail v1.4.8 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.11.1 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.28.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.1.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect - k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.0 // indirect - k8s.io/klog/v2 v2.30.0 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/component-base v0.26.1 // indirect + k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/go.sum b/go.sum index 64b64c13..e44e2e92 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -27,7 +21,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -38,144 +31,76 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -188,7 +113,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -204,14 +128,12 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -219,17 +141,15 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -237,57 +157,18 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -297,16 +178,12 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -314,28 +191,13 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -343,102 +205,56 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= +github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -447,75 +263,32 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -538,8 +311,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -548,17 +319,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -570,7 +333,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -581,27 +343,14 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -609,16 +358,9 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -629,14 +371,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -647,11 +383,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -666,45 +398,23 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -712,40 +422,31 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -765,7 +466,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -773,22 +473,10 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= @@ -808,12 +496,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -843,30 +525,15 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -879,16 +546,6 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -901,8 +558,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -910,20 +567,10 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -933,10 +580,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -944,48 +589,32 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= -k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= -k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= -k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= -k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= -k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= -k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= -k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/metrics v0.23.5 h1:u+3oGwdUWr30LT2v6MHdSJQ4Pbht9s0cVIWyuY5nf9c= -k8s.io/metrics v0.23.5/go.mod h1:WNAtV2a5BYbmDS8+7jSqYYV6E3efuGTpIwJ8PTD1wgs= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= +k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= +k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= +k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= +k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= +k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= +k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/metrics v0.26.1 h1:iB+QdMLa2V70a7zb0XYEcaUpPM0y+p4fZN0UtxcPHLk= +k8s.io/metrics v0.26.1/go.mod h1:fMeLXmK/xgvckFG63GJ0kDjFiQH7P0Dpi5Lvhlo5DXE= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/hack/make/config.mk b/hack/make/config.mk deleted file mode 100644 index 73dc8cc1..00000000 --- a/hack/make/config.mk +++ /dev/null @@ -1,32 +0,0 @@ -# Docker -TAG ?= latest -IMG ?= operator:${TAG} -WORKER_IMG ?= worker:${TAG} -DOCKERFILE ?= Dockerfile - -# Commands -# Requirement for 'setup-envtest.sh' in the test target. -SHELL = /bin/bash -o pipefail -.SHELLFLAGS = -ec -IGNORE_NOT_FOUND ?= true - -ifeq (,$(shell go env GOBIN)) - GOBIN=$(shell go env GOPATH)/bin -else - GOBIN=$(shell go env GOBIN) -endif - -# Code Generation -PROJECT_ROOT := $(shell git rev-parse --show-toplevel) -PROJECT_PACKAGE ?= $(shell go list -m) -CONTROLLER_GEN ?= $(shell pwd)/bin/controller-gen -KUSTOMIZE ?= $(shell pwd)/bin/kustomize -ADDLICENSE ?= $(shell pwd)/bin/addlicense - -# Tests -# Kubebuilder assets required by . -ENVTEST ?= $(shell pwd)/bin/setup-envtest -ENVTEST_K8S_VERSION = 1.23 - -# Execution -PLUGINS ?= popeye diff --git a/hack/make/misc.mk b/hack/make/misc.mk deleted file mode 100644 index 27a1096a..00000000 --- a/hack/make/misc.mk +++ /dev/null @@ -1,68 +0,0 @@ -.DEFAULT_GOAL = build - -.PHONY: default \ - controller-gen \ - kustomize \ - envtest \ - fmt \ - vet \ - test \ - manifest-consistency \ - manifests \ - script-consistency \ - generate \ - clientset-gen \ - build \ - run \ - docker-build \ - docker-build-worker \ - docker-push \ - install \ - uninstall \ - deploy \ - undeploy \ - gen-zora-view-kubeconfig \ - setup-zora-view \ - helm-docs - - -# The help target prints out all targets with their descriptions organized -# beneath their categories. The categories are represented by '##@' and the -# target descriptions by '##'. The awk commands is responsible for reading the -# entire set of makefiles included in this invocation, looking for lines of the -# file as xyz: ## something, and then pretty-format the target and help. Then, -# if there's a line with ##@ something, that gets pretty-printed as a category. -# More info on the usage of ANSI control characters for terminal formatting: -# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters -# More info on the awk command: -# http://linuxcommand.org/lc3_adv_awk.php -help: ## Display this help. - @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) - - -# go-install-tool will run "go install" for packages passed as arg <$2> and -# install them to the location passed on arg <$1>. -define go-install-tool - @ test -f $(1) || { \ - set -e ;\ - TMP_DIR=$$(mktemp -d) ;\ - cd $$TMP_DIR ;\ - go mod init tmp ;\ - echo "Downloading $(2)" ;\ - GOBIN=$(PROJECT_ROOT)/bin go install $(2) ;\ - rm -rf $$TMP_DIR ;\ - } -endef - -define addlicense-tool - $(ADDLICENSE) \ - -c "Undistro Authors" \ - -l "apache" \ - -ignore "**/*.css" \ - -ignore "**/*.html" \ - -ignore ".github/**" \ - -ignore ".idea/**" \ - -v \ - $(1) \ - . -endef diff --git a/hack/patches/rbac/auth_proxy_client_clusterrole.patch b/hack/patches/rbac/auth_proxy_client_clusterrole.patch deleted file mode 100644 index 9db88e51..00000000 --- a/hack/patches/rbac/auth_proxy_client_clusterrole.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- a/config/rbac/auth_proxy_client_clusterrole.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/auth_proxy_client_clusterrole.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -3,3 +3,3 @@ - metadata: -- name: metrics-reader -+ name: {{ include "zora.operatorServiceAccountName" . }}-metrics-reader - rules: diff --git a/hack/patches/rbac/auth_proxy_role.patch b/hack/patches/rbac/auth_proxy_role.patch deleted file mode 100644 index 907c820d..00000000 --- a/hack/patches/rbac/auth_proxy_role.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- a/config/rbac/auth_proxy_role.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/auth_proxy_role.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -3,3 +3,3 @@ - metadata: -- name: proxy-role -+ name: {{ include "zora.operatorServiceAccountName" . }}-proxy - rules: diff --git a/hack/patches/rbac/auth_proxy_role_binding.patch b/hack/patches/rbac/auth_proxy_role_binding.patch deleted file mode 100644 index 964dd882..00000000 --- a/hack/patches/rbac/auth_proxy_role_binding.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/config/rbac/auth_proxy_role_binding.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/auth_proxy_role_binding.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -3,3 +3,3 @@ - metadata: -- name: proxy-rolebinding -+ name: {{ include "zora.operatorServiceAccountName" . }}-proxy - roleRef: -@@ -7,6 +7,7 @@ - kind: ClusterRole -- name: proxy-role -+ name: {{ include "zora.operatorServiceAccountName" . }}-proxy - subjects: - - kind: ServiceAccount -- name: controller-manager -- namespace: system -+ name: {{ include "zora.operatorServiceAccountName" . }} -+ namespace: {{ .Release.Namespace }} -+{{- end }} diff --git a/hack/patches/rbac/leader_election_role.patch b/hack/patches/rbac/leader_election_role.patch deleted file mode 100644 index e5dadcfc..00000000 --- a/hack/patches/rbac/leader_election_role.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/config/rbac/leader_election_role.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/leader_election_role.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -1,2 +1 @@ --# permissions to do leader election. - apiVersion: rbac.authorization.k8s.io/v1 -@@ -4,3 +3,3 @@ - metadata: -- name: leader-election-role -+ name: {{ include "zora.operatorServiceAccountName" . }}-leader-election - rules: diff --git a/hack/patches/rbac/leader_election_role_binding.patch b/hack/patches/rbac/leader_election_role_binding.patch deleted file mode 100644 index 9aabd0b9..00000000 --- a/hack/patches/rbac/leader_election_role_binding.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/config/rbac/leader_election_role_binding.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/leader_election_role_binding.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -3,3 +3,3 @@ - metadata: -- name: leader-election-rolebinding -+ name: {{ include "zora.operatorServiceAccountName" . }}-leader-election - roleRef: -@@ -7,6 +7,6 @@ - kind: Role -- name: leader-election-role -+ name: {{ include "zora.operatorServiceAccountName" . }}-leader-election - subjects: - - kind: ServiceAccount -- name: controller-manager -- namespace: system -+ name: {{ include "zora.operatorServiceAccountName" . }} -+ namespace: {{ .Release.Namespace }} diff --git a/hack/patches/rbac/role.patch b/hack/patches/rbac/role.patch deleted file mode 100644 index a3b369be..00000000 --- a/hack/patches/rbac/role.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/config/rbac/role.yaml 2022-08-17 14:23:38.267847207 -0300 -+++ b/config/rbac/role.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -1,2 +1 @@ ----- - apiVersion: rbac.authorization.k8s.io/v1 -@@ -4,4 +3,3 @@ - metadata: -- creationTimestamp: null -- name: manager-role -+ name: {{ include "zora.operatorServiceAccountName" . }} - rules: diff --git a/hack/patches/rbac/role_binding.patch b/hack/patches/rbac/role_binding.patch deleted file mode 100644 index 0c4ef62f..00000000 --- a/hack/patches/rbac/role_binding.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/config/rbac/role_binding.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/role_binding.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -3,3 +3,3 @@ - metadata: -- name: manager-rolebinding -+ name: {{ include "zora.operatorServiceAccountName" . }} - roleRef: -@@ -7,6 +7,6 @@ - kind: ClusterRole -- name: manager-role -+ name: {{ include "zora.operatorServiceAccountName" . }} - subjects: - - kind: ServiceAccount -- name: controller-manager -- namespace: system -+ name: {{ include "zora.operatorServiceAccountName" . }} -+ namespace: {{ .Release.Namespace }} diff --git a/hack/patches/rbac/service_account.patch b/hack/patches/rbac/service_account.patch deleted file mode 100644 index f3cb4709..00000000 --- a/hack/patches/rbac/service_account.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/config/rbac/service_account.yaml 2022-04-12 17:43:03.730424686 -0300 -+++ b/config/rbac/service_account.yaml 2022-08-17 15:54:39.134889137 -0300 -@@ -1 +1,2 @@ -+{{ if .Values.operator.rbac.serviceAccount.create -}} - apiVersion: v1 -@@ -3,3 +4,10 @@ - metadata: -- name: controller-manager -- namespace: system -+ name: {{ include "zora.operatorServiceAccountName" . }} -+ labels: -+ {{- include "zora.operatorLabels" . | nindent 4 }} -+ {{- with .Values.operator.rbac.serviceAccount.annotations }} -+ annotations: -+ {{- toYaml . | nindent 4 }} -+ {{- end }} -+{{ end }} -+{{- if .Values.operator.rbac.create -}} diff --git a/hack/scripts/gen_zora_view_kubeconfig.sh b/hack/scripts/gen_zora_view_kubeconfig.sh deleted file mode 100755 index e2adacfe..00000000 --- a/hack/scripts/gen_zora_view_kubeconfig.sh +++ /dev/null @@ -1,253 +0,0 @@ -#!/bin/sh -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -o errexit - -SVC_ACCOUNT_NS=${SVC_ACCOUNT_NS:-"zora-system"} -SVC_ACCOUNT_NAME=${SVC_ACCOUNT_NAME:-"zora-view"} -CLUSTER_ROLE_NAME=${CLUSTER_ROLE_NAME:-"zora-view"} -SVC_ACCOUNT_SECRET_NS=${SVC_ACCOUNT_SECRET_NS:-$SVC_ACCOUNT_NS} -SVC_ACCOUNT_SECRET_NAME=${SVC_ACCOUNT_SECRET_NAME:-"$SVC_ACCOUNT_NAME-token"} - -KCONFIG_NAME=${KCONFIG_NAME:-"zora_view_kubeconfig.yaml"} -METRICS_SERVER_VERSION=${METRICS_SERVER_VERSION:-"latest"} -METRICS_SERVER_DEPLOYMENT_NAME=${METRICS_SERVER_DEPLOYMENT_NAME:-"metrics-server"} -METRICS_SERVER_DEPLOYMENT=${METRICS_SERVER_DEPLOYMENT:-"https://github.com/kubernetes-sigs/metrics-server/releases/$METRICS_SERVER_VERSION/download/components.yaml"} - -get_current_context() { - echo $(kubectl config current-context) -} -get_token_name() { - echo $(kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS \ - get serviceaccount $SVC_ACCOUNT_NAME \ - -o jsonpath='{.secrets[0].name}' - ) -} -get_token_value() { - echo $(kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS \ - get secret $TOKEN_NAME \ - -o jsonpath='{.data.token}' | base64 --decode - ) -} -get_cluster_name() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .contexts}} - {{if eq .name "'$CONTEXT'"}} - {{index .context "cluster"}} - {{end}} - {{end}} - ' - ) -} -get_cluster_ca() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .clusters}} - {{if eq .name "'$CLUSTER_NAME'"}} - {{with index .cluster "certificate-authority-data"}} - {{.}} - {{end}} - {{end}} - {{end}} - ' - ) -} -get_cluster_server() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .clusters}} - {{if eq .name "'$CLUSTER_NAME'"}} - {{ .cluster.server }} - {{end}} - {{end}} - ' - ) -} - -create_svc_account() { - kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS create serviceaccount $SVC_ACCOUNT_NAME -} - -create_svc_account_secret() { -cat << EOF | kubectl --context $CONTEXT create -f - -apiVersion: v1 -kind: Secret -metadata: - name: "$SVC_ACCOUNT_SECRET_NAME" - namespace: "$SVC_ACCOUNT_SECRET_NS" - annotations: - kubernetes.io/service-account.name: "$SVC_ACCOUNT_NAME" -type: kubernetes.io/service-account-token -EOF -} - -create_cluster_role() { -cat << EOF | kubectl --context $CONTEXT apply -f - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: $CLUSTER_ROLE_NAME -rules: - - apiGroups: [ "" ] - resources: - - configmaps - - endpoints - - limitranges - - namespaces - - nodes - - persistentvolumes - - persistentvolumeclaims - - pods - - replicationcontrollers - - secrets - - serviceaccounts - - services - verbs: [ "get", "list" ] - - apiGroups: [ "apps" ] - resources: - - daemonsets - - deployments - - statefulsets - - replicasets - verbs: [ "get", "list" ] - - apiGroups: [ "autoscaling" ] - resources: - - horizontalpodautoscalers - verbs: [ "get", "list" ] - - apiGroups: [ "networking.k8s.io" ] - resources: - - ingresses - - networkpolicies - verbs: [ "get", "list" ] - - apiGroups: [ "policy" ] - resources: - - poddisruptionbudgets - - podsecuritypolicies - verbs: [ "get", "list" ] - - apiGroups: [ "rbac.authorization.k8s.io" ] - resources: - - clusterroles - - clusterrolebindings - - roles - - rolebindings - verbs: [ "get", "list" ] - - apiGroups: [ "metrics.k8s.io" ] - resources: - - pods - - nodes - verbs: [ "get", "list" ] - - apiGroups: [ batch ] - resources: - - jobs - - cronjobs - verbs: [ "get", "list" ] - - apiGroups: [ admissionregistration.k8s.io ] - resources: - - validatingwebhookconfigurations - - mutatingwebhookconfigurations - verbs: [ "get", "list" ] -EOF -} - -create_cluster_role_binding() { - kubectl --context $CONTEXT create clusterrolebinding $SVC_ACCOUNT_NAME \ - --clusterrole=$CLUSTER_ROLE_NAME \ - --serviceaccount=$SVC_ACCOUNT_NS:$SVC_ACCOUNT_NAME -} - -create_kubeconfig() { -cat << EOF > $KCONFIG_NAME -apiVersion: v1 -kind: Config -current-context: $CONTEXT -contexts: - - name: $CONTEXT - context: - cluster: $CONTEXT - user: $SVC_ACCOUNT_NAME - namespace: $SVC_ACCOUNT_NS -clusters: - - name: $CONTEXT - cluster: - certificate-authority-data: $CLUSTER_CA - server: $CLUSTER_SERVER -users: - - name: $SVC_ACCOUNT_NAME - user: - token: $TOKEN_VALUE -EOF -} - - -setup_metrics_server() { - if ! kubectl --context $CONTEXT get pods -A 2> /dev/null | grep -q $METRICS_SERVER_DEPLOYMENT_NAME; then - kubectl --context $CONTEXT apply -f "$METRICS_SERVER_DEPLOYMENT" - fi -} - -setup_namespaces() { - if ! kubectl --context $CONTEXT get namespace $SVC_ACCOUNT_NS > /dev/null 2>&1; then - kubectl --context $CONTEXT create namespace $SVC_ACCOUNT_NS - fi - if ! kubectl --context $CONTEXT get namespace $SVC_ACCOUNT_SECRET_NS > /dev/null 2>&1; then - kubectl --context $CONTEXT create namespace $SVC_ACCOUNT_SECRET_NS - fi -} -setup_svc_account() { - if ! kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS get serviceaccount $SVC_ACCOUNT_NAME > /dev/null 2>&1; then - create_svc_account - fi -} -setup_svc_account_secret() { - if ! kubectl --context $CONTEXT -n $SVC_ACCOUNT_SECRET_NS get secret $SVC_ACCOUNT_SECRET_NAME > /dev/null 2>&1; then - create_svc_account_secret - fi -} -setup_cluster_role() { - if ! kubectl --context $CONTEXT get clusterrole $CLUSTER_ROLE_NAME > /dev/null 2>&1; then - create_cluster_role - fi -} -setup_cluster_role_binding() { - if ! kubectl --context $CONTEXT get -n $SVC_ACCOUNT_NS clusterrolebinding $SVC_ACCOUNT_NAME > /dev/null 2>&1; then - create_cluster_role_binding - fi -} - - -CONTEXT=${CONTEXT:-"$(get_current_context)"} - -setup_namespaces -setup_svc_account - -if kubectl --context $CONTEXT version --short | awk '/Server/{if ($3 < "1.24.0") {exit 1}}'; then - setup_svc_account_secret - TOKEN_NAME=${TOKEN_NAME:-"$SVC_ACCOUNT_SECRET_NAME"} -else - TOKEN_NAME=${TOKEN_NAME:-"$(get_token_name)"} -fi - -TOKEN_VALUE=${TOKEN_VALUE:-"$(get_token_value)"} -CLUSTER_NAME=${CLUSTER_NAME:-"$(get_cluster_name)"} -CLUSTER_CA=${CLUSTER_CA:-"$(get_cluster_ca)"} -CLUSTER_SERVER=${CLUSTER_SERVER:-"$(get_cluster_server)"} - -setup_metrics_server -setup_cluster_role -setup_cluster_role_binding -create_kubeconfig - diff --git a/hack/scripts/m4/common_calls.sh.in b/hack/scripts/m4/common_calls.sh.in deleted file mode 100644 index 2c913105..00000000 --- a/hack/scripts/m4/common_calls.sh.in +++ /dev/null @@ -1,3 +0,0 @@ -setup_cluster_role -setup_cluster_role_binding -create_kubeconfig diff --git a/hack/scripts/m4/common_calls_and_vars.sh.in b/hack/scripts/m4/common_calls_and_vars.sh.in deleted file mode 100644 index c1daddba..00000000 --- a/hack/scripts/m4/common_calls_and_vars.sh.in +++ /dev/null @@ -1,16 +0,0 @@ -CONTEXT=${CONTEXT:-"$(get_current_context)"} - -setup_namespaces -setup_svc_account - -if kubectl --context $CONTEXT version --short | awk '/Server/{if ($3 < "1.24.0") {exit 1}}'; then - setup_svc_account_secret - TOKEN_NAME=${TOKEN_NAME:-"$SVC_ACCOUNT_SECRET_NAME"} -else - TOKEN_NAME=${TOKEN_NAME:-"$(get_token_name)"} -fi - -TOKEN_VALUE=${TOKEN_VALUE:-"$(get_token_value)"} -CLUSTER_NAME=${CLUSTER_NAME:-"$(get_cluster_name)"} -CLUSTER_CA=${CLUSTER_CA:-"$(get_cluster_ca)"} -CLUSTER_SERVER=${CLUSTER_SERVER:-"$(get_cluster_server)"} diff --git a/hack/scripts/m4/common_create_funcs.sh.in b/hack/scripts/m4/common_create_funcs.sh.in deleted file mode 100644 index 7a548305..00000000 --- a/hack/scripts/m4/common_create_funcs.sh.in +++ /dev/null @@ -1,113 +0,0 @@ -create_svc_account() { - kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS create serviceaccount $SVC_ACCOUNT_NAME -} - -create_svc_account_secret() { -cat << EOF | kubectl --context $CONTEXT create -f - -apiVersion: v1 -kind: Secret -metadata: - name: "$SVC_ACCOUNT_SECRET_NAME" - namespace: "$SVC_ACCOUNT_SECRET_NS" - annotations: - kubernetes.io/service-account.name: "$SVC_ACCOUNT_NAME" -type: kubernetes.io/service-account-token -EOF -} - -create_cluster_role() { -cat << EOF | kubectl --context $CONTEXT apply -f - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: $CLUSTER_ROLE_NAME -rules: - - apiGroups: [ "" ] - resources: - - configmaps - - endpoints - - limitranges - - namespaces - - nodes - - persistentvolumes - - persistentvolumeclaims - - pods - - replicationcontrollers - - secrets - - serviceaccounts - - services - verbs: [ "get", "list" ] - - apiGroups: [ "apps" ] - resources: - - daemonsets - - deployments - - statefulsets - - replicasets - verbs: [ "get", "list" ] - - apiGroups: [ "autoscaling" ] - resources: - - horizontalpodautoscalers - verbs: [ "get", "list" ] - - apiGroups: [ "networking.k8s.io" ] - resources: - - ingresses - - networkpolicies - verbs: [ "get", "list" ] - - apiGroups: [ "policy" ] - resources: - - poddisruptionbudgets - - podsecuritypolicies - verbs: [ "get", "list" ] - - apiGroups: [ "rbac.authorization.k8s.io" ] - resources: - - clusterroles - - clusterrolebindings - - roles - - rolebindings - verbs: [ "get", "list" ] - - apiGroups: [ "metrics.k8s.io" ] - resources: - - pods - - nodes - verbs: [ "get", "list" ] - - apiGroups: [ batch ] - resources: - - jobs - - cronjobs - verbs: [ "get", "list" ] - - apiGroups: [ admissionregistration.k8s.io ] - resources: - - validatingwebhookconfigurations - - mutatingwebhookconfigurations - verbs: [ "get", "list" ] -EOF -} - -create_cluster_role_binding() { - kubectl --context $CONTEXT create clusterrolebinding $SVC_ACCOUNT_NAME \ - --clusterrole=$CLUSTER_ROLE_NAME \ - --serviceaccount=$SVC_ACCOUNT_NS:$SVC_ACCOUNT_NAME -} - -create_kubeconfig() { -cat << EOF > $KCONFIG_NAME -apiVersion: v1 -kind: Config -current-context: $CONTEXT -contexts: - - name: $CONTEXT - context: - cluster: $CONTEXT - user: $SVC_ACCOUNT_NAME - namespace: $SVC_ACCOUNT_NS -clusters: - - name: $CONTEXT - cluster: - certificate-authority-data: $CLUSTER_CA - server: $CLUSTER_SERVER -users: - - name: $SVC_ACCOUNT_NAME - user: - token: $TOKEN_VALUE -EOF -} diff --git a/hack/scripts/m4/common_get_funcs.sh.in b/hack/scripts/m4/common_get_funcs.sh.in deleted file mode 100644 index 75e110fb..00000000 --- a/hack/scripts/m4/common_get_funcs.sh.in +++ /dev/null @@ -1,50 +0,0 @@ -get_current_context() { - echo $(kubectl config current-context) -} -get_token_name() { - echo $(kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS \ - get serviceaccount $SVC_ACCOUNT_NAME \ - -o jsonpath='{.secrets[0].name}' - ) -} -get_token_value() { - echo $(kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS \ - get secret $TOKEN_NAME \ - -o jsonpath='{.data.token}' | base64 --decode - ) -} -get_cluster_name() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .contexts}} - {{if eq .name "'$CONTEXT'"}} - {{index .context "cluster"}} - {{end}} - {{end}} - ' - ) -} -get_cluster_ca() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .clusters}} - {{if eq .name "'$CLUSTER_NAME'"}} - {{with index .cluster "certificate-authority-data"}} - {{.}} - {{end}} - {{end}} - {{end}} - ' - ) -} -get_cluster_server() { - echo $(kubectl --context $CONTEXT config view \ - --raw -o go-template=' - {{range .clusters}} - {{if eq .name "'$CLUSTER_NAME'"}} - {{ .cluster.server }} - {{end}} - {{end}} - ' - ) -} diff --git a/hack/scripts/m4/common_opts_and_vars.sh.in b/hack/scripts/m4/common_opts_and_vars.sh.in deleted file mode 100644 index 0559d712..00000000 --- a/hack/scripts/m4/common_opts_and_vars.sh.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -o errexit - -SVC_ACCOUNT_NS=${SVC_ACCOUNT_NS:-"zora-system"} -SVC_ACCOUNT_NAME=${SVC_ACCOUNT_NAME:-"zora-view"} -CLUSTER_ROLE_NAME=${CLUSTER_ROLE_NAME:-"zora-view"} -SVC_ACCOUNT_SECRET_NS=${SVC_ACCOUNT_SECRET_NS:-$SVC_ACCOUNT_NS} -SVC_ACCOUNT_SECRET_NAME=${SVC_ACCOUNT_SECRET_NAME:-"$SVC_ACCOUNT_NAME-token"} diff --git a/hack/scripts/m4/common_setup_funcs.sh.in b/hack/scripts/m4/common_setup_funcs.sh.in deleted file mode 100644 index 02b27d45..00000000 --- a/hack/scripts/m4/common_setup_funcs.sh.in +++ /dev/null @@ -1,28 +0,0 @@ -setup_namespaces() { - if ! kubectl --context $CONTEXT get namespace $SVC_ACCOUNT_NS > /dev/null 2>&1; then - kubectl --context $CONTEXT create namespace $SVC_ACCOUNT_NS - fi - if ! kubectl --context $CONTEXT get namespace $SVC_ACCOUNT_SECRET_NS > /dev/null 2>&1; then - kubectl --context $CONTEXT create namespace $SVC_ACCOUNT_SECRET_NS - fi -} -setup_svc_account() { - if ! kubectl --context $CONTEXT -n $SVC_ACCOUNT_NS get serviceaccount $SVC_ACCOUNT_NAME > /dev/null 2>&1; then - create_svc_account - fi -} -setup_svc_account_secret() { - if ! kubectl --context $CONTEXT -n $SVC_ACCOUNT_SECRET_NS get secret $SVC_ACCOUNT_SECRET_NAME > /dev/null 2>&1; then - create_svc_account_secret - fi -} -setup_cluster_role() { - if ! kubectl --context $CONTEXT get clusterrole $CLUSTER_ROLE_NAME > /dev/null 2>&1; then - create_cluster_role - fi -} -setup_cluster_role_binding() { - if ! kubectl --context $CONTEXT get -n $SVC_ACCOUNT_NS clusterrolebinding $SVC_ACCOUNT_NAME > /dev/null 2>&1; then - create_cluster_role_binding - fi -} diff --git a/hack/scripts/m4/gen_zora_view_kubeconfig.sh.m4 b/hack/scripts/m4/gen_zora_view_kubeconfig.sh.m4 deleted file mode 100644 index e168d761..00000000 --- a/hack/scripts/m4/gen_zora_view_kubeconfig.sh.m4 +++ /dev/null @@ -1,20 +0,0 @@ -include(common_opts_and_vars.sh.in) -KCONFIG_NAME=${KCONFIG_NAME:-"zora_view_kubeconfig.yaml"} -METRICS_SERVER_VERSION=${METRICS_SERVER_VERSION:-"latest"} -METRICS_SERVER_DEPLOYMENT_NAME=${METRICS_SERVER_DEPLOYMENT_NAME:-"metrics-server"} -METRICS_SERVER_DEPLOYMENT=${METRICS_SERVER_DEPLOYMENT:-"https://github.com/kubernetes-sigs/metrics-server/releases/$METRICS_SERVER_VERSION/download/components.yaml"} - -include(common_get_funcs.sh.in) -include(common_create_funcs.sh.in) - -setup_metrics_server() { - if ! kubectl --context $CONTEXT get pods -A 2> /dev/null | grep -q $METRICS_SERVER_DEPLOYMENT_NAME; then - kubectl --context $CONTEXT apply -f "$METRICS_SERVER_DEPLOYMENT" - fi -} - -include(common_setup_funcs.sh.in) - -include(common_calls_and_vars.sh.in) -setup_metrics_server -include(common_calls.sh.in) diff --git a/hack/scripts/m4/targetcluster.sh.m4 b/hack/scripts/m4/targetcluster.sh.m4 deleted file mode 100644 index 8205fa7e..00000000 --- a/hack/scripts/m4/targetcluster.sh.m4 +++ /dev/null @@ -1,51 +0,0 @@ -include(common_opts_and_vars.sh.in) - -include(common_get_funcs.sh.in) -include(common_create_funcs.sh.in) -include(common_setup_funcs.sh.in) - -show_generated_kconfig_name() { - echo "Kubeconfing file: - $KCONFIG_NAME - " -} - -show_kconfig_creation_cmd() { - echo "Create a Kubeconfig Secret on the management cluster by running: - kubectl create secret generic $KCONFIG_SECRET_NAME \\ - --namespace $CLUSTER_NS \\ - --from-file=value=$KCONFIG_NAME -" -} - -create_cluster_sample() { - cat << EOF > $SAMPLE_MANIFEST_NAME -apiVersion: zora.undistro.io/v1alpha1 -kind: Cluster -metadata: - name: $CLUSTER_NAME - namespace: $CLUSTER_NS -spec: - kubeconfigRef: - name: $KCONFIG_SECRET_NAME -EOF -} - -show_cluster_sample_name() { - echo "Sample manifest: - $SAMPLE_MANIFEST_NAME - " -} - - -include(common_calls_and_vars.sh.in) -CLUSTER_NS=${CLUSTER_NS:-$SVC_ACCOUNT_NS} -KCONFIG_NAME=${KCONFIG_NAME:-"$CONTEXT-kubeconfig.yaml"} -KCONFIG_SECRET_NAME=${KCONFIG_SECRET_NAME:-"$CLUSTER_NAME-kubeconfig"} -SAMPLE_MANIFEST_NAME=${SAMPLE_MANIFEST_NAME:-"cluster_sample.yaml"} -include(common_calls.sh.in) -echo -show_generated_kconfig_name -show_kconfig_creation_cmd -create_cluster_sample -show_cluster_sample_name diff --git a/hack/scripts/setup_zora_view.sh b/hack/scripts/setup_zora_view.sh deleted file mode 100755 index 51be4626..00000000 --- a/hack/scripts/setup_zora_view.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -# Copyright 2022 Undistro Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit - -CLUSTER_NAME=${CLUSTER_NAME:-"zored"} -CLUSTER_NS=${CLUSTER_NS:-"zora-system"} -KCONFIG_PATH=${KCONFIG_PATH:-"zora_view_kubeconfig.yaml"} -KCONFIG_SECRET_NAME=${KCONFIG_SECRET_NAME:-"$CLUSTER_NAME-kubeconfig"} -ENABLE_CLUSTER_SCAN=${ENABLE_CLUSTER_SCAN:-0} -CLUSTER_SCAN_SCHEDULE=${CLUSTER_SCAN_SCHEDULE:-'*/2 * * * *'} - -setup_namespaces() { - if ! kubectl get namespace $CLUSTER_NS > /dev/null 2>&1; then - kubectl create namespace $CLUSTER_NS - fi -} - -setup_kubeconfig_secret() { - if ! kubectl -n $CLUSTER_NS get secret $KCONFIG_SECRET_NAME > /dev/null 2>&1; then - kubectl create secret generic $KCONFIG_SECRET_NAME \ - --namespace $CLUSTER_NS \ - --from-file=value=$KCONFIG_PATH - fi -} - -apply_cluster_crd() { -cat << EOF | kubectl apply -f - -apiVersion: zora.undistro.io/v1alpha1 -kind: Cluster -metadata: - name: $CLUSTER_NAME - namespace: $CLUSTER_NS -spec: - kubeconfigRef: - name: $KCONFIG_SECRET_NAME -EOF -} - -apply_plugin_crds() { - kubectl -n $CLUSTER_NS apply -f config/samples/zora_v1alpha1_plugin_popeye.yaml -} - -apply_clusterscan_crd() { -cat << EOF | kubectl apply -f - -apiVersion: zora.undistro.io/v1alpha1 -kind: ClusterScan -metadata: - name: $CLUSTER_NAME-scan - namespace: $CLUSTER_NS -spec: - clusterRef: - name: $CLUSTER_NAME - schedule: "$CLUSTER_SCAN_SCHEDULE" -EOF -} - -setup_namespaces -setup_kubeconfig_secret -apply_cluster_crd -if test $ENABLE_CLUSTER_SCAN -eq 1; then - apply_plugin_crds - apply_clusterscan_crd -fi diff --git a/controllers/zora/cluster_controller.go b/internal/controller/zora/cluster_controller.go similarity index 98% rename from controllers/zora/cluster_controller.go rename to internal/controller/zora/cluster_controller.go index 966c7f6e..86a6585e 100644 --- a/controllers/zora/cluster_controller.go +++ b/internal/controller/zora/cluster_controller.go @@ -20,7 +20,6 @@ import ( "reflect" "time" - "github.com/undistro/zora/pkg/saas" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -33,7 +32,8 @@ import ( ctrllog "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" + "github.com/undistro/zora/internal/saas" "github.com/undistro/zora/pkg/discovery" "github.com/undistro/zora/pkg/kubeconfig" ) diff --git a/controllers/zora/clusterscan_controller.go b/internal/controller/zora/clusterscan_controller.go similarity index 98% rename from controllers/zora/clusterscan_controller.go rename to internal/controller/zora/clusterscan_controller.go index eadd1c95..5b412faf 100644 --- a/controllers/zora/clusterscan_controller.go +++ b/internal/controller/zora/clusterscan_controller.go @@ -39,12 +39,10 @@ import ( ctrllog "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - "github.com/undistro/zora/pkg/saas" - - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" + "github.com/undistro/zora/internal/saas" "github.com/undistro/zora/pkg/kubeconfig" - "github.com/undistro/zora/pkg/plugins/cronjobs" - "github.com/undistro/zora/pkg/plugins/errparse" + "github.com/undistro/zora/pkg/plugins" ) const ( @@ -193,8 +191,8 @@ func (r *ClusterScanReconciler) reconcile(ctx context.Context, clusterscan *v1al clusterscan.SetReadyStatus(false, "PluginFetchError", err.Error()) return err } - cronJob := cronjobs.New(fmt.Sprintf("%s-%s", clusterscan.Name, plugin.Name), kubeconfigSecret.Namespace) - cronJobMutator := &cronjobs.Mutator{ + cronJob := plugins.NewCronJob(fmt.Sprintf("%s-%s", clusterscan.Name, plugin.Name), kubeconfigSecret.Namespace) + cronJobMutator := &plugins.CronJobMutator{ Scheme: r.Scheme, Existing: cronJob, Plugin: plugin, @@ -354,7 +352,7 @@ func (r *ClusterScanReconciler) pluginErrorMsg(ctx context.Context, ps *v1alpha1 } defer lr.Close() - ps.LastErrorMsg, err = errparse.Parse(lr, p.Name) + ps.LastErrorMsg, err = plugins.ParseError(lr, p.Name) if err != nil { log.Error(err, fmt.Sprintf("Failed to extract <%s> error message", p.Name)) } diff --git a/controllers/zora/suite_test.go b/internal/controller/zora/suite_test.go similarity index 83% rename from controllers/zora/suite_test.go rename to internal/controller/zora/suite_test.go index 2ec5dc97..21e69e48 100644 --- a/controllers/zora/suite_test.go +++ b/internal/controller/zora/suite_test.go @@ -18,17 +18,17 @@ import ( "path/filepath" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - zorav1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" //+kubebuilder:scaffold:imports ) @@ -42,9 +42,7 @@ var testEnv *envtest.Environment func TestAPIs(t *testing.T) { RegisterFailHandler(Fail) - RunSpecsWithDefaultAndCustomReporters(t, - "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + RunSpecs(t, "Controller Suite") } var _ = BeforeSuite(func() { @@ -52,11 +50,13 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } - cfg, err := testEnv.Start() + var err error + // cfg is defined in this file globally. + cfg, err = testEnv.Start() Expect(err).NotTo(HaveOccurred()) Expect(cfg).NotTo(BeNil()) @@ -69,7 +69,7 @@ var _ = BeforeSuite(func() { Expect(err).NotTo(HaveOccurred()) Expect(k8sClient).NotTo(BeNil()) -}, 60) +}) var _ = AfterSuite(func() { By("tearing down the test environment") diff --git a/pkg/saas/client.go b/internal/saas/client.go similarity index 93% rename from pkg/saas/client.go rename to internal/saas/client.go index aa0ffb8a..72ddb01c 100644 --- a/pkg/saas/client.go +++ b/internal/saas/client.go @@ -22,8 +22,6 @@ import ( "net/http" "net/url" "path" - - "github.com/undistro/zora/pkg/payloads/v1alpha1" ) const ( @@ -40,9 +38,9 @@ var allowedStatus = []int{ } type Client interface { - PutCluster(ctx context.Context, cluster v1alpha1.Cluster) error + PutCluster(ctx context.Context, cluster Cluster) error DeleteCluster(ctx context.Context, namespace, name string) error - PutClusterScan(ctx context.Context, namespace, name string, pluginStatus map[string]*v1alpha1.PluginStatus) error + PutClusterScan(ctx context.Context, namespace, name string, pluginStatus map[string]*PluginStatus) error DeleteClusterScan(ctx context.Context, namespace, name string) error } @@ -67,7 +65,7 @@ func NewClient(baseURL, version, workspaceID string, httpclient *http.Client) (C }, nil } -func (r *client) PutCluster(ctx context.Context, cluster v1alpha1.Cluster) error { +func (r *client) PutCluster(ctx context.Context, cluster Cluster) error { u := r.clusterURL(cluster.Namespace, cluster.Name) b, err := json.Marshal(cluster) if err != nil { @@ -102,7 +100,7 @@ func (r *client) DeleteCluster(ctx context.Context, namespace, name string) erro return validateStatus(res) } -func (r *client) PutClusterScan(ctx context.Context, namespace, name string, pluginStatus map[string]*v1alpha1.PluginStatus) error { +func (r *client) PutClusterScan(ctx context.Context, namespace, name string, pluginStatus map[string]*PluginStatus) error { u := r.clusterURL(namespace, name, "scan") b, err := json.Marshal(pluginStatus) if err != nil { diff --git a/pkg/payloads/v1alpha1/clusters.go b/internal/saas/clusters.go similarity index 98% rename from pkg/payloads/v1alpha1/clusters.go rename to internal/saas/clusters.go index 914189de..5c742c21 100644 --- a/pkg/payloads/v1alpha1/clusters.go +++ b/internal/saas/clusters.go @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package saas import ( batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/formats" ) @@ -86,7 +86,7 @@ type ConnectionStatus struct { Message string `json:"message"` } -//NewCluster returns a Cluster without pluginStatus and issues +// NewCluster returns a Cluster without pluginStatus and issues func NewCluster(cluster v1alpha1.Cluster) Cluster { cl := Cluster{ ApiVersion: "v1alpha1", diff --git a/pkg/payloads/v1alpha1/clusters_test.go b/internal/saas/clusters_test.go similarity index 98% rename from pkg/payloads/v1alpha1/clusters_test.go rename to internal/saas/clusters_test.go index 665a2af9..ccaaf6be 100644 --- a/pkg/payloads/v1alpha1/clusters_test.go +++ b/internal/saas/clusters_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package saas import ( "encoding/json" @@ -23,7 +23,7 @@ import ( "github.com/google/go-cmp/cmp" "sigs.k8s.io/yaml" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" ) func TestNewCluster(t *testing.T) { diff --git a/pkg/saas/hooks.go b/internal/saas/hooks.go similarity index 94% rename from pkg/saas/hooks.go rename to internal/saas/hooks.go index 8e338efa..c17853c1 100644 --- a/pkg/saas/hooks.go +++ b/internal/saas/hooks.go @@ -17,10 +17,10 @@ package saas import ( "context" - "github.com/undistro/zora/apis/zora/v1alpha1" - payloads "github.com/undistro/zora/pkg/payloads/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/undistro/zora/api/zora/v1alpha1" ) type ClusterHook func(ctx context.Context, cluster *v1alpha1.Cluster) error @@ -29,7 +29,7 @@ type ClusterScanHook func(ctx context.Context, clusterScan *v1alpha1.ClusterScan func UpdateClusterHook(saasClient Client) ClusterHook { return func(ctx context.Context, cluster *v1alpha1.Cluster) error { - cl := payloads.NewCluster(*cluster) + cl := NewCluster(*cluster) return saasClient.PutCluster(ctx, cl) } } @@ -104,7 +104,7 @@ func updateClusterScan(saasClient Client, c ctrlClient.Client, ctx context.Conte return err } - status := payloads.NewScanStatusWithIssues(scanList.Items, issueList.Items) + status := NewScanStatusWithIssues(scanList.Items, issueList.Items) if status == nil { return nil } diff --git a/pkg/payloads/v1alpha1/issues.go b/internal/saas/issues.go similarity index 97% rename from pkg/payloads/v1alpha1/issues.go rename to internal/saas/issues.go index 95a1e9b6..65293140 100644 --- a/pkg/payloads/v1alpha1/issues.go +++ b/internal/saas/issues.go @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package saas import ( "strings" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" ) type Issue struct { diff --git a/pkg/payloads/v1alpha1/issues_test.go b/internal/saas/issues_test.go similarity index 98% rename from pkg/payloads/v1alpha1/issues_test.go rename to internal/saas/issues_test.go index 2e8e9d93..4eca63de 100644 --- a/pkg/payloads/v1alpha1/issues_test.go +++ b/internal/saas/issues_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v1alpha1 +package saas import ( "reflect" @@ -21,7 +21,7 @@ import ( "github.com/google/go-cmp/cmp" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" ) func TestNewResourcedIssue(t *testing.T) { diff --git a/pkg/payloads/v1alpha1/testdata/cluster/always_disconnected.yml b/internal/saas/testdata/cluster/always_disconnected.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/always_disconnected.yml rename to internal/saas/testdata/cluster/always_disconnected.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/always_without_metrics.yml b/internal/saas/testdata/cluster/always_without_metrics.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/always_without_metrics.yml rename to internal/saas/testdata/cluster/always_without_metrics.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/disconnected.yml b/internal/saas/testdata/cluster/disconnected.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/disconnected.yml rename to internal/saas/testdata/cluster/disconnected.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/ok.yml b/internal/saas/testdata/cluster/ok.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/ok.yml rename to internal/saas/testdata/cluster/ok.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/without_metrics.yml b/internal/saas/testdata/cluster/without_metrics.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/without_metrics.yml rename to internal/saas/testdata/cluster/without_metrics.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/without_provider.yml b/internal/saas/testdata/cluster/without_provider.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/without_provider.yml rename to internal/saas/testdata/cluster/without_provider.yml diff --git a/pkg/payloads/v1alpha1/testdata/cluster/without_provider_and_metrics.yml b/internal/saas/testdata/cluster/without_provider_and_metrics.yml similarity index 100% rename from pkg/payloads/v1alpha1/testdata/cluster/without_provider_and_metrics.yml rename to internal/saas/testdata/cluster/without_provider_and_metrics.yml diff --git a/pkg/payloads/v1alpha1/testdata/payload/1.json b/internal/saas/testdata/payload/1.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/1.json rename to internal/saas/testdata/payload/1.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/10.json b/internal/saas/testdata/payload/10.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/10.json rename to internal/saas/testdata/payload/10.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/2.json b/internal/saas/testdata/payload/2.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/2.json rename to internal/saas/testdata/payload/2.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/3.json b/internal/saas/testdata/payload/3.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/3.json rename to internal/saas/testdata/payload/3.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/4.json b/internal/saas/testdata/payload/4.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/4.json rename to internal/saas/testdata/payload/4.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/5.json b/internal/saas/testdata/payload/5.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/5.json rename to internal/saas/testdata/payload/5.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/6.json b/internal/saas/testdata/payload/6.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/6.json rename to internal/saas/testdata/payload/6.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/7.json b/internal/saas/testdata/payload/7.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/7.json rename to internal/saas/testdata/payload/7.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/8.json b/internal/saas/testdata/payload/8.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/8.json rename to internal/saas/testdata/payload/8.json diff --git a/pkg/payloads/v1alpha1/testdata/payload/9.json b/internal/saas/testdata/payload/9.json similarity index 100% rename from pkg/payloads/v1alpha1/testdata/payload/9.json rename to internal/saas/testdata/payload/9.json diff --git a/pkg/apis/zz_generated.deepcopy.go b/pkg/apis/zz_generated.deepcopy.go deleted file mode 100644 index 8a60bffb..00000000 --- a/pkg/apis/zz_generated.deepcopy.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2022 Undistro Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by controller-gen. DO NOT EDIT. - -package apis - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Status) DeepCopyInto(out *Status) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status. -func (in *Status) DeepCopy() *Status { - if in == nil { - return nil - } - out := new(Status) - in.DeepCopyInto(out) - return out -} diff --git a/pkg/clientset/versioned/clientset.go b/pkg/clientset/versioned/clientset.go index 6d806696..c0e70d75 100644 --- a/pkg/clientset/versioned/clientset.go +++ b/pkg/clientset/versioned/clientset.go @@ -17,8 +17,7 @@ type Interface interface { ZoraV1alpha1() zorav1alpha1.ZoraV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient zoraV1alpha1 *zorav1alpha1.ZoraV1alpha1Client @@ -45,6 +44,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/pkg/clientset/versioned/fake/register.go b/pkg/clientset/versioned/fake/register.go index 44ba73d9..8c64b331 100644 --- a/pkg/clientset/versioned/fake/register.go +++ b/pkg/clientset/versioned/fake/register.go @@ -3,7 +3,7 @@ package fake import ( - zorav1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/clientset/versioned/scheme/register.go b/pkg/clientset/versioned/scheme/register.go index 8b03eb92..9c8d6d65 100644 --- a/pkg/clientset/versioned/scheme/register.go +++ b/pkg/clientset/versioned/scheme/register.go @@ -3,7 +3,7 @@ package scheme import ( - zorav1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/cluster.go b/pkg/clientset/versioned/typed/zora/v1alpha1/cluster.go index f0e46973..505d1ad3 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/cluster.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/cluster.go @@ -6,7 +6,7 @@ import ( "context" "time" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" scheme "github.com/undistro/zora/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/clusterissue.go b/pkg/clientset/versioned/typed/zora/v1alpha1/clusterissue.go index a7d5a257..2e4bb89f 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/clusterissue.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/clusterissue.go @@ -6,7 +6,7 @@ import ( "context" "time" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" scheme "github.com/undistro/zora/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/clusterscan.go b/pkg/clientset/versioned/typed/zora/v1alpha1/clusterscan.go index 107556fe..9066ee9f 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/clusterscan.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/clusterscan.go @@ -6,7 +6,7 @@ import ( "context" "time" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" scheme "github.com/undistro/zora/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_cluster.go b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_cluster.go index 48a08a17..448e327f 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_cluster.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_cluster.go @@ -5,7 +5,7 @@ package fake import ( "context" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterissue.go b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterissue.go index 606479cb..c736d0d7 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterissue.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterissue.go @@ -5,7 +5,7 @@ package fake import ( "context" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterscan.go b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterscan.go index c4417d34..a93b3dff 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterscan.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/fake/fake_clusterscan.go @@ -5,7 +5,7 @@ package fake import ( "context" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/clientset/versioned/typed/zora/v1alpha1/zora_client.go b/pkg/clientset/versioned/typed/zora/v1alpha1/zora_client.go index 3ebf5306..97d74566 100644 --- a/pkg/clientset/versioned/typed/zora/v1alpha1/zora_client.go +++ b/pkg/clientset/versioned/typed/zora/v1alpha1/zora_client.go @@ -5,7 +5,7 @@ package v1alpha1 import ( "net/http" - v1alpha1 "github.com/undistro/zora/apis/zora/v1alpha1" + v1alpha1 "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/discovery/types.go b/pkg/discovery/types.go index daa63a31..25dd33f1 100644 --- a/pkg/discovery/types.go +++ b/pkg/discovery/types.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +kubebuilder:object:generate=true package discovery import ( @@ -24,13 +25,13 @@ import ( var MeasuredResources = []corev1.ResourceName{corev1.ResourceCPU, corev1.ResourceMemory} +// +kubebuilder:object:generate=false type ClusterDiscoverer interface { Info(context.Context) (*ClusterInfo, error) Resources(ctx context.Context) (ClusterResources, error) Version() (string, error) } -// +k8s:deepcopy-gen=true type ClusterInfo struct { // total of Nodes TotalNodes *int `json:"totalNodes,omitempty"` @@ -64,7 +65,6 @@ type NodeInfo struct { CreationTimestamp metav1.Time `json:"-"` } -// +k8s:deepcopy-gen=true type Resources struct { // Quantity of resources available for scheduling Available resource.Quantity `json:"available,omitempty"` @@ -76,5 +76,4 @@ type Resources struct { UsagePercentage int32 `json:"usagePercentage,omitempty"` } -// +k8s:deepcopy-gen=true type ClusterResources map[corev1.ResourceName]Resources diff --git a/pkg/discovery/zz_generated.deepcopy.go b/pkg/discovery/zz_generated.deepcopy.go index 5b10330b..dddf4f5b 100644 --- a/pkg/discovery/zz_generated.deepcopy.go +++ b/pkg/discovery/zz_generated.deepcopy.go @@ -19,7 +19,9 @@ package discovery -import () +import ( + "k8s.io/api/core/v1" +) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo) { @@ -63,6 +65,36 @@ func (in ClusterResources) DeepCopy() ClusterResources { return *out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeInfo) DeepCopyInto(out *NodeInfo) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make(map[v1.ResourceName]Resources, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + in.CreationTimestamp.DeepCopyInto(&out.CreationTimestamp) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo. +func (in *NodeInfo) DeepCopy() *NodeInfo { + if in == nil { + return nil + } + out := new(NodeInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Resources) DeepCopyInto(out *Resources) { *out = *in diff --git a/pkg/plugins/cronjobs/cronjob.go b/pkg/plugins/cronjob.go similarity index 94% rename from pkg/plugins/cronjobs/cronjob.go rename to pkg/plugins/cronjob.go index adf60cd6..4884a293 100644 --- a/pkg/plugins/cronjobs/cronjob.go +++ b/pkg/plugins/cronjob.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cronjobs +package plugins import ( "path/filepath" @@ -24,7 +24,7 @@ import ( "k8s.io/utils/pointer" ctrl "sigs.k8s.io/controller-runtime" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/kubeconfig" ) @@ -62,11 +62,11 @@ var ( }) ) -func New(name, namespace string) *batchv1.CronJob { +func NewCronJob(name, namespace string) *batchv1.CronJob { return &batchv1.CronJob{ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}} } -type Mutator struct { +type CronJobMutator struct { Scheme *runtime.Scheme Existing *batchv1.CronJob Plugin *v1alpha1.Plugin @@ -79,7 +79,7 @@ type Mutator struct { } // Mutate returns a function which mutates the existing CronJob into it's desired state. -func (r *Mutator) Mutate() error { +func (r *CronJobMutator) Mutate() error { if r.Existing.ObjectMeta.Labels == nil { r.Existing.ObjectMeta.Labels = make(map[string]string) } @@ -155,7 +155,7 @@ func (r *Mutator) Mutate() error { } // workerContainer returns a Container for Worker -func (r *Mutator) workerContainer() corev1.Container { +func (r *CronJobMutator) workerContainer() corev1.Container { return corev1.Container{ Name: workerContainerName, Image: r.WorkerImage, @@ -167,7 +167,7 @@ func (r *Mutator) workerContainer() corev1.Container { } // pluginContainer returns a Container for Plugin -func (r *Mutator) pluginContainer() corev1.Container { +func (r *CronJobMutator) pluginContainer() corev1.Container { return corev1.Container{ Name: r.Plugin.Name, Image: r.Plugin.Spec.Image, @@ -183,7 +183,7 @@ func (r *Mutator) pluginContainer() corev1.Container { } // pluginEnv returns a list of environment variables to set in the Plugin container -func (r *Mutator) pluginEnv() []corev1.EnvVar { +func (r *CronJobMutator) pluginEnv() []corev1.EnvVar { p := append(r.Plugin.Spec.Env, r.PluginRef.Env...) p = append(p, commonEnv...) p = append(p, @@ -204,7 +204,7 @@ func (r *Mutator) pluginEnv() []corev1.EnvVar { } // workerEnv returns a list of environment variables to set in the Worker container -func (r *Mutator) workerEnv() []corev1.EnvVar { +func (r *CronJobMutator) workerEnv() []corev1.EnvVar { return append(commonEnv, corev1.EnvVar{ Name: "CLUSTER_NAME", diff --git a/pkg/plugins/errparse/parse.go b/pkg/plugins/parse.go similarity index 92% rename from pkg/plugins/errparse/parse.go rename to pkg/plugins/parse.go index 000b3b11..95dfc8aa 100644 --- a/pkg/plugins/errparse/parse.go +++ b/pkg/plugins/parse.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package errparse +package plugins import ( "fmt" @@ -46,10 +46,10 @@ var patterns = map[string][]pluginPattern{ }, } -// Parse extracts an error message from a given pointing to a Zora +// ParseError extracts an error message from a given pointing to a Zora // plugin error output. It uses regular expressions as heuristics to find the // message, whereby the first match is returned. -func Parse(r io.Reader, plugin string) (string, error) { +func ParseError(r io.Reader, plugin string) (string, error) { if _, ok := patterns[plugin]; !ok { return "", fmt.Errorf("invalid plugin: <%s>", plugin) } diff --git a/pkg/plugins/errparse/parse_test.go b/pkg/plugins/parse_test.go similarity index 95% rename from pkg/plugins/errparse/parse_test.go rename to pkg/plugins/parse_test.go index 5708bcd8..a4c3c1f3 100644 --- a/pkg/plugins/errparse/parse_test.go +++ b/pkg/plugins/parse_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package errparse +package plugins import ( "io" @@ -122,13 +122,13 @@ func TestParse(t *testing.T) { } r = f } - got, err := Parse(r, tt.args.plugin) + got, err := ParseError(r, tt.args.plugin) if (err != nil) != tt.wantErr { - t.Errorf("Parse() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("ParseError() error = %v, wantErr %v", err, tt.wantErr) return } if got != tt.want { - t.Errorf("Parse() got = %v, want %v", got, tt.want) + t.Errorf("ParseError() got = %v, want %v", got, tt.want) } }) } diff --git a/pkg/plugins/errparse/testdata/dummy_err_1.txt b/pkg/plugins/testdata/dummy_err_1.txt similarity index 100% rename from pkg/plugins/errparse/testdata/dummy_err_1.txt rename to pkg/plugins/testdata/dummy_err_1.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_1.txt b/pkg/plugins/testdata/marvin_err_1.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_1.txt rename to pkg/plugins/testdata/marvin_err_1.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_2.txt b/pkg/plugins/testdata/marvin_err_2.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_2.txt rename to pkg/plugins/testdata/marvin_err_2.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_3.txt b/pkg/plugins/testdata/marvin_err_3.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_3.txt rename to pkg/plugins/testdata/marvin_err_3.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_4.txt b/pkg/plugins/testdata/marvin_err_4.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_4.txt rename to pkg/plugins/testdata/marvin_err_4.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_5.txt b/pkg/plugins/testdata/marvin_err_5.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_5.txt rename to pkg/plugins/testdata/marvin_err_5.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_6.txt b/pkg/plugins/testdata/marvin_err_6.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_6.txt rename to pkg/plugins/testdata/marvin_err_6.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_7.txt b/pkg/plugins/testdata/marvin_err_7.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_7.txt rename to pkg/plugins/testdata/marvin_err_7.txt diff --git a/pkg/plugins/errparse/testdata/marvin_err_8.txt b/pkg/plugins/testdata/marvin_err_8.txt similarity index 100% rename from pkg/plugins/errparse/testdata/marvin_err_8.txt rename to pkg/plugins/testdata/marvin_err_8.txt diff --git a/pkg/plugins/errparse/testdata/popeye_err_1.txt b/pkg/plugins/testdata/popeye_err_1.txt similarity index 100% rename from pkg/plugins/errparse/testdata/popeye_err_1.txt rename to pkg/plugins/testdata/popeye_err_1.txt diff --git a/pkg/plugins/errparse/testdata/popeye_err_2.txt b/pkg/plugins/testdata/popeye_err_2.txt similarity index 100% rename from pkg/plugins/errparse/testdata/popeye_err_2.txt rename to pkg/plugins/testdata/popeye_err_2.txt diff --git a/pkg/plugins/errparse/testdata/popeye_err_3.txt b/pkg/plugins/testdata/popeye_err_3.txt similarity index 100% rename from pkg/plugins/errparse/testdata/popeye_err_3.txt rename to pkg/plugins/testdata/popeye_err_3.txt diff --git a/pkg/plugins/errparse/testdata/popeye_err_4.txt b/pkg/plugins/testdata/popeye_err_4.txt similarity index 100% rename from pkg/plugins/errparse/testdata/popeye_err_4.txt rename to pkg/plugins/testdata/popeye_err_4.txt diff --git a/pkg/worker/config/config.go b/pkg/worker/config/config.go index 29e4f906..94bbfb18 100644 --- a/pkg/worker/config/config.go +++ b/pkg/worker/config/config.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/logr" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/worker/report/marvin" "github.com/undistro/zora/pkg/worker/report/popeye" ) diff --git a/pkg/worker/report/marvin/parse.go b/pkg/worker/report/marvin/parse.go index ce071fb3..32d8b895 100644 --- a/pkg/worker/report/marvin/parse.go +++ b/pkg/worker/report/marvin/parse.go @@ -19,7 +19,7 @@ import ( "github.com/go-logr/logr" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" ) var marvinToZoraSeverity = map[string]v1alpha1.ClusterIssueSeverity{ diff --git a/pkg/worker/report/marvin/parse_test.go b/pkg/worker/report/marvin/parse_test.go index 1647eac1..bf357850 100644 --- a/pkg/worker/report/marvin/parse_test.go +++ b/pkg/worker/report/marvin/parse_test.go @@ -22,7 +22,7 @@ import ( "github.com/go-logr/logr" "github.com/google/go-cmp/cmp" - "github.com/undistro/zora/apis/zora/v1alpha1" + "github.com/undistro/zora/api/zora/v1alpha1" ) func TestParse(t *testing.T) { diff --git a/pkg/worker/report/parse.go b/pkg/worker/report/parse.go index 0476d6be..068a729d 100644 --- a/pkg/worker/report/parse.go +++ b/pkg/worker/report/parse.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/worker/config" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/worker/report/parse_test.go b/pkg/worker/report/parse_test.go index 5f5e0744..06caa702 100644 --- a/pkg/worker/report/parse_test.go +++ b/pkg/worker/report/parse_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/worker/config" ) diff --git a/pkg/worker/report/popeye/parse.go b/pkg/worker/report/popeye/parse.go index 08b0bab0..7255f16f 100644 --- a/pkg/worker/report/popeye/parse.go +++ b/pkg/worker/report/popeye/parse.go @@ -23,7 +23,7 @@ import ( "github.com/go-logr/logr" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" ) var ( diff --git a/pkg/worker/report/popeye/parse_test.go b/pkg/worker/report/popeye/parse_test.go index 0df05ab7..e9779f4c 100644 --- a/pkg/worker/report/popeye/parse_test.go +++ b/pkg/worker/report/popeye/parse_test.go @@ -23,7 +23,7 @@ import ( "github.com/go-logr/logr" "github.com/google/go-cmp/cmp" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" ) func TestPrepareIdAndMsg(t *testing.T) { diff --git a/pkg/worker/report/popeye/parse_types.go b/pkg/worker/report/popeye/parse_types.go index 9df318c3..1461d77f 100644 --- a/pkg/worker/report/popeye/parse_types.go +++ b/pkg/worker/report/popeye/parse_types.go @@ -14,7 +14,7 @@ package popeye -import zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" +import zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" var ( // LevelToIssueSeverity maps Popeye's type to Zora's diff --git a/pkg/worker/run/run.go b/pkg/worker/run.go similarity index 97% rename from pkg/worker/run/run.go rename to pkg/worker/run.go index 5313d824..8120d555 100644 --- a/pkg/worker/run/run.go +++ b/pkg/worker/run.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package run +package worker import ( "context" @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" - zorav1a1 "github.com/undistro/zora/apis/zora/v1alpha1" + zorav1a1 "github.com/undistro/zora/api/zora/v1alpha1" "github.com/undistro/zora/pkg/clientset/versioned" "github.com/undistro/zora/pkg/worker/config" "github.com/undistro/zora/pkg/worker/report" diff --git a/pkg/worker/run/run_test.go b/pkg/worker/run_test.go similarity index 99% rename from pkg/worker/run/run_test.go rename to pkg/worker/run_test.go index 0bd80029..cfe85785 100644 --- a/pkg/worker/run/run_test.go +++ b/pkg/worker/run_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package run +package worker import ( "fmt"