diff --git a/.buildkite/pipeline-release-operatorhub.yml b/.buildkite/pipeline-release-operatorhub.yml new file mode 100644 index 0000000000..b3a3e9aac1 --- /dev/null +++ b/.buildkite/pipeline-release-operatorhub.yml @@ -0,0 +1,50 @@ + +agents: + image: docker.elastic.co/ci-agent-images/cloud-k8s-operator/buildkite-agent:latest + cpu: "4" + memory: "2G" + +steps: + + - group: redhat-release + + steps: + + - label: "build operatorhub tool" + key: "build-operatorhub-tool" + commands: + - cd hack/operatorhub + - make build + - chmod u+x bin/operatorhub + - buildkite-agent artifact upload "bin/operator*" + + - label: "Generate CRDs" + key: "generate-crds" + depends_on: + - "build-operatorhub-tool" + commands: + - make generate-crds-v1 + artifact_paths: + - "config/*.yaml" + + - label: "run container push" + key: "redhat-container-push" + depends_on: + - "generate-crds" + commands: + - buildkite-agent artifact download "bin/operator*" /usr/local/ + - /usr/local/bin/operatorhub container push --dry-run=false + + - label: "run container preflight" + key: "redhat-preflight" + depends_on: + - "redhat-container-push" + commands: + - .buildkite/scripts/operatorhub/operations.sh preflight + + - label: "run remaining release" + key: "redhat-release" + depends_on: + - "redhat-preflight" + commands: + - .buildkite/scripts/operatorhub/operations.sh release diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index be14d49ee8..30afa1589e 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -143,3 +143,12 @@ steps: if: build.message == "release all helm charts" commands: - buildkite-agent pipeline upload .buildkite/pipeline-helm-release-all.yml + + - group: redhat-release + + steps: + + - label: "redhat operatorhub" + if: build.message == "run operatorhub release" + commands: + - buildkite-agent pipeline upload .buildkite/pipeline-release-operatorhub.yml diff --git a/.buildkite/scripts/operatorhub/operations.sh b/.buildkite/scripts/operatorhub/operations.sh new file mode 100755 index 0000000000..cfe5d3a80e --- /dev/null +++ b/.buildkite/scripts/operatorhub/operations.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. + +# Required environment variables: +# For 'preflight' command: +# OHUB_TAG + +set -euo pipefail + +preflight() { + if [[ -z ${OHUB_TAG} ]]; then + echo "OHUB_TAG environment variable is required" + exit 1 + fi + + OHUB_API_KEY="$(vault read -field=api-key secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat)" + export OHUB_API_KEY + OHUB_PROJECT_ID="$(vault read -field=project-id secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat)" + export OHUB_PROJECT_ID + + curl -s -G "https://catalog.redhat.com/api/containers/v1/projects/certification/id/$OHUB_PROJECT_ID/images?filter=repositories.tags.name==$OHUB_TAG" -H "X-API-KEY: $OHUB_API_KEY" > /tmp/redhat.json + + # The following command will fail if no data was returned, so preflight will not run if it's already run + jq -e '.data[0]' /tmp/redhat.json && exit 0 + + # Install known working version of preflight tool. + curl -sL -o /tmp/preflight https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.2.1/preflight-linux-amd64 + chmod u+x /tmp/preflight + + # Pull authentication information for quay.io from vault + vault read -format=json -field=data secret/ci/elastic-cloud-on-k8s/operatorhub-release-preflight > /tmp/auth.json + + /tmp/preflight check container "quay.io/redhat-isv-containers/$OHUB_PROJECT_ID:$OHUB_TAG" --pyxis-api-token="$OHUB_API_KEY" --certification-project-id="$OHUB_PROJECT_ID" --submit -d /tmp/auth.json +} + +release() { + buildkite-agent artifact download "bin/operator*" /usr/local/ + buildkite-agent artifact download "config/*.yaml" . + cd hack/operatorhub + /usr/local/bin/operatorhub container publish --dry-run=false + /usr/local/bin/operatorhub generate-manifests --yaml-manifest=../../config/crds.yaml --yaml-manifest=../../config/operator.yaml + /usr/local/bin/operatorhub bundle generate --dir="$(pwd)" + /usr/local/bin/operatorhub bundle create-pr --dir="$(pwd)" +} + +usage() { + echo "Usage: $0 preflight|release" + echo "preflight: Runs the operatorhub preflight operations in buildkite" + echo "release: Runs the last steps of the operatorhub release steps in buildkite" + exit 2 +} + +if [[ "$#" -ne 1 ]]; then + usage +fi + +case "$1" in + preflight) + preflight + ;; + release) + release + ;; + help) + usage + ;; + *) + echo "Unknown action '$1'" + usage + ;; +esac diff --git a/hack/operatorhub/Makefile b/hack/operatorhub/Makefile new file mode 100644 index 0000000000..2be62ffa23 --- /dev/null +++ b/hack/operatorhub/Makefile @@ -0,0 +1,6 @@ +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. + +build: + go build -o bin/operatorhub main.go diff --git a/hack/operatorhub/README.md b/hack/operatorhub/README.md index 2be7c6f30f..84291ed571 100644 --- a/hack/operatorhub/README.md +++ b/hack/operatorhub/README.md @@ -1,23 +1,230 @@ -Operator Hub Release Generator -=============================== +# OperatorHub Release Operations Commands -Extracts CRDs and RBAC definitions from distribution YAML manifests and generates the files required to publish a new release to Operator Hub. +Set of commands to simplify operations required when releasing new versions of the operator for openshift/operatorhub, and community/certified operators. -Usage ------ +These commands include -- Edit `config.yaml` and update the values to match the new release -- Run the generator -- Inspect the generated files to make sure that they are correct +- Pushing operator image to Quay.io +- Publishing eck operator container image within redhat catalog +- Generate Operator Lifecycle Manager format files +- Generate Operator bundle metadata (wrapper for [OPM](https://github.com/operator-framework/operator-registry/tree/master/cmd/opm) command) +- Publish draft pull requests to both https://github.com/redhat-openshift-ecosystem/certified-operators and https://github.com/k8s-operatorhub/community-operators + +## Configuration + +All commands require the configuration file `config.yaml` to be modified prior to running the commands. + +| Configuration | Description | +|----------------|-----------------------------------------------------------------------------------| +| `newVersion` | The new version of the ECK Operator that is to be released. | +| `prevVersion` | The previous version of the ECK Operator that `newVersion` will replace. | +| `stackVersion` | The Elastic Stack version that will be the default for this ECK Operator version. | +| `minSupportedOpenshiftVersion` | Miniumum supported openshift version. | + +## Commands Overview + +* container - parent command + * push - push operator container to quay.io + * publish - publish operator container within redhat certification API +* generate-manifests - generate operator lifecycle manager format files +* bundle - parent command + * generate - generate operator metadata for publishing on openshift operator hub + * create-pr - perform all git operations and create pull requests for community and certified operator repositories + +## Vault Details + +Certain flags can be automatically read from vault if the `enable-vault` flag is set, typically using the environment variables `VAULT_ADDR` and `VAULT_TOKEN`. + +Example vault secrets +```shell +❯ VAULT_ADDR='http://0.0.0.0:8200' VAULT_TOKEN=myroot vault read -format=json -field=data secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat +{ + "api-key": "api-key-in-keybase", + "project-id": "project-id", + "registry-password": "registry-password-for-quay.io" +} +❯ VAULT_ADDR='http://0.0.0.0:8200' VAULT_TOKEN=myroot vault read -format=json -field=data secret/ci/elastic-cloud-on-k8s/operatorhub-release-github +{ + "github-email": "you@email.com", + "github-fullname": "My Fullname", + "github-token": "ghp_asdflkj12340987", + "github-username": "ghusername" +} +``` + +### Vault Configuration + +If `enable-vault` flag is `true` the following keys will attempt to be read from vault: + +#### Redhat secrets from `redhat-vault-secret` vault location + +`api-key`, `project-id`, and `registry-password` + +#### Github secrets from `github-vault-secret` vault location + +`github-email`, `github-fullname`, `github-token`, `github-username` + +#### Vault flags + +| Parameter | Description | Environment Variable | Default | +|---------------------- |-------------------------------------------------------------------------------|------------------------- |---------| +| `--enable-vault` | If enabled the above variables will attempt to be read from vault. | `OHUB_ENABLE_VAULT` | `false` | +| `--vault-addr` | Vault address to read secrets from. | `VAULT_ADDR` | `""` | +| `--vault-token` | Vault token to use for authentication. | `VAULT_TOKEN` | `""` | +| `--github-vault-secret`| Vault secret path to github secrets. | `OHUB_GITHUB_VAULT_SECRET` | `""` | +| `--redhat-vault-secret`| Vault secret path to redhat secrets. | `OHUB_REDHAT_VAULT_SECRET` | `""` | + + +## Container Command + +### Push sub-command + +The `container push` sub-command will perform the following tasks: +1. Determine if there is an image in the [redhat certification API](https://catalog.redhat.com/api/containers/v1) that has the given `tag` associated with `newVersion`, using the provided `project-id`. +2. If image is already found, nothing is done without using the `force` flag. +3. If image not found, or `force` flag set, will push `docker.elastic.co/eck/eck-operator-ubi8:$(newVersion)` to `quay.io` docker registry, tagged as `quay.io/redhat-isv-containers/$(project-id):$(newVersion)`. + +### Publish sub-command + +The `container publish` sub-command will perform the following tasks: +1. It will wait for the image to be found in the Red Hat certification API. +2. It will wait for the image scan to be found successful in the Red Hat certification API. +3. It will "publish" the container within the Red Hat certification API. + +### Usage + +Usage without vault +```shell +./operatorhub container push -a 'api-key-in-keybase' -p `project-id`-r `registry-password-for-quay.io` --dry-run=false +./operatorhub container publish -a 'api-key-in-keybase' -p `project-id` -r `registry-password-for-quay.io` --dry-run=false +``` + +Usage with vault +```shell +OHUB_GITHUB_VAULT_SECRET="secret/ci/elastic-cloud-on-k8s/operatorhub-release-github" OHUB_REDHAT_VAULT_SECRET="secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat" VAULT_ADDR='https://vault-server:8200' VAULT_TOKEN=my-token ./bin/operatorhub container publish --enable-vault --dry-run=false +``` + +### Flags + +| Parameter | Description | Environment Variable | Default | +|---------------------- |-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|-------------------| +| `--api-key` | API key to use when communicating with redhat certification API. | `OHUB_API_KEY` | `""` | +| `--conf` | Path to config.yaml file. | `OHUB_CONF` | `"./config.yaml"` | +| `--registry-password` | Registry password used to communicate with Quay.io. | `OHUB_REGISTRY_PASSWORD` | `""` | +| `--project-id` | Red Hat project id within the Red Hat technology portal. | `OHUB_PROJECT_ID` | `""` | +| `--dry-run` | Only validation will be run for the push command if set. The publish command will ensure the image is scanned but will not publish if set.| `OHUB_DRY_RUN` | `true` | + +## Generate Manifests Command + +The `generate-manifests` command will extracts CRDs and RBAC definitions from distribution YAML manifests +(either yaml manifests from flag, or pulled from internet) and generates the files required to publish +a new release to OperatorHub. These files are written within the following 3 directories: + +- community-operators +- upstream-community-operators +- certified-operators + +### Usage + +To generate configuration for a previously released manifest version ```shell -go run main.go --conf=config.yaml +./bin/operatorhub generate-manifests -c config.yaml ``` To generate configuration based on yet unreleased YAML manifests: ```shell -go run main.go --conf=config.yaml --yaml-manifest=../../config/crds.yaml --yaml-manifest=../../config/operator.yaml +# If using newVersion|prevVersion|stackVersion variables in config.yaml +./bin/operatorhub generate-manifests -c config.yaml -y ../../config/crds.yaml -y ./../config/operator.yaml +``` + +### Flags + +| Parameter | Description | Environment Variable | Default | +|-------------------|---------------------------------------------------------------------------------------------------|----------------------|-------------------| +| `--conf` | Path to config.yaml file. | `OHUB_CONF` | `"./config.yaml"` | +| `--yaml-manifest` | Path(s) to yaml installation manifest files. | `OHUB_YAML_MANIFEST` | `""` | +| `--templates` | Path to the templates directory. | `OHUB_TEMPLATES` | `"./templates"` | + +*IMPORTANT: The operator deployment spec is different from the spec in `operator.yaml` and cannot be automatically extracted from it. Therefore, the deployment spec is hardcoded into the template and should be checked with each new release to ensure that it is still correct.* + +## Bundle Command + +*This command's sub-commands all requires the output of the `generate-manifests` command to be run* + +### Generate sub-command + +The `bundle generate` command will perform the following tasks: +1. Run the [opm](https://github.com/operator-framework/operator-registry/tree/master/cmd/opm) command on the output of `operatorhub` command to generate the operator metadata for operator hub publishing + +#### Usage + +- Ensure that the `generate-manifests` command has successfully ran +- Run the `bundle generate` command, pointing to the output directory of the `generate-manifests` command + +With and without vault +```shell +./operatorhub bundle generate -d . +``` + +#### Flags + +| Parameter | Description | Environment Variable | Default | +|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|-------------------| +| `--dir` | Directory containing the output of the `generate-manifests` command. | `OHUB_DIR` | `""` | +| `--conf` | Path to config.yaml file. | `OHUB_CONF` | `"./config.yaml"` | + +### Create-PR sub-command + +The `bundle create-pr` command will perform the following tasks: +1. Will create a pull request in both `redhat-openshift-ecosystem/certified-operators` and `k8s-operatorhub/community-operators` repositories using the output of both `operatorhub` command, and the `bundle generate` command. + +### Usage + +- Ensure that the `bundle generate` command has successfully ran +- If using vault, ensure that your personal Github information is contained within vault, including a temporary/expiring Github API token. + - Your token needs to have the following scopes: `repo`, `workflow`, `read:org`, `read:user`, `user:email` +- Run the `bundle create-pr` command. + +Without vault +```shell +./operatorhub bundle create-pr -d . -f 'Your Name' -g 'your-github-token' -u 'your-github-username' -e 'your-github-email' +``` + +With vault +```shell +OHUB_GITHUB_VAULT_SECRET="secret/ci/elastic-cloud-on-k8s/operatorhub-release-github" OHUB_REDHAT_VAULT_SECRET="secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat" VAULT_ADDR='https://vault-server:8200' VAULT_TOKEN=my-token ./operatorhub bundle create-pr -d . +``` + +### Flags + +| Parameter | Description | Environment Variable | Default | +|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|-------------------| +| `--dir` | Directory containing the output of the `generate-manifests` command. | `OHUB_DIR` | `""` | +| `--conf` | Path to config.yaml file. | `OHUB_CONF` | `"./config.yaml"` | +| `--github-token` | User's Github API token. | `OHUB_GITHUB_TOKEN` | `""` | +| `--github-username` | User's Github username. | `OHUB_GITHUB_USERNAME` | `""` | +| `--github-fullname` | User's Github fullname. | `OHUB_GITHUB_FULLNAME` | `""` | +| `--github-email` | User's Github email address. | `OHUB_GITHUB_EMAIL` | `""` | +| `--delete-temp-directory` | Whether to delete the temporary directory upon completion (useful for debugging). | `OHUB_DELETE_TEMP_DIRECTORY` | `true` | +| `--dry-run` | If set, Github forks, and branches will be created within user's remote, but pull requests will not be created. | `OHUB_DRY_RUN` | `true` | + +## Buildkite Command + +The `buildkite` command will start the operatorhub release operation within Buildkite. + +To generate a Buildkite token for use with this command visit https://buildkite.com/user/api-access-tokens. + +### Usage + +```shell +./bin/operatorhub buildkite -b 'my-buildkite-token' ``` -IMPORTANT: The operator deployment spec is different from the spec in `operator.yaml` and cannot be automatically extracted from it. Therefore, the deployment spec is hardcoded into the template and should be checked with each new release to ensure that it is still correct. +### Flags + +| Parameter | Description | Environment Variable | Default | +|---------------------|---------------------------------------------------------------------------------------------------|------------------------|-------------------| +| `--buildkite-token` | Buildkite token for communicating with the Buildkite API. | `OHUB_BUILDKITE_TOKEN` | `""` | +| `--conf` | Path to config.yaml file. | `OHUB_CONF` | `"./config.yaml"` | diff --git a/hack/operatorhub/cmd/buildkite/buildkite.go b/hack/operatorhub/cmd/buildkite/buildkite.go new file mode 100644 index 0000000000..2e162a1cde --- /dev/null +++ b/hack/operatorhub/cmd/buildkite/buildkite.go @@ -0,0 +1,160 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package buildkite + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "log" + "net/http" + "time" + + "github.com/spf13/cobra" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" +) + +const ( + url = "https://api.buildkite.com/v2/organizations/elastic/pipelines/cloud-on-k8s-operator/builds" +) + +// Command will return the buildkite command +func Command() *cobra.Command { + cmd := &cobra.Command{ + Use: "buildkite", + Short: "Start operatorhub release operation within Buildkite", + Long: "Start operatorhub release operation within Buildkite.", + PreRunE: preRunE, + SilenceUsage: true, + RunE: doRun, + } + + cmd.Flags().StringVarP( + &flags.BuildkiteToken, + flags.BuildkiteTokenFlag, + "b", + "", + "Buildkite token to communicate with Buildkite API (OHUB_BUILDKITE_TOKEN)", + ) + + cmd.Flags().StringVarP( + &flags.BuildkiteBranch, + flags.BuildkiteBranchFlag, + "B", + "main", + "Git branch with operatorhub tooling to use when running release (Should typically be `main` or same as `git-branch` flag; Could be PR branch if changes are not merged) (OHUB_BUILDKITE_BRANCH)", + ) + + cmd.Flags().StringVarP( + &flags.BuildkiteCommit, + flags.BuildkiteCommitFlag, + "c", + "HEAD", + "Git commit SHA to use when running release (OHUB_BUILDKITE_COMMIT)", + ) + + cmd.Flags().StringVarP( + &flags.BuildkitePRRepository, + flags.BuildkitePRRepositoryFlag, + "r", + "", + "Git pull request repository (format git://github.com/org/repo) to use when running release. (Only required when cli tooling changes aren't merged to main) (OHUB_BUILDKITE_PR_REPOSITORY)", + ) + + cmd.Flags().StringVarP( + &flags.BuildkitePRID, + flags.BuildkitePRIDFlag, + "i", + "", + "Git pull request id to use when running release (Only required when cli tooling changes aren't merged to main) (OHUB_BUILDKITE_PR_ID)", + ) + + return cmd +} + +// preRunE are the pre-run operations for the buildkite command +func preRunE(cmd *cobra.Command, args []string) error { + // disable vault integration for this operation + flags.EnableVault = false + + if flags.Conf.NewVersion == "" { + return fmt.Errorf(flags.RequiredErrFmt, "newVersion") + } + + if flags.BuildkiteToken == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.BuildkiteTokenFlag) + } + + if flags.BuildkiteBranch == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.BuildkiteBranchFlag) + } + + if flags.BuildkiteCommit == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.BuildkiteCommitFlag) + } + + return nil +} + +// doRun will start the operatorhub release operation within buildkite +func doRun(_ *cobra.Command, _ []string) error { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + reqBody := body{ + Message: "run operatorhub release", + Env: map[string]string{ + "OHUB_DRY_RUN": fmt.Sprintf("%t", flags.DryRun), + "OHUB_TAG": flags.Conf.NewVersion, + "OHUB_SUPPORTED_OPENSHIFT_VERSIONS": flags.Conf.MinSupportedOpenshiftVersion, + }, + Branch: flags.BuildkiteBranch, + Commit: flags.BuildkiteCommit, + } + + if flags.BuildkitePRRepository != "" { + reqBody.PullRequestRepository = &flags.BuildkitePRRepository + } + if flags.BuildkitePRID != "" { + reqBody.PullRequestID = &flags.BuildkitePRID + } + b, err := json.Marshal(&reqBody) + if err != nil { + return fmt.Errorf("while marshaling body into json: %w", err) + } + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(b)) + if err != nil { + return fmt.Errorf("while generating new http request: %w", err) + } + req.Header.Add("authorization", fmt.Sprintf("Bearer %s", flags.BuildkiteToken)) + res, err := http.DefaultClient.Do(req) + if err != nil { + return fmt.Errorf("while executing buildkite request: %w", err) + } + defer res.Body.Close() + var bodyBytes []byte + bodyBytes, err = io.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("failed to read buildkite response body: %w", err) + } + if res.StatusCode < 200 || res.StatusCode > 299 { + return fmt.Errorf("request to start buildkite build failed, code: %d, body: %s", res.StatusCode, string(bodyBytes)) + } + log.Println("Buildkite build submitted successfully") + return nil +} + +// body is the HTTP body for submitting a buildkite request to start a new build +type body struct { + Message string `json:"message"` + Env map[string]string `json:"env"` + Commit string `json:"commit"` + Branch string `json:"branch"` + PullRequestRepository *string `json:"pull_request_repository"` + PullRequestID *string `json:"pull_request_id"` +} diff --git a/hack/operatorhub/cmd/bundle/bundle.go b/hack/operatorhub/cmd/bundle/bundle.go new file mode 100644 index 0000000000..1d16c14ced --- /dev/null +++ b/hack/operatorhub/cmd/bundle/bundle.go @@ -0,0 +1,178 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package bundle + +import ( + "fmt" + "path" + "path/filepath" + "strings" + + "github.com/spf13/cobra" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/internal/github" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/internal/opm" +) + +// Command will return the bundle command +func Command() *cobra.Command { + bundleCmd := &cobra.Command{ + Use: "bundle", + Short: "generate operator bundle metadata/create pull requests for new operator versions", + Long: `Bundle and build operator metadata for publishing on openshift operator hub, and create pull requests to +certified-operators, and community-operators repositories.`, + SilenceUsage: true, + } + + generateCmd := &cobra.Command{ + Use: "generate", + Short: "generate operator bundle metadata", + Long: "Bundle and build operator metadata for publishing on openshift operator hub", + SilenceUsage: true, + PreRunE: generateCmdPreRunE, + RunE: doGenerate, + } + + createPRCmd := &cobra.Command{ + Use: "create-pr", + Short: "create pull requests against community and certified repositories", + Long: `Create pull requests using output of 'bundle' command against +certified-operators and community-operators repositories.`, + SilenceUsage: true, + PreRunE: createPRPreRunE, + RunE: doCreatePR, + } + + bundleCmd.PersistentFlags().StringVarP( + &flags.Dir, + flags.DirFlag, + "d", + "", + "directory containing output from 'operatorhub command' which contains 'certified-operators', and 'community-operators' subdirectories. (OHUB_DIR)", + ) + + createPRCmd.Flags().StringVarP( + &flags.GithubToken, + flags.GithubTokenFlag, + "g", + "", + "if 'dry-run' isn't set, user's token to communicate with github.com (OHUB_GITHUB_TOKEN)", + ) + + createPRCmd.Flags().StringVarP( + &flags.GithubUsername, + flags.GithubUsernameFlag, + "u", + "", + "if 'dry-run' isn't set, github username to use to fork repositories, and submit PRs (OHUB_GITHUB_USERNAME)", + ) + + createPRCmd.Flags().StringVarP( + &flags.GithubFullname, + flags.GithubFullnameFlag, + "f", + "", + "if 'dry-run' isn't set, github full name to use to add to commit message (OHUB_GITHUB_FULLNAME)", + ) + + createPRCmd.Flags().StringVarP( + &flags.GithubEmail, + flags.GithubEmailFlag, + "e", + "", + "if 'dry-run' isn't set, github email to use to add to commit message (OHUB_GITHUB_EMAIL)", + ) + + createPRCmd.Flags().BoolVarP( + &flags.DeleteTempDirectory, + flags.DeleteTempDirectoryFlag, + "D", + true, + "delete git temporary directory after script completes (OHUB_DELETE_TEMP_DIRECTORY)", + ) + + bundleCmd.AddCommand(generateCmd, createPRCmd) + + return bundleCmd +} + +// generateCmdPreRunE are pre-run operations for the generate command +func generateCmdPreRunE(cmd *cobra.Command, args []string) error { + if flags.Dir == "" { + return fmt.Errorf("directory containing output from operator hub release generator is required (%s)", flags.DirFlag) + } + if flags.Conf.MinSupportedOpenshiftVersion == "" { + return fmt.Errorf("minimum supported openshift version is required in configuration file") + } else if strings.Contains(flags.Conf.MinSupportedOpenshiftVersion, "-") { + return fmt.Errorf("minimum supported openshift version in configuration file should not be a range") + } + return nil +} + +// createPRPreRunE are pre-run operations for the create pull request command +func createPRPreRunE(cmd *cobra.Command, args []string) error { + if flags.Dir == "" { + return fmt.Errorf("directory containing output from operator hub release generator is required (%s)", flags.DirFlag) + } + + if flags.GithubToken == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.GithubTokenFlag) + } + if flags.GithubUsername == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.GithubUsernameFlag) + } + if flags.GithubFullname == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.GithubFullnameFlag) + } + if flags.GithubEmail == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.GithubEmailFlag) + } + + return nil +} + +// doGenerate will generate the operator bundle metadata +func doGenerate(_ *cobra.Command, _ []string) error { + dir := filepath.Join(flags.Dir, "certified-operators", flags.Conf.NewVersion) + err := opm.GenerateBundle(opm.GenerateConfig{ + LocalDirectory: dir, + OutputDirectory: dir, + }) + if err != nil { + return err + } + err = opm.EnsureAnnotations(path.Join(dir, "metadata", "annotations.yaml"), flags.Conf.MinSupportedOpenshiftVersion) + if err != nil { + return err + } + return opm.EnsureLabels(path.Join(flags.Dir, "bundle.Dockerfile"), flags.Conf.MinSupportedOpenshiftVersion) +} + +// doCreatePR will execute a number of local, and potentially remote github operations +// for each of the certified, and community github repositories. +// 1. Clone the repository to a temporary directory +// 2. Ensure that the configured github user has forked the repository +// 3. Create a git remote +// 4. Create a new git branch named from the configured git tag +// 5. Checkout the new branch +// 6. Copy the operator manifests, from the configured directory, into the clone directory +// 7. "git add" the new directory to the working tree +// 8. Create a new commit for the new changes +// 9. Push the remote to the fork +// 10. Potentially create a draft pull request in the remote repository +func doCreatePR(_ *cobra.Command, _ []string) error { + client := github.New(github.Config{ + DryRun: flags.DryRun, + GitHubEmail: flags.GithubEmail, + GitHubFullName: flags.GithubFullname, + GitHubUsername: flags.GithubUsername, + GitHubToken: flags.GithubToken, + GitTag: flags.Conf.NewVersion, + KeepTempFiles: !flags.DeleteTempDirectory, + PathToNewVersion: flags.Dir, + }) + return client.CloneRepositoryAndCreatePullRequest() +} diff --git a/hack/operatorhub/cmd/container/container.go b/hack/operatorhub/cmd/container/container.go new file mode 100644 index 0000000000..c2d4572e6d --- /dev/null +++ b/hack/operatorhub/cmd/container/container.go @@ -0,0 +1,123 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package container + +import ( + "fmt" + "time" + + "github.com/spf13/cobra" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/internal/container" +) + +// Command will return the container command +func Command() *cobra.Command { + cmd := &cobra.Command{ + Use: "container", + Short: "push and publish eck operator container to quay.io", + Long: "Push and Publish eck operator container image to quay.io.", + SilenceUsage: true, + } + + publishCmd := &cobra.Command{ + Use: "publish", + Short: "publish existing eck operator container image within quay.io", + Long: "Publish existing eck operator container image within quay.io using the Redhat certification API.", + RunE: doPublish, + PreRunE: preRunE, + SilenceUsage: true, + } + + pushCmd := &cobra.Command{ + Use: "push", + Short: "push eck operator container image to quay.io", + RunE: doPush, + PreRunE: preRunE, + SilenceUsage: true, + } + + cmd.PersistentFlags().StringVarP( + &flags.APIKey, + flags.APIKeyFlags, + "a", + "", + "API key to use when communicating with redhat certification API (OHUB_API_KEY)", + ) + + cmd.PersistentFlags().StringVarP( + &flags.RegistryPassword, + flags.RegistryPasswordFlag, + "r", + "", + "registry password used to communicate with Quay.io (OHUB_REGISTRY_PASSWORD)", + ) + + cmd.PersistentFlags().BoolVarP( + &flags.Force, + flags.ForceFlag, + "F", + false, + "force will force the attempted pushing of remote images, even when the exact version is found remotely. (OHUB_FORCE)", + ) + + publishCmd.Flags().DurationVarP( + &flags.ScanTimeout, + flags.ScanTimeoutFlag, + "S", + 1*time.Hour, + "The duration the publish operation will wait on image being scanned before failing the process completely. (OHUB_SCAN_TIMEOUT)", + ) + + cmd.AddCommand(pushCmd, publishCmd) + + return cmd +} + +// preRunE are the pre-run operations for the container command's sub-commands. +func preRunE(cmd *cobra.Command, args []string) error { + if flags.APIKey == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.APIKeyFlags) + } + + if flags.RegistryPassword == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.RegistryPasswordFlag) + } + + if flags.ProjectID == "" { + return fmt.Errorf(flags.RequiredErrFmt, flags.ProjectIDFlag) + } + + return nil +} + +// doPublish will publish an existing image within the redhat catalog. +func doPublish(_ *cobra.Command, _ []string) error { + return container.PublishImage(container.PublishConfig{ + CommonConfig: container.CommonConfig{ + DryRun: flags.DryRun, + ProjectID: flags.ProjectID, + RedhatCatalogAPIKey: flags.APIKey, + RegistryPassword: flags.RegistryPassword, + Tag: flags.Conf.NewVersion, + }, + ImageScanTimeout: flags.ScanTimeout, + }) +} + +// doPush will push an image to the redhat registry for scanning. +func doPush(_ *cobra.Command, _ []string) error { + return container.PushImage(container.PushConfig{ + CommonConfig: container.CommonConfig{ + DryRun: flags.DryRun, + ProjectID: flags.ProjectID, + RedhatCatalogAPIKey: flags.APIKey, + RegistryPassword: flags.RegistryPassword, + Tag: flags.Conf.NewVersion, + }, + Force: flags.Force, + }) +} diff --git a/hack/operatorhub/cmd/flags/flags.go b/hack/operatorhub/cmd/flags/flags.go new file mode 100644 index 0000000000..fe14bda7a7 --- /dev/null +++ b/hack/operatorhub/cmd/flags/flags.go @@ -0,0 +1,124 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package flags + +import ( + "time" +) + +const ( + // common missing flag error + RequiredErrFmt = "%s is required" + + // root flags + ConfFlag = "conf" + DryRunFlag = "dry-run" + EnableVaultFlag = "enable-vault" + VaultAddressFlag = "vault-addr" + VaultTokenFlag = "vault-token" + RedhatVaultSecretFlag = "redhat-vault-secret" + GithubVaultSecretFlag = "github-vault-secret" //nolint:gosec + + // bundle command flags + DirFlag = "dir" + GithubTokenFlag = "github-token" + GithubUsernameFlag = "github-username" + GithubFullnameFlag = "github-fullname" + GithubEmailFlag = "github-email" + DeleteTempDirectoryFlag = "delete-temp-directory" + + // container command flags + APIKeyFlags = "api-key" + RegistryPasswordFlag = "registry-password" + ProjectIDFlag = "project-id" + ForceFlag = "force" + ScanTimeoutFlag = "scan-timeout" + + // operatorhub command flags + YamlManifestFlag = "yaml-manifest" + TemplatesFlag = "templates" + RootPathFlag = "root-path" + + // buildkite command flag + BuildkiteTokenFlag = "buildkite-token" + BuildkiteBranchFlag = "buildkite-branch" + BuildkiteCommitFlag = "buildkite-commit" + BuildkitePRRepositoryFlag = "buildkite-pr-repository" + BuildkitePRIDFlag = "buildkite-pr-id" +) + +var ( + // bundle command variables + Dir string + GithubToken string + GithubUsername string + GithubFullname string + GithubEmail string + DeleteTempDirectory bool + + // container command variables + APIKey string + RegistryPassword string + ProjectID string + Force bool + ScanTimeout time.Duration + + // root command variables + ConfigPath string + DryRun bool + EnableVault bool + GithubVaultSecret string + RedhatVaultSecret string + VaultAddress string + VaultToken string + + // operatorhub command variables + Conf *Config + YamlManifest []string + Templates string + RootPath string + + // buildkite command variable + BuildkiteToken string + BuildkiteBranch string + BuildkiteCommit string + BuildkitePRRepository string + BuildkitePRID string +) + +// Config is the configuration that matches the config.yaml +type Config struct { + NewVersion string `json:"newVersion"` + PrevVersion string `json:"prevVersion"` + StackVersion string `json:"stackVersion"` + MinSupportedOpenshiftVersion string `json:"minSupportedOpenShiftVersion"` + CRDs []struct { + Name string `json:"name"` + DisplayName string `json:"displayName"` + Description string `json:"description"` + } `json:"crds"` + Packages []struct { + OutputPath string `json:"outputPath"` + PackageName string `json:"packageName"` + DistributionChannel string `json:"distributionChannel"` + OperatorRepo string `json:"operatorRepo"` + UbiOnly bool `json:"ubiOnly"` + DigestPinning bool `json:"digestPinning"` + } `json:"packages"` +} + +// HasDigestPinning will return true if any package +// within the configuration has DigestPinning enabled. +func (c *Config) HasDigestPinning() bool { + if c == nil { + return false + } + for _, pkg := range c.Packages { + if pkg.DigestPinning { + return true + } + } + return false +} diff --git a/hack/operatorhub/cmd/manifests/manifests.go b/hack/operatorhub/cmd/manifests/manifests.go new file mode 100644 index 0000000000..0dcc410a3d --- /dev/null +++ b/hack/operatorhub/cmd/manifests/manifests.go @@ -0,0 +1,64 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package manifests + +import ( + "github.com/spf13/cobra" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" + hub "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/internal/operatorhub" +) + +// Command will return the generate-manifests command +func Command() *cobra.Command { + cmd := &cobra.Command{ + Use: "generate-manifests", + Short: "Generate operator lifecycle manager format files", + Long: `Generate operator lifecycle manager format files within +'community-operators', 'certified-operators', and 'upstream-community-operators' directories.`, + Example: "operatorhub generate-manifests -c ./config.yaml -y ../../config/crds.yaml -y ./../config/operator.yaml", + SilenceUsage: true, + PreRunE: preRunE, + RunE: doRun, + } + + cmd.Flags().StringSliceVarP( + &flags.YamlManifest, + flags.YamlManifestFlag, + "y", + nil, + "Path to installation manifests (OHUB_YAML_MANIFEST)", + ) + + cmd.Flags().StringVarP( + &flags.Templates, + flags.TemplatesFlag, + "T", + "./templates", + "Path to the templates directory (OHUB_TEMPLATES)", + ) + + return cmd +} + +// preRunE are the pre-run operations for the generate-manifests command +func preRunE(cmd *cobra.Command, args []string) error { + // validation for apikey, and redhat project id is not done + // here, but is done after reading the configuration file + // and checking whether digest pinning `digestPinning: true` + // is enabled for any of the packages in the config file. + return nil +} + +// doRun will run the generate-manifests command +func doRun(_ *cobra.Command, _ []string) error { + return hub.Generate(hub.GenerateConfig{ + ConfigFile: flags.Conf, + ManifestPaths: flags.YamlManifest, + TemplatesPath: flags.Templates, + RedhatAPIKey: flags.APIKey, + RedhatProjectID: flags.ProjectID, + }) +} diff --git a/hack/operatorhub/cmd/root.go b/hack/operatorhub/cmd/root.go new file mode 100644 index 0000000000..347d7e710d --- /dev/null +++ b/hack/operatorhub/cmd/root.go @@ -0,0 +1,208 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package root + +import ( + "fmt" + "os" + "strings" + + gyaml "github.com/ghodss/yaml" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/spf13/viper" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/buildkite" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/bundle" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/container" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/manifests" +) + +// Cmd represents the root command for Red Hat/operatorhub release operations +var Cmd = cobra.Command{ + Use: "operatorhub", + Version: "0.5.0", + Short: "Manage operatorhub release operations", + Long: `Manage operatorhub release operations, such as pushing operator container to quay.io, operator hub release generation, building operator metadata, +and potentially creating pull requests to community/certified operator repositories.`, + // PersistentPreRunE is used here to ensure that all sub-commands + // run these initialization steps, and can properly use both the vault + // integration and the flag variables defined in the cmd/flags package. + PersistentPreRunE: rootPersistentPreRunE, +} + +func init() { + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) + + Cmd.Flags().StringVarP( + &flags.ConfigPath, + flags.ConfFlag, + "c", + "./config.yaml", + "Path to configiguration file (OHUB_CONF)", + ) + + Cmd.PersistentFlags().StringVarP( + &flags.APIKey, + flags.APIKeyFlags, + "a", + "", + "API key to use when communicating with Red Hat certification API. Used in both the bundle, and generate-manifests sub-commands. (OHUB_API_KEY)", + ) + + Cmd.PersistentFlags().StringVarP( + &flags.ProjectID, + flags.ProjectIDFlag, + "p", + "", + "Red Hat project id within the Red Hat technology portal (OHUB_PROJECT_ID)", + ) + + Cmd.PersistentFlags().BoolVarP( + &flags.DryRun, + flags.DryRunFlag, + "Y", + true, + "Run dry run of all operations. Default: true. To un-set --dry-run=false (OHUB_DRY_RUN)", + ) + + Cmd.PersistentFlags().BoolVar( + &flags.EnableVault, + flags.EnableVaultFlag, + true, + "Enable vault functionality to try and automatically read from given vault keys (uses VAULT_* environment variables) (OHUB_ENABLE_VAULT)", + ) + + Cmd.PersistentFlags().StringVar( + &flags.VaultAddress, + flags.VaultAddressFlag, + "", + "Vault address to use when enable-vault is set (VAULT_ADDR)", + ) + + Cmd.PersistentFlags().StringVar( + &flags.VaultToken, + flags.VaultTokenFlag, + "", + "Vault token to use when enable-vault is set (VAULT_TOKEN)", + ) + + Cmd.PersistentFlags().StringVar( + &flags.RedhatVaultSecret, + flags.RedhatVaultSecretFlag, + "secret/ci/elastic-cloud-on-k8s/operatorhub-release-redhat", + `When --enable-vault is set, attempts to read the following flags from a given vault secret: + * container sub-command flags concerning redhat interactions: + ** registry-password + ** project-id + ** api-key +(OHUB_REDHAT_VAULT_SECRET)`, + ) + + Cmd.PersistentFlags().StringVar( + &flags.GithubVaultSecret, + flags.GithubVaultSecretFlag, + "secret/ci/elastic-cloud-on-k8s/operatorhub-release-github", + `When --enable-vault is set, attempts to read the following flags from a given vault secret: + * bundle sub-command flags concerning generating operator bundle and creating PRs: + ** github-token + ** github-username + ** github-fullname + ** github-email +(OHUB_GITHUB_VAULT_SECRET)`, + ) + + Cmd.AddCommand( + bundle.Command(), + container.Command(), + manifests.Command(), + buildkite.Command(), + ) +} + +func rootPersistentPreRunE(cmd *cobra.Command, args []string) error { + // prefix all environment variables with "OHUB_" + viper.SetEnvPrefix("OHUB") + // automatically translate dashes in flags to underscores in environment vars + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) + + if err := viper.BindPFlags(cmd.PersistentFlags()); err != nil { + return fmt.Errorf("failed to bind persistent flags: %w", err) + } + + if err := viper.BindPFlags(cmd.Flags()); err != nil { + return fmt.Errorf("failed to bind flags: %w", err) + } + + if err := setVariablesFromConfigurationFile(); err != nil { + return err + } + + // vault environment variables need to also support not + // having OHUB prefix, as they exist in CI/Buildkite. + viper.BindEnv(flags.VaultAddressFlag, "VAULT_ADDR") + viper.BindEnv(flags.VaultTokenFlag, "VAULT_TOKEN") + + viper.AutomaticEnv() + + if viper.GetBool(flags.EnableVaultFlag) { + // ensure that the flag variables are set using what's current in viper configuration prior to calling + // command to read secrets from vault, as the flags are exclusively used, not viper directly. + for _, flag := range []string{ + flags.VaultAddressFlag, + flags.VaultTokenFlag, + flags.RedhatVaultSecretFlag, + flags.GithubVaultSecretFlag} { + if viper.GetString(flag) == "" { + return fmt.Errorf("%s is required when %s is set", flag, flags.EnableVaultFlag) + } + cmd.Flags().Set(flag, viper.GetString(flag)) + } + if err := readAllSecretsFromVault(); err != nil { + return err + } + } + + // set all flag variables with what's set within viper prior to running to allow + // (sub)commands to use the variables in cmd/flags directly without calling viper. + bindFlags(cmd, viper.GetViper()) + + return nil +} + +func setVariablesFromConfigurationFile() error { + confFilePath := viper.GetString(flags.ConfFlag) + b, err := os.ReadFile(confFilePath) + if err != nil { + return fmt.Errorf("while reading configuration file %s: %w", confFilePath, err) + } + err = gyaml.Unmarshal(b, flags.Conf) + if err != nil { + return fmt.Errorf("while unmarshaling config file into configuration struct: %w", err) + } + if flags.Conf == nil { + return fmt.Errorf("configuration from config file empty after yaml unmarshal") + } + for k, v := range map[string]string{"newVersion": flags.Conf.NewVersion, "prevVersion": flags.Conf.PrevVersion, "stackVersion": flags.Conf.StackVersion} { + if v == "" { + return fmt.Errorf("%s must be defined in %s and not be empty", k, confFilePath) + } + } + return nil +} + +// bindFlags will be called last prior to running all (sub)commands to set all cobra flags +// to what is set within viper so that all subsequent operations can use cmd/flags variables +// directly without calling viper. +func bindFlags(cmd *cobra.Command, v *viper.Viper) { + cmd.Flags().VisitAll(func(f *pflag.Flag) { + // Apply the viper config value to the flag when the flag has not been set by the user and viper has a value + if !f.Changed && v.IsSet(f.Name) { + val := v.Get(f.Name) + cmd.Flags().Set(f.Name, fmt.Sprintf("%v", val)) + } + }) +} diff --git a/hack/operatorhub/cmd/vault.go b/hack/operatorhub/cmd/vault.go new file mode 100644 index 0000000000..e165ade972 --- /dev/null +++ b/hack/operatorhub/cmd/vault.go @@ -0,0 +1,96 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package root + +import ( + "fmt" + "net/http" + "time" + + "github.com/hashicorp/vault/api" + "github.com/spf13/viper" + + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" +) + +const ( + // the following 3 constants are keys expected + // within the vault secret map for the redhat + // certification workflow. + registryPasswordVaultSecretDataKey = "registry-password" + projectIDVaultSecretDataKey = "project-id" + apiKeyVaultSecretDataKey = "api-key" + + // the following 4 constants are keys expected + // within the vault secret map for the the + // creation of pull requests against community/certified + // github repositories. + githubTokenVaultSecretDataKey = "github-token" + githubUsernameVaultSecretDataKey = "github-username" + githubFullnameVaultSecretDataKey = "github-fullname" + githubEmailVaultSecretDataKey = "github-email" +) + +var ( + redhatVaultSecretDataKeys = []string{registryPasswordVaultSecretDataKey, projectIDVaultSecretDataKey, apiKeyVaultSecretDataKey} + githubVaultSecretDataKeys = []string{githubTokenVaultSecretDataKey, githubUsernameVaultSecretDataKey, githubFullnameVaultSecretDataKey, githubEmailVaultSecretDataKey} +) + +// readAllSecretsFromVault will generate a new vault client using the address, and token +// set previously using viper, and attempt to read both the "redhat-vault-secret" +// and "github-vault-secret" flags from vault, extracting the given map's keys, and +// setting the appropriate viper key. +func readAllSecretsFromVault() error { + client, err := api.NewClient(&api.Config{ + Address: flags.VaultAddress, + HttpClient: &http.Client{ + Timeout: 10 * time.Second, + }, + }) + + if err != nil { + return fmt.Errorf("while creating vault client: %w", err) + } + + client.SetToken(flags.VaultToken) + + if err := readVaultSecretAndSetViperKeys(client, flags.RedhatVaultSecret, redhatVaultSecretDataKeys); err != nil { + return err + } + + if err := readVaultSecretAndSetViperKeys(client, flags.GithubVaultSecret, githubVaultSecretDataKeys); err != nil { + return err + } + + return nil +} + +// readVaultSecretAndSetViperKeys will read a vault secret at "vaultSecretPath" using the given vault +// client, and for every key in the slice of keys, the value at the secret map's key will be read, and +// used to set the viper key of the same name. +func readVaultSecretAndSetViperKeys(client *api.Client, vaultSecretPath string, keys []string) error { + secret, err := client.Logical().Read(vaultSecretPath) + if err != nil { + return fmt.Errorf("while reading vault secret (%s): %w", vaultSecretPath, err) + } + + if secret == nil { + return fmt.Errorf("found no secret at location: %s", vaultSecretPath) + } + + for _, key := range keys { + data, ok := secret.Data[key] + if !ok { + return fmt.Errorf("key (%s) not found in vault in secret (%s)", key, vaultSecretPath) + } + stringData, ok := data.(string) + if !ok { + return fmt.Errorf("while converting secret data to string: %T %#v", secret.Data[key], secret.Data[key]) + } + + viper.Set(key, stringData) + } + return nil +} diff --git a/hack/operatorhub/config.yaml b/hack/operatorhub/config.yaml index e93f8514d4..0c46c4ec45 100644 --- a/hack/operatorhub/config.yaml +++ b/hack/operatorhub/config.yaml @@ -1,6 +1,7 @@ newVersion: 2.7.0-SNAPSHOT prevVersion: 2.6.2 stackVersion: 8.7.0-SNAPSHOT +minSupportedOpenshiftVersion: v4.7 crds: - name: elasticsearches.elasticsearch.k8s.elastic.co displayName: Elasticsearch Cluster diff --git a/hack/operatorhub/go.mod b/hack/operatorhub/go.mod index 53ef635e35..a3492605ec 100644 --- a/hack/operatorhub/go.mod +++ b/hack/operatorhub/go.mod @@ -4,53 +4,191 @@ go 1.19 require ( github.com/Masterminds/sprig/v3 v3.2.3 - github.com/ghodss/yaml v1.0.0 + github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 + github.com/go-git/go-git/v5 v5.4.2 + github.com/google/go-containerregistry v0.12.0 + github.com/hashicorp/vault/api v1.8.2 + github.com/operator-framework/operator-registry v1.19.5 + github.com/otiai10/copy v1.2.0 + github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 - k8s.io/api v0.22.4 - k8s.io/apiextensions-apiserver v0.22.4 - k8s.io/apimachinery v0.22.4 + k8s.io/api v0.25.4 + k8s.io/apiextensions-apiserver v0.25.0 + k8s.io/apimachinery v0.25.4 k8s.io/kubectl v0.22.4 ) require ( + github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect + github.com/bshuster-repo/logrus-logstash-hook v1.0.2 // indirect + github.com/docker/cli v20.10.21+incompatible // indirect + github.com/docker/docker v20.10.20+incompatible // indirect + github.com/golang/mock v1.5.0 // indirect + github.com/mattn/go-sqlite3 v1.14.12 // indirect + gotest.tools/v3 v3.4.0 // indirect + rsc.io/letsencrypt v0.0.3 // indirect +) + +require ( + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/Microsoft/hcsshim v0.8.9 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed // indirect + github.com/armon/go-metrics v0.4.0 // indirect + github.com/armon/go-radix v1.0.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cenkalti/backoff/v3 v3.0.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f // indirect + github.com/containerd/containerd v1.4.11 // indirect + github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect + github.com/containerd/stargz-snapshotter/estargz v0.12.1 // indirect + github.com/containerd/ttrpc v1.0.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/docker-credential-helpers v0.7.0 // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-metrics v0.0.1 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/emirpasic/gods v1.12.0 // indirect + github.com/fatih/color v1.13.0 // indirect + github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v0.4.0 // indirect + github.com/go-git/gcfg v1.5.0 // indirect + github.com/go-git/go-billy/v5 v5.3.1 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/cel-go v0.12.4 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/h2non/filetype v1.1.1 // indirect + github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-hclog v1.2.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-plugin v1.4.5 // indirect + github.com/hashicorp/go-retryablehttp v0.6.6 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect + github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect + github.com/hashicorp/go-sockaddr v1.0.2 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/hashicorp/go-version v1.2.0 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/vault/sdk v0.6.0 // indirect + github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect github.com/huandu/xstrings v1.3.3 // indirect - github.com/imdario/mergo v0.3.11 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect + github.com/klauspost/compress v1.15.11 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/copystructure v1.1.1 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.1 // indirect + github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/oklog/run v1.0.0 // indirect + github.com/onsi/gomega v1.24.1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect + github.com/operator-framework/api v0.16.0 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pierrec/lz4 v2.5.2+incompatible // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/ryanuber/go-glob v1.0.0 // indirect + github.com/sergi/go-diff v1.1.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/pflag v1.0.5 + github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/stretchr/testify v1.8.1 // indirect github.com/subosito/gotenv v1.4.2 // indirect + github.com/vbatts/tar-split v0.11.2 // indirect + github.com/xanzy/ssh-agent v0.3.0 // indirect + go.etcd.io/bbolt v1.3.6 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib v0.20.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect + go.opentelemetry.io/otel v0.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect + go.opentelemetry.io/otel/metric v0.20.0 // indirect + go.opentelemetry.io/otel/sdk v0.20.0 // indirect + go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect + go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect + go.opentelemetry.io/otel/trace v0.20.0 // indirect + go.opentelemetry.io/proto/otlp v0.7.0 // indirect + go.uber.org/atomic v1.9.0 // indirect golang.org/x/crypto v0.3.0 // indirect + golang.org/x/mod v0.6.0 // indirect golang.org/x/net v0.7.0 // indirect + golang.org/x/oauth2 v0.1.0 // indirect + golang.org/x/sync v0.1.0 // 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.1.0 // indirect + golang.org/x/tools v0.1.12 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect + google.golang.org/grpc v1.52.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/square/go-jose.v2 v2.5.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/client-go v0.22.4 // indirect - k8s.io/klog/v2 v2.9.0 // indirect - k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + k8s.io/apiserver v0.25.0 // indirect + k8s.io/client-go v0.25.0 // indirect + k8s.io/component-base v0.25.0 // indirect + k8s.io/klog/v2 v2.70.1 // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.32 // indirect + sigs.k8s.io/controller-runtime v0.13.1 // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/hack/operatorhub/go.sum b/hack/operatorhub/go.sum index 059e9b7ddc..2280a46572 100644 --- a/hack/operatorhub/go.sum +++ b/hack/operatorhub/go.sum @@ -1,5 +1,7 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= @@ -37,17 +39,23 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -55,82 +63,223 @@ github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7Y github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/hcsshim v0.8.9 h1:VrfodqvztU8YSOvygU+DN1BGaSGxmrNfqOv5oOuX2Bk= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= 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/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= 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/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed h1:ue9pVfIcP+QMEjfgo/Ez4ZjNZfonGgR6NgjMaJMu1Cg= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bshuster-repo/logrus-logstash-hook v1.0.2 h1:JYRWo+QGnQdedgshosug9hxpPYTB9oJ1ZZD3fY31alU= +github.com/bshuster-repo/logrus-logstash-hook v1.0.2/go.mod h1:HgYntJprnHSPaF9VPPPLP1L5S1vMWxRfa1J+vzDrDTw= +github.com/bugsnag/bugsnag-go v1.5.3 h1:yeRUT3mUE13jL1tGwvoQsKdVbAsQx9AJ+fqahKveP04= +github.com/bugsnag/bugsnag-go v1.5.3/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= +github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= 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/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.11 h1:QCGOUN+i70jEEL/A6JVIbhy4f4fanzAzSR4kNG7SlcE= +github.com/containerd/containerd v1.4.11/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb h1:nXPkFq8X1a9ycY3GYQpFNxHh3j2JgY7zDZfq2EXMIzk= +github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0= +github.com/containerd/stargz-snapshotter/estargz v0.12.1/go.mod h1:12VUuCq3qPq4y8yUW+l5w3+oXV3cx2Po3KSe/SmPGqw= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.1 h1:IfVOxKbjyBn9maoye2JN95pgGYOmPkQVqxtOu7rtNIc= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= +github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= +github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4= +github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A= +github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE= +github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= +github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= +github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= 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/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= +github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU= +github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.20+incompatible h1:kH9tx6XO+359d+iAkumyKDc5Q1kOwPuAUaeri48nD6E= +github.com/docker/docker v20.10.20+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= +github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= 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.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= 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.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.2.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= @@ -138,11 +287,32 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/garyburd/redigo v1.6.0 h1:0VruCpn7yAIIu7pWVClQC8wxCJEcG3nyzpMSHKi1PQc= +github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= +github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= +github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= +github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= +github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= +github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= 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= @@ -154,26 +324,53 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V 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 v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/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 v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 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/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= +github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= +github.com/goccy/go-yaml v1.8.1/go.mod h1:wS4gNoLalDSJxo/SpngzPQ2BN4uuZVLCmbM4S3vd4+Y= +github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/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-migrate/migrate/v4 v4.6.2 h1:LDDOHo/q1W5UDj6PbkxdCv7lv9yunyZHXvxuwDkGo3k= +github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -182,6 +379,8 @@ 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 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= +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= @@ -198,11 +397,21 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= 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.12.4 h1:YINKfuHZ8n72tPOqSPZBwGiDpew2CJS48mdM5W8LZQU= +github.com/google/cel-go v0.12.4/go.mod h1:Av7CU6r6X3YmcHR9GXqVDaEJYfEtSxl6wvIjUQTriCw= +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= @@ -211,10 +420,15 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-containerregistry v0.12.0 h1:nidOEtFYlgPCRqxCKj/4c/js940HVWplCWc5ftdfdUA= +github.com/google/go-containerregistry v0.12.0/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= 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= @@ -233,61 +447,135 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-health-probe v0.3.2/go.mod h1:izVOQ4RWbjUR6lm4nn+VLJyQ+FyaiGmprEYgI04Gs7U= +github.com/h2non/filetype v1.1.1 h1:xvOwnXKAckvtLWsN398qS9QhlxlnVXBjXBydK2/UFB4= +github.com/h2non/filetype v1.1.1/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= +github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c h1:fEE5/5VNnYUoBOj2I9TP8Jc+a7lge3QWn9DKE7NCwfc= +github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c/go.mod h1:ObS/W+h8RYb1Y7fYivughjxojTmIu5iAIjSrSLCLeqE= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= 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/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= +github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.6.6 h1:HJunrbHTDDbBb/ay4kxa1n+dLmttUlnP3V9oNE4hmsM= +github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc= +github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/vault/api v1.8.2 h1:C7OL9YtOtwQbTKI9ogB0A1wffRbCN+rH/LLCHO3d8HM= +github.com/hashicorp/vault/api v1.8.2/go.mod h1:ML8aYzBIhY5m1MD1B2Q0JV89cC85YVH4t5kBaZiyVaE= +github.com/hashicorp/vault/sdk v0.6.0 h1:6Z+In5DXHiUfZvIZdMx7e2loL1PPyDjA4bVh9ZTIAhs= +github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 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.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= +github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= +github.com/joelanford/ignore v0.0.0-20210607151042-0d25dc18b62d h1:A2/B900ip/Z20TzkLeGRNy1s6J2HmH9AmGt+dHyqb4I= +github.com/joelanford/ignore v0.0.0-20210607151042-0d25dc18b62d/go.mod h1:7HQupe4vyNxMKXmM5DFuwXHsqwMyglcYmZBtlDPIcZ8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -297,21 +585,34 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X 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/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 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/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -321,32 +622,63 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0= +github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= 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/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mikefarah/yq/v3 v3.0.0-20201202084205-8846255d1c37/go.mod h1:dYWq+UWoFCDY1TndvFUQuhBbIYmZpjreC8adEAx93zE= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.1.1 h1:Bp6x9R1Wn16SIz3OfeDr0b7RnCG2OB66Y7PQyC/cvq4= github.com/mitchellh/copystructure v1.1.1/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= +github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -355,58 +687,136 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb 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/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= 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/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +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/v2 v2.5.0 h1:TRtrvv2vdQqzkwrQ1ke6vtXf7IK34RBUJafIy1wMwls= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700 h1:eNUVfm/RFLIi1G7flU5/ZRTHvd4kcVuzfRnL6OFlzCI= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/operator-framework/api v0.10.5/go.mod h1:tV0BUNvly7szq28ZPBXhjp1Sqg5yHCOeX19ui9K4vjI= +github.com/operator-framework/api v0.16.0 h1:swUOhVv7QDszxBTwYM8QAtyeqI4EQHNVAiKMS+xjakY= +github.com/operator-framework/api v0.16.0/go.mod h1:kk8xJahHJR3bKqrA+A+1VIrhOTmyV76k+ARv+iV+u1Q= +github.com/operator-framework/operator-registry v1.19.5 h1:2LtfN4hrOn+z4MwQsFtJVkyQocQPV+rDrNoawwnBhPI= +github.com/operator-framework/operator-registry v1.19.5/go.mod h1:C1aRsbL+jRQzCTbfvSs93USjluD1AN0DHD0onLCUnSg= +github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= +github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/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-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.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.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -415,16 +825,27 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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= @@ -432,13 +853,17 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= @@ -446,6 +871,8 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -453,11 +880,13 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -472,9 +901,22 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= +github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= +github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= +github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= +github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -484,8 +926,19 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 h1:p7OofyZ509h8DmPLh8Hn+EIIZm/xYhdZHJ9GnXHdr6U= +github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.7 h1:4DTF1WOM2ZZS/xMOkTFBOcb6XiHu/PKn3rVo6dbewQE= +github.com/yvasiyarov/gorelic v0.0.7/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 h1:AsFN8kXcCVkUFHyuzp1FtYbzp1nCO/H6+1uPSGEyPzM= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/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= @@ -493,41 +946,67 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.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.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= 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 h1:Q3C9yzW6I9jqEc8sawxzxZmY48fs9u220KXq6d5s3XU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g= 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 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= 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= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/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-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -565,21 +1044,27 @@ 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.3.1-0.20200828183125-ce943fd02449/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/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= 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-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= @@ -588,7 +1073,10 @@ 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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/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= @@ -610,15 +1098,21 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= 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-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= 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= +golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -626,6 +1120,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ 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-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= 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= @@ -638,6 +1135,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ 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/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/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= @@ -645,25 +1144,40 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -683,21 +1197,30 @@ golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7w 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-20201112073958-5cba982894dd/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-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/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-20210927094055-39ccf1dd6fa6/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -708,6 +1231,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +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= 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= @@ -720,12 +1245,16 @@ 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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -735,12 +1264,15 @@ golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3 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-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-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-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= 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= @@ -777,16 +1309,21 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= 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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -807,25 +1344,30 @@ google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ 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/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -847,17 +1389,23 @@ google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6D 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-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -874,6 +1422,10 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/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.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200709232328-d8193ee9cc3e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -886,23 +1438,37 @@ 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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= 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.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -918,8 +1484,12 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -927,42 +1497,94 @@ 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.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/apiextensions-apiserver v0.22.4 h1:2iGpcVyw4MnAyyXVJU2Xg6ZsbIxAOfRHo0LF5A5J0RA= -k8s.io/apiextensions-apiserver v0.22.4/go.mod h1:kH9lxD8dbJ+k0ZizGET55lFgdGjO8t45fgZnCVdZEpw= -k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck= +k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= +k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= +k8s.io/apiextensions-apiserver v0.21.1/go.mod h1:KESQFCGjqVcVsZ9g0xX5bacMjyX5emuWcS2arzdEouA= +k8s.io/apiextensions-apiserver v0.22.0/go.mod h1:+9w/QQC/lwH2qTbpqndXXjwBgidlSmytvIUww16UACE= +k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= +k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apiserver v0.22.4/go.mod h1:38WmcUZiiy41A7Aty8/VorWRa8vDGqoUzDf2XYlku0E= +k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= +k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= +k8s.io/apiserver v0.21.1/go.mod h1:nLLYZvMWn35glJ4/FZRhzLG/3MPxAaZTgV4FJZdr+tY= +k8s.io/apiserver v0.22.0/go.mod h1:04kaIEzIQrTGJ5syLppQWvpkLJXQtJECHmae+ZGc/nc= +k8s.io/apiserver v0.25.0 h1:8kl2ifbNffD440MyvHtPaIz1mw4mGKVgWqM0nL+oyu4= +k8s.io/apiserver v0.25.0/go.mod h1:BKwsE+PTC+aZK+6OJQDPr0v6uS91/HWxX7evElAH6xo= +k8s.io/cli-runtime v0.22.0/go.mod h1:An6zELQ7udUI0GaXvkuMqyopPA14dIgNqpH8cZu1vig= k8s.io/cli-runtime v0.22.4/go.mod h1:x35r0ERHXr/MrbR1C6MPJxQ3xKG6+hXi9m2xLzlMPZA= -k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= +k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg= k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= +k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= +k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/code-generator v0.22.4/go.mod h1:qjYl54pQ/emhkT0UxbufbREYJMWsHNNV/jSVwhYZQGw= +k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA= +k8s.io/component-base v0.22.0/go.mod h1:SXj6Z+V6P6GsBhHZVbWCw9hFjUdUYnJerlhhPnYCBCg= k8s.io/component-base v0.22.4/go.mod h1:MrSaQy4a3tFVViff8TZL6JHYSewNCLshZCwHYM58v5A= +k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= +k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= +k8s.io/component-helpers v0.22.0/go.mod h1:YNIbQI59ayNiU8JHlPIxVkOUYycbKhk5Niy0pcyJOEY= k8s.io/component-helpers v0.22.4/go.mod h1:A50qTyczDFbhZDifIfS2zFrHuPk9UNOWPpvNZ+3RSIs= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/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.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/kubectl v0.22.0/go.mod h1:eeuP92uZbVL2UnOaf0nj9OjtI0hi/nekHU+0isURer0= k8s.io/kubectl v0.22.4 h1:ECUO1QWyZ70DiIKEfgBx+8i9D98uspVOwgc1APs/07w= k8s.io/kubectl v0.22.4/go.mod h1:ok2qRT6y2Gy4+y+mniJVyUMKeBHP4OWS9Rdtf/QTM5I= +k8s.io/metrics v0.22.0/go.mod h1:eYnwafAUNLLpVmY/msoq0RKIKH5C4TzfjKnMZ0Xrt3A= k8s.io/metrics v0.22.4/go.mod h1:6F/iwuYb1w2QDCoHkeMFLf4pwHBcYKLm4mPtVHKYrIw= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a h1:8dYfu/Fc9Gz2rNJKB9IQRGgQOh2clmRzNIPPY1xLY5g= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210527160623-6fdb442a123b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM= +rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= 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.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.32 h1:2WjukG7txtEsbXsSKWtTibCdsyYAhcu6KFnttyDdZOQ= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.32/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= +sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8= +sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= +sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-tools v0.6.0/go.mod h1:baRMVPrctU77F+rfAuH2uPqW93k6yQnZA2dhUOr7ihc= +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/kind v0.11.1/go.mod h1:fRpgVhtqAWrtLB9ED7zQahUimpUXuG/iHT88xYqEGIA= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= 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 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +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.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/hack/operatorhub/internal/container/container.go b/hack/operatorhub/internal/container/container.go new file mode 100644 index 0000000000..6fb99634f0 --- /dev/null +++ b/hack/operatorhub/internal/container/container.go @@ -0,0 +1,359 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package container + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "log" + "net/http" + "time" + + "github.com/google/go-containerregistry/pkg/authn" + "github.com/google/go-containerregistry/pkg/crane" + v1 "github.com/google/go-containerregistry/pkg/v1" +) + +const ( + eckOperatorFormat = "docker.elastic.co/eck/eck-operator-ubi8:%s" + registryURL = "quay.io" + httpAcceptHeader = "Accept" + httpContentTypeHeader = "Content-Type" + httpXAPIKeyHeader = "X-API-KEY" + httpApplicationJSONHeaderValue = "application/json" + getImagesFilter = "repositories.tags.name==%s" +) + +var ( + errImageNotFound = fmt.Errorf("image not found") + catalogAPIURL = "https://catalog.redhat.com/api/containers/v1" + eckOperatorRegistryReference = "%s/redhat-isv-containers/%s:%s" + getCatalogImagesURL = "%s/projects/certification/id/%s/images" + registryUserFormat = "redhat-isv-containers+%s-robot" + imagePublishURL = "%s/projects/certification/id/%s/requests/images" +) + +// CommonConfig are common configuration options between +// the push and publish commands. +type CommonConfig struct { + DryRun bool + HTTPClient *http.Client + ProjectID string + RedhatCatalogAPIKey string + RegistryPassword string + Tag string +} + +// PushConfig is the configuration required for the push image command. +type PushConfig struct { + CommonConfig + Force bool +} + +// PublishConfig is the configuration required for the publish command. +type PublishConfig struct { + CommonConfig + ImageScanTimeout time.Duration +} + +// PushImage will push an image to the Quay.io registry if it is determined +// that the image doesn't already exist. If 'Force' option is used, the +// image will be pushed regardless if it already exists. +func PushImage(c PushConfig) error { + if c.HTTPClient == nil { + c.HTTPClient = defaultHTTPClient() + } + + log.Printf("Determining if image already exists within project with tag: %s", c.Tag) + exists, err := ImageExistsInProject(c.HTTPClient, c.RedhatCatalogAPIKey, c.ProjectID, c.Tag) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("failed to determine if image exists: %w", err) + } + if exists && !c.Force { + log.Println("✓") + log.Println("not continuing as image was already found within redhat project") + return nil + } + if c.Force { + log.Println("pushing image as force was set") + } + + if err = pushImageToRegistry(c); err != nil { + log.Println("x") + return fmt.Errorf("failed to push image: %w", err) + } + log.Println("✓") + return nil +} + +// PublishImage will publish an existing image in the redhat catalog, +// if the image has completed the scan process. It will wait up to +// 'ImageScanTimeout' for image to have completed the scan before failing. +func PublishImage(c PublishConfig) error { + if c.HTTPClient == nil { + c.HTTPClient = defaultHTTPClient() + } + + return publishImageInProject(c.HTTPClient, c.ImageScanTimeout, c.RedhatCatalogAPIKey, c.ProjectID, c.Tag, c.DryRun) +} + +// ImageExistsInProject will determine whether an image with the given tag exists in the certification api. +func ImageExistsInProject(httpClient *http.Client, apiKey, projectID, tag string) (bool, error) { + images, err := getImages(httpClient, apiKey, projectID, tag) + if err != nil && errors.Is(err, errImageNotFound) { + return false, nil + } + if err != nil { + return false, err + } + if err == nil && len(images) == 0 { + return false, nil + } + if getFirstUndeletedImage(images) == nil { + log.Println("ignoring existing potentially deleted image") + return false, nil + } + return true, nil +} + +// GetImageSHA will query the Red Hat certification API, returning a list of images for a given +// tag, and return the SHA of the image to be used in the manifests. +func GetImageSHA(httpClient *http.Client, apiKey, projectID, tag string) (string, error) { + if httpClient == nil { + httpClient = defaultHTTPClient() + } + var imageSHA string + images, err := getImages(httpClient, apiKey, projectID, tag) + if err != nil && errors.Is(err, errImageNotFound) { + return imageSHA, nil + } + if err != nil { + return imageSHA, err + } + if err == nil && len(images) == 0 { + return imageSHA, nil + } + image := getFirstUndeletedImage(images) + if image == nil { + return imageSHA, fmt.Errorf("couldn't find image with tag: %s", tag) + } + return image.DockerImageDigest, nil +} + +// defaultHTTPClient will return an http client with a 60 second timeout +// if the calling package does not provide an http client to this package. +func defaultHTTPClient() *http.Client { + return &http.Client{ + // This timeout is set high, as the redhat certification api + // sometimes is very slow to respond. + Timeout: 60 * time.Second, + } +} + +// getImages will return a slice of Images from the Red Hat Certification API +// while filtering using the given tag, returning any errors it encounters. +func getImages(httpClient *http.Client, apiKey, projectID, tag string) ([]Image, error) { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + url := fmt.Sprintf(getCatalogImagesURL, catalogAPIURL, projectID) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) + if err != nil { + return nil, fmt.Errorf("failed to create request for url (%s): %w", url, err) + } + + q := req.URL.Query() + q.Add("filter", fmt.Sprintf(getImagesFilter, tag)) + req.URL.RawQuery = q.Encode() + + addHeaders(req, apiKey) + + var res *http.Response + if res, err = httpClient.Do(req); err != nil { + return nil, fmt.Errorf("failed to request whether image exists: %w", err) + } + defer res.Body.Close() + if res.StatusCode > 299 { + if bodyBytes, err := io.ReadAll(res.Body); err != nil { + return nil, fmt.Errorf("failed to check whether image exists, body: %s, code: %d", string(bodyBytes), res.StatusCode) + } + return nil, fmt.Errorf("failed to check whether image exists, code: %d", res.StatusCode) + } + var bodyBytes []byte + if bodyBytes, err = io.ReadAll(res.Body); err != nil { + return nil, fmt.Errorf("failed to read body: %w", err) + } + response := GetImagesResponse{} + if err = json.Unmarshal(bodyBytes, &response); err != nil { + return nil, fmt.Errorf("failed to unmarshal body into valid response: %w", err) + } + return response.Images, nil +} + +// addHeaders will add the required headers to communicate with +// the Red Hat certification API. +func addHeaders(req *http.Request, apiKey string) { + req.Header.Add(httpAcceptHeader, httpApplicationJSONHeaderValue) + req.Header.Add(httpContentTypeHeader, httpApplicationJSONHeaderValue) + req.Header.Add(httpXAPIKeyHeader, apiKey) +} + +// getFirstUndeletedImage return the first undeleted image returned from the redhat certification api. +// Images that are deleted from the Red Hat certification API are still returned, but have no architecture +// defined in the output, so we use that to determine if an image has been deleted. +func getFirstUndeletedImage(images []Image) *Image { + for _, image := range images { + if image.Architecture != nil { + return &image + } + } + return nil +} + +// pushImageToRegistry will use the crane tool to pull the ECK operator +// container image locally, and push it to Quay.io registry using the +// provided credentials. +func pushImageToRegistry(c PushConfig) error { + if c.DryRun { + log.Printf("not pushing image as dry-run is set.") + return nil + } + + username := fmt.Sprintf(registryUserFormat, c.ProjectID) + formattedEckOperatorRedhatReference := fmt.Sprintf(eckOperatorRegistryReference, registryURL, c.ProjectID, c.Tag) + imageToPull := fmt.Sprintf(eckOperatorFormat, c.Tag) + + log.Printf("pulling image (%s) in preparation to push (%s) to quay.io registry: ", imageToPull, formattedEckOperatorRedhatReference) + // default credentials are used here, as the operator image which we use as a source is public. + image, err := crane.Pull(imageToPull, crane.WithAuthFromKeychain(authn.DefaultKeychain)) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while pulling (%s): %w", imageToPull, err) + } + log.Printf("pushing image (%s) to quay.io registry: ", formattedEckOperatorRedhatReference) + err = crane.Push( + image, + formattedEckOperatorRedhatReference, + crane.WithAuth(&authn.Basic{ + Username: username, + Password: c.RegistryPassword}), + crane.WithPlatform(&v1.Platform{ + OS: "linux", + Architecture: "amd64"}), + ) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while pushing (%s): %w", formattedEckOperatorRedhatReference, err) + } + log.Println("✓") + return nil +} + +// publishImageInProject will wait until the image with the given tag is scanned, and then attempt to publish +// the image within the Red Hat certification API. If imageScanTimeout is reached waiting for the image to +// be set as scanned within the API and error will be returned. +func publishImageInProject(httpClient *http.Client, imageScanTimeout time.Duration, apiKey, projectID, tag string, dryRun bool) error { + ticker := time.NewTicker(5 * time.Minute) + ctx, cancel := context.WithTimeout(context.Background(), imageScanTimeout) + defer cancel() + + log.Printf("waiting for image to complete scan process... ") + image, done, err := isImageScanned(httpClient, apiKey, projectID, tag) + if err != nil { + return err + } + if done { + if dryRun { + log.Printf("not publishing image as dry-run is set") + return nil + } + return doPublish(image, httpClient, apiKey, projectID, tag) + } + + for { + select { + case <-ticker.C: + image, done, err := isImageScanned(httpClient, apiKey, projectID, tag) + if err != nil { + return err + } + if !done { + continue + } + if dryRun { + log.Printf("not publishing image as dry-run is set") + return nil + } + return doPublish(image, httpClient, apiKey, projectID, tag) + + case <-ctx.Done(): + return fmt.Errorf("image scan not completed within timeout of %s", imageScanTimeout) + } + } +} + +// isImageScanned will get the first valid image tag within the Red Hat certification API +// and ensure that the scan status is set to "passed", returning the image. +func isImageScanned(httpClient *http.Client, apiKey, projectID, tag string) (image *Image, done bool, err error) { + images, err := getImages(httpClient, apiKey, projectID, tag) + if err != nil { + log.Printf("failed to find image in redhat catlog api, retrying: %s", err) + return nil, false, nil + } + if len(images) == 0 { + return nil, false, nil + } + image = getFirstUndeletedImage(images) + if image == nil { + return nil, false, nil + } + switch image.ScanStatus { + case scanStatusPassed: + log.Println("✓") + return image, true, nil + case scanStatusFailed: + return nil, true, fmt.Errorf("image scan failed") + case scanStatusInProgress: + log.Println("scan still in progress") + return nil, false, nil + } + return nil, false, nil +} + +// doPublish will publish an image with the given tag in the Red Hat certification API. +func doPublish(image *Image, httpClient *http.Client, apiKey, projectID, tag string) error { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + log.Printf("publishing image (%s), tag %s: ", image.ID, tag) + url := fmt.Sprintf(imagePublishURL, catalogAPIURL, projectID) + var body = []byte(fmt.Sprintf(`{"image_id": "%s", "operation": "publish"}`, image.ID)) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(body)) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("failed to create request to publish image: %w", err) + } + + addHeaders(req, apiKey) + + res, err := httpClient.Do(req) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("failed request to publish image: %w", err) + } + defer res.Body.Close() + if res.StatusCode > 299 { + log.Println("ⅹ") + if bodyBytes, err := io.ReadAll(res.Body); err != nil { + return fmt.Errorf("failed request to publish image, body: %s, code: %d", string(bodyBytes), res.StatusCode) + } + return fmt.Errorf("failed request to publish image, code: %d", res.StatusCode) + } + log.Println("✓") + return nil +} diff --git a/hack/operatorhub/internal/container/types.go b/hack/operatorhub/internal/container/types.go new file mode 100644 index 0000000000..125869ddc6 --- /dev/null +++ b/hack/operatorhub/internal/container/types.go @@ -0,0 +1,49 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package container + +// GetImagesResponse is a response to a request to return a set of images +// from the Redhat certification API. +type GetImagesResponse struct { + Images []Image `json:"data"` +} + +// scanStatus defines the state of the image scanning process +// within the Red Hat certification API +type scanStatus string + +const ( + scanStatusInProgress scanStatus = "in progress" + scanStatusPassed scanStatus = "passed" + scanStatusFailed scanStatus = "failed" +) + +// Image represents a Redhat certification API response +// representing a container image. +type Image struct { + // ID is the id of the image. + ID string `json:"_id"` + // Architecture is the architecture (amd64, arm64, etc). + Architecture *string `json:"architecture"` + // Repositories is a slice of Repository structs + Repositories []Repository `json:"repositories"` + // ScanStatus is the status indicating whether the image has been scanned. + ScanStatus scanStatus `json:"scan_status"` + // DockerImageDigest is the SHA id of the image + DockerImageDigest string `json:"docker_image_digest"` +} + +// Repository represents an image repository, and any tags applied to a container image. +type Repository struct { + // Repository is the repository name. + Repository string `json:"repository"` + // Tags are any tags applied to this image/repository combination. + Tags []Tag `json:"tags"` +} + +// Tag represents a tag of a container image. +type Tag struct { + Name string `json:"name"` +} diff --git a/hack/operatorhub/internal/github/fork.go b/hack/operatorhub/internal/github/fork.go new file mode 100644 index 0000000000..fe7f609d86 --- /dev/null +++ b/hack/operatorhub/internal/github/fork.go @@ -0,0 +1,216 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package github + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "strings" + "time" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/config" + "github.com/go-git/go-git/v5/plumbing" + git_http "github.com/go-git/go-git/v5/plumbing/transport/http" +) + +const ( + // githubAPIURL is the URL to communicate with github's api + githubAPIURL = "https://api.github.com" + // githubV3JSONMediaType is the github content type to be included in all github api requests + githubV3JSONMediaType = "application/vnd.github.v3+json" + githubRepoForksURLFormat = "%s/repos/%s/forks" + httpAcceptHeader = "Accept" +) + +// githubFork is the format of a github fork as returned by the github API. +type githubFork struct { + ID uint `json:"id"` + Name string `json:"name"` + FullName string `json:"full_name"` + Owner struct { + Login string `json:"login"` + } `json:"owner"` + Private bool `json:"private"` + HTMLURL string `json:"html_url"` + Fork bool `json:"fork"` + URL string `json:"url"` + DefaultBranch string `json:"default_branch"` + Visibility string `json:"visibility"` +} + +// ensureFork will ensure that a given organization/repository +// is forked by the Client.GitHubUsername by checking if the fork +// already exists, and if it does not, creating the fork and waiting +// for the fork creation to complete. +func (c *Client) ensureFork(orgRepo string) error { + exists, err := c.forkExists(orgRepo) + if err != nil { + return err + } + if exists { + return nil + } + err = c.createFork(orgRepo) + if err != nil { + return err + } + return c.waitOnForkCreation(orgRepo) +} + +// forkExists will check if a given organization/repository +// is forked by the Client.GitHubUsername and will return +// a bool and any errors encountered. +func (c *Client) forkExists(orgRepo string) (bool, error) { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + req, err := c.createRequest(ctx, http.MethodGet, fmt.Sprintf(githubRepoForksURLFormat, githubAPIURL, orgRepo), nil) + var res *http.Response + res, err = c.HTTPClient.Do(req) + if err != nil { + return false, fmt.Errorf("while executing github request to ensure fork exists: %w", err) + } + defer res.Body.Close() + var bodyBytes []byte + bodyBytes, err = ioutil.ReadAll(res.Body) + if err != nil { + return false, fmt.Errorf("while reading get forks response body: %w", err) + } + if res.StatusCode < 200 || res.StatusCode > 299 { + return false, fmt.Errorf("invalid status code for github request to ensure fork exists, code: %d, body: %s", res.StatusCode, string(bodyBytes)) + } + var forksResponse []githubFork + err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&forksResponse) + if err != nil { + return false, fmt.Errorf("while decoding get forks response into json, body: %s: %w", string(bodyBytes), err) + } + return userInForks(c.GitHubUsername, forksResponse), nil +} + +// createRequest will create an HTTP request to the given URL, with supplied HTTP method and body, +// using the given context, setting required headers and returning the request, and any errors encountered. +func (c *Client) createRequest(ctx context.Context, method, url string, body io.Reader) (*http.Request, error) { + req, err := http.NewRequestWithContext(ctx, method, url, body) + if err != nil { + return nil, fmt.Errorf("while creating request: %w", err) + } + req.Header.Add(httpAcceptHeader, githubV3JSONMediaType) + req.SetBasicAuth(c.GitHubUsername, c.GitHubToken) + return req, nil +} + +// createFork will fork a given organization/repository for the Client.GitHubUsername. +func (c *Client) createFork(orgRepo string) error { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + req, err := c.createRequest(ctx, http.MethodPost, fmt.Sprintf(githubRepoForksURLFormat, githubAPIURL, orgRepo), nil) + if err != nil { + return err + } + var res *http.Response + res, err = c.HTTPClient.Do(req) + if err != nil { + return fmt.Errorf("while executing github request to create fork: %w", err) + } + defer res.Body.Close() + var bodyBytes []byte + bodyBytes, err = ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("while reading create fork response body: %w", err) + } + if res.StatusCode < 200 || res.StatusCode > 299 { + return fmt.Errorf("invalid response code for github request to create fork, code: %d, body: %s", res.StatusCode, string(bodyBytes)) + } + return nil +} + +func (c *Client) syncFork(orgRepo string, repository *git.Repository, remote *git.Remote) error { + err := repository.Fetch(&git.FetchOptions{ + RemoteName: "fork", + }) + if err != nil { + return fmt.Errorf("while fetching fork: %w", err) + } + w, err := repository.Worktree() + if err != nil { + return fmt.Errorf("while retrieving a working tree from the git filesystem: %w", err) + } + err = w.Checkout(&git.CheckoutOptions{Branch: "refs/remotes/fork/main", Create: false}) + if err != nil { + return fmt.Errorf("while checking out (%s) branch (main): %w", orgRepo, err) + } + err = w.Pull(&git.PullOptions{RemoteName: "origin", ReferenceName: plumbing.NewBranchReferenceName("main")}) + if err != nil { + return fmt.Errorf("while merging upstream changes from upstream/main into fork/main: %w", err) + } + refSpec := "+refs/heads/main:refs/heads/main" + err = repository.Push(&git.PushOptions{ + Auth: &git_http.BasicAuth{ + Username: c.GitHubToken, + }, + RemoteName: "fork", + RefSpecs: []config.RefSpec{ + config.RefSpec(refSpec), + }, + }) + if err != nil { + return fmt.Errorf("while pushing merge of fork/main: %w", err) + } + return nil +} + +// waitOnForkCreation will check if a given organization/repository has completed the fork +// process for the Client.GitHubUsername by requesting the GitHubUsername/repository URL +// from the Github API, looking for an eventual HTTP 200 response, timing out in 5 minutes. +func (c *Client) waitOnForkCreation(orgRepo string) error { + ticker := time.NewTicker(10 * time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + + for { + select { + case <-ticker.C: + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + req, err := c.createRequest(ctx, http.MethodGet, fmt.Sprintf("%s/repos/%s/%s", githubAPIURL, c.GitHubUsername, strings.Split(orgRepo, "/")[1]), nil) + if err != nil { + log.Printf("failed to create request to check if fork exists: %s", err) + continue + } + var res *http.Response + res, err = c.HTTPClient.Do(req) + if err != nil { + log.Printf("failed to execute request to check if fork exists: %s", err) + continue + } + switch res.StatusCode { + case 200: + return nil + default: + var bodyBytes []byte + bodyBytes, err = ioutil.ReadAll(res.Body) + log.Printf("failed to execute request to check if fork exists, body: %s: %s", string(bodyBytes), err) + } + case <-ctx.Done(): + return fmt.Errorf("github fork creation not completed within timeout of 5m") + } + } +} + +// userInForks checks if a given user is the owner of any forks in the given slice of github forks. +func userInForks(user string, forks []githubFork) bool { + for _, fork := range forks { + if fork.Owner.Login == user { + return true + } + } + return false +} diff --git a/hack/operatorhub/internal/github/github.go b/hack/operatorhub/internal/github/github.go new file mode 100644 index 0000000000..d994952d8c --- /dev/null +++ b/hack/operatorhub/internal/github/github.go @@ -0,0 +1,402 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package github + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "log" + "net/http" + "os" + "path/filepath" + "strings" + "time" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/config" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" + git_http "github.com/go-git/go-git/v5/plumbing/transport/http" + "github.com/otiai10/copy" +) + +const ( + certifiedOperatorOrganization = "redhat-openshift-ecosystem" + certifiedOperatorRepository = "certified-operators" + communityOperatorOrganization = "k8s-operatorhub" + communityOperatorRepository = "community-operators" + + // certifiedOperatorsRepositoryMainBranchName is the name of the default branch of the certified operators git repository. + certifiedOperatorsRepositoryMainBranchName = "main" + // communityOperatorsRepositoryMainBranchName is the name of the default branch of the community operators git repository. + communityOperatorsRepositoryMainBranchName = "main" + + certifiedOperatorDirectoryName = "elasticsearch-eck-operator-certified" + communityOperatorDirectoryName = "elastic-cloud-eck" + + // githubURL is the URL to communicate with github + githubURL = "https://github.com" +) + +var ( + // certifiedOperatorsFQDN is the FQDN to use for cloning, and submitting of PRs against certified operators repository. + certifiedOperatorsFQDN = fmt.Sprintf("%s/%s/%s", githubURL, certifiedOperatorOrganization, certifiedOperatorRepository) + // communityOperatorsFQDN is the FQDN to use for cloning, and submitting of PRs against community operators repository. + communityOperatorsFQDN = fmt.Sprintf("%s/%s/%s", githubURL, communityOperatorOrganization, communityOperatorRepository) +) + +// Config is the configuration for the github package +type Config struct { + DryRun bool + GitHubFullName, GitHubEmail, GitHubUsername, GitHubToken string + HTTPClient *http.Client + GitTag string + KeepTempFiles bool + PathToNewVersion string + ContainerImageSHA string +} + +// Client is the client for the github package +type Client struct { + Config +} + +type operatorHubConfig struct { + NewVersion string `json:"newVersion"` + PrevVersion string `json:"prevVersion"` + StackVersion string `json:"stackVersion"` + CRDs []map[string]interface{} `json:"crds"` + Packages []map[string]interface{} `json:"packages"` +} + +// New returns a new github client, using +// a default HTTP client with a timeout of 10 seconds +// if one isn't supplied within the config. +func New(config Config) *Client { + c := &Client{ + config, + } + if c.HTTPClient == nil { + c.HTTPClient = &http.Client{ + Timeout: 10 * time.Second, + } + } + return c +} + +type githubRepository struct { + organization string + repository string + mainBranchName string + directoryName string + url string + tempDir string + extraSteps func() error + additionalChangedFiles []string +} + +// CloneRepositoryAndCreatePullRequest will execute a number of local, and potentially remote github operations +// for each of the certified and community operators github repositories: +// 1. Clone the repository to a temporary directory +// 2. Ensure that the configured github user has forked the repository +// 3. Create a git remote +// 4. Create a new git branch named from the configured git tag +// 5. Checkout the new branch +// 6. Copy the operator manifests, from the configured directory, into the clone directory +// 7. "git add" the new directory to the working tree +// 8. Create a new commit for the new changes +// 9. Push the remote to the fork +// 10. Create a draft pull request in the remote repository +func (c *Client) CloneRepositoryAndCreatePullRequest() error { + log.Printf("Creating temporarily directory for git operations ") + tempDir, err := os.MkdirTemp(os.TempDir(), "eck-redhat-operations") + if err != nil { + return fmt.Errorf("failed to create temporary directory for operations: %w", err) + } + log.Println(fmt.Sprintf("(%s): ✓", tempDir)) + + defer func() { + if !c.KeepTempFiles { + os.RemoveAll(tempDir) + } + }() + + for _, repository := range []githubRepository{ + { + organization: communityOperatorOrganization, + repository: communityOperatorRepository, + url: communityOperatorsFQDN, + directoryName: communityOperatorDirectoryName, + mainBranchName: communityOperatorsRepositoryMainBranchName, + tempDir: tempDir, + // Each repository (community/certified) has a set of steps + // that differ slightly between each repo, and this function + // contains those steps to be run prior to adding the data + // to the git repository, creating the commit, and submitting + // the pull request. + // + // This step simply copies the 'elastic-cloud-eck.package.yaml' + // file that already exists within the community-operators + // directory into the directory to be added to the git commit. + extraSteps: func() error { + fileName := "elastic-cloud-eck.package.yaml" + fileSrc := filepath.Join(c.PathToNewVersion, communityOperatorRepository, fileName) + fileDst := filepath.Join(tempDir, communityOperatorRepository, "operators", communityOperatorDirectoryName, fileName) + log.Printf("copying (%s) to (%s)", fileSrc, fileDst) + err := copy.Copy(fileSrc, fileDst) + if err != nil { + return fmt.Errorf("while copying (%s) to (%s)", fileSrc, fileDst) + } + return nil + }, + additionalChangedFiles: []string{"elastic-cloud-eck.package.yaml"}, + }, + { + organization: certifiedOperatorOrganization, + repository: certifiedOperatorRepository, + url: certifiedOperatorsFQDN, + directoryName: certifiedOperatorDirectoryName, + mainBranchName: certifiedOperatorsRepositoryMainBranchName, + tempDir: tempDir, + // Each repository (community/certified) has a set of steps + // that differ slightly between each repo, and this function + // contains those steps to be run prior to adding the data + // to the git repository, creating the commit, and submitting + // the pull request. + // + // This step: + // 1. renames the elasticsearch-eck-operator-certified.{TAG}.clusterserviceversion.yaml to + // elasticsearch-eck-operator-certified.clusterserviceversion.yaml. + // 2. replaces the container tag with the image SHA within the CSV.yaml. + extraSteps: func() error { + // ensure git tag has a preceeding 'v'. + gitTag := c.GitTag + if !strings.HasPrefix(gitTag, "v") { + gitTag = fmt.Sprintf("v%s", gitTag) + } + fileSrc := filepath.Join(tempDir, certifiedOperatorRepository, "operators", certifiedOperatorDirectoryName, c.GitTag, "manifests", fmt.Sprintf("elasticsearch-eck-operator-certified.%s.clusterserviceversion.yaml", gitTag)) + fileDst := filepath.Join(tempDir, certifiedOperatorRepository, "operators", certifiedOperatorDirectoryName, c.GitTag, "manifests", "elasticsearch-eck-operator-certified.clusterserviceversion.yaml") + log.Printf("copying (%s) to (%s)", fileSrc, fileDst) + if err := copy.Copy(fileSrc, fileDst); err != nil { + return fmt.Errorf("while copying (%s) to (%s)", fileSrc, fileDst) + } + log.Printf("removing file (%s)", fileSrc) + if err := os.Remove(fileSrc); err != nil { + return fmt.Errorf("while removing file (%s)", fileSrc) + } + + log.Printf("reading (%s) to replace git tag with container image SHA", fileDst) + input, err := ioutil.ReadFile(fileDst) + if err != nil { + return fmt.Errorf("while reading file (%s)", fileDst) + } + + lines := strings.Split(string(input), "\n") + + find := fmt.Sprintf(`registry.connect.redhat.com/elastic/eck-operator:%s`, c.GitTag) + replace := fmt.Sprintf(`registry.connect.redhat.com/elastic/eck-operator@%s`, c.ContainerImageSHA) + for _, line := range lines { + if strings.Contains(line, find) { + line = strings.ReplaceAll(line, find, replace) + } + } + output := strings.Join(lines, "\n") + log.Printf("rewriting (%s) with container image SHA", fileDst) + err = ioutil.WriteFile(fileDst, []byte(output), 0644) + if err != nil { + return fmt.Errorf("while writing updated file (%s)", fileDst) + } + return nil + }, + }, + } { + if err := c.cloneAndCreate(repository); err != nil { + return err + } + } + + return nil +} + +// cloneAndCreate does the following steps +// 1. clones the given repository to a temporary directory. +// 2. ensure the repository has been forked by the Client.GitHubUsername +// 3. configures a git remote for the fork. +// 4. creates a git branch within the fork. +// 5. copies the data from the 'generate-manifests' command into the git working tree. +// 6. runs the defined extra steps. +// 7. creates a git commit for the new version. +// 8. pushes the new branch to the remote fork. +// 9. potentially creates a draft pull request. +func (c *Client) cloneAndCreate(repo githubRepository) error { + orgRepo := fmt.Sprintf("%s/%s", repo.organization, repo.repository) + localTempDir := filepath.Join(repo.tempDir, repo.repository) + + log.Printf("Cloning (%s) repository to temporary directory ", repo.url) + r, err := git.PlainClone(localTempDir, false, &git.CloneOptions{ + URL: repo.url, + Auth: &git_http.BasicAuth{ + Username: c.GitHubToken, + }, + }) + if err != nil { + return fmt.Errorf("cloning (%s): %w", orgRepo, err) + } + log.Println("✓") + + log.Printf("Ensuring that (%s) repository has been forked ", orgRepo) + err = c.ensureFork(orgRepo) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while ensuring fork exists: %w", err) + } + log.Println("✓") + + log.Printf("Creating git remote for (%s) ", orgRepo) + remote, err := r.CreateRemote(&config.RemoteConfig{ + Name: "fork", + URLs: []string{ + fmt.Sprintf("https://github.com/%s/%s", c.GitHubUsername, repo.repository), + }, + }) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while creating git remote: %w", err) + } + log.Println("✓") + + err = c.syncFork(orgRepo, r, remote) + if err != nil { + return fmt.Errorf("while syncing fork with upstream: %w", err) + } + + branchName := fmt.Sprintf("eck-%s-%s", repo.repository, c.GitTag) + log.Printf("Creating git branch (%s) for (%s) ", branchName, orgRepo) + err = r.CreateBranch(&config.Branch{ + Name: branchName, + Remote: "fork", + Merge: plumbing.NewBranchReferenceName(branchName), + }) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while creating git branch: %w", err) + } + log.Println("✓") + + log.Printf("Checking out new branch (%s) ", branchName) + var w *git.Worktree + w, err = r.Worktree() + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while retrieving a working tree from the git filesystem: %w", err) + } + + err = w.Checkout(&git.CheckoutOptions{ + Branch: plumbing.NewBranchReferenceName(branchName), + Create: true, + }) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while checking out branch (%s): %w", branchName, err) + } + log.Println("✓") + + destDir := filepath.Join(localTempDir, "operators", repo.directoryName, c.GitTag) + srcDir := filepath.Join(c.PathToNewVersion, repo.repository, c.GitTag) + log.Printf("copying (%s) to (%s)", srcDir, destDir) + err = copy.Copy(srcDir, destDir) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while copying source dir (%s) to new git cloned dir (%s): %w", srcDir, destDir, err) + } + + if err := repo.extraSteps(); err != nil { + return err + } + + log.Printf("Adding new data to git working tree ") + pathToAdd := filepath.Join("operators", repo.directoryName, c.GitTag) + + for _, file := range append([]string{pathToAdd}, repo.additionalChangedFiles...) { + _, err = w.Add(file) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while adding destination directory (%s) to git working tree: %w", file, err) + } + } + log.Println("✓") + + log.Printf("Creating git commit ") + _, err = w.Commit(fmt.Sprintf(`version %s of eck operator\n\nSigned-off-by: %s <%s>`, c.GitTag, c.GitHubFullName, c.GitHubEmail), &git.CommitOptions{ + Author: &object.Signature{ + Name: c.GitHubFullName, + Email: c.GitHubEmail, + When: time.Now(), + }, + }) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while commiting changes to git working tree: %w", err) + } + log.Println("✓") + + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + refSpec := fmt.Sprintf("+refs/heads/%[1]s:refs/heads/%[1]s", branchName) + err = remote.PushContext(ctx, &git.PushOptions{ + RemoteName: "fork", + Auth: &git_http.BasicAuth{ + Username: c.GitHubToken, + }, + RefSpecs: []config.RefSpec{ + config.RefSpec(refSpec), + }, + }) + if err != nil { + return fmt.Errorf("while pushing git refspec (%s) to remote: %w", refSpec, err) + } + + if !c.DryRun { + return c.createPullRequest(repo, branchName) + } + log.Printf("Not creating pull request for (%s)\n", orgRepo) + return nil +} + +// createPullRequest will create a draft pull request for the given github repository +// unless dry-run is set. +func (c *Client) createPullRequest(repo githubRepository, branchName string) error { + if c.DryRun { + log.Println("Not creating draft pull request as dry-run is set") + return nil + } + log.Printf("Creating draft pull request for (%s) ", repo.repository) + var body = []byte( + fmt.Sprintf(`{"title": "operator %s (%s)", "head": "%s:%s", "base": "%s", "draft": true}`, + repo.directoryName, c.GitTag, c.GitHubUsername, branchName, repo.mainBranchName)) + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + req, err := c.createRequest(ctx, http.MethodPost, fmt.Sprintf("%s/repos/%s/%s/pulls", githubAPIURL, repo.organization, repo.repository), bytes.NewBuffer(body)) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("while creating request to create draft pr for (%s): %w", repo.repository, err) + } + var res *http.Response + if res, err = c.HTTPClient.Do(req); err != nil { + log.Println("ⅹ") + return fmt.Errorf("while creating draft pr for (%s): %w", repo.repository, err) + } + if res.StatusCode > 299 { + log.Println("ⅹ") + if bodyBytes, err := ioutil.ReadAll(res.Body); err != nil { + return fmt.Errorf("while creating draft pr for (%s), body: %s, code: %d", repo.repository, string(bodyBytes), res.StatusCode) + } + return fmt.Errorf("while creating draft pr for (%s), code: %d", repo.repository, res.StatusCode) + } + log.Println("✓") + return nil +} diff --git a/hack/operatorhub/internal/operatorhub/operatorhub.go b/hack/operatorhub/internal/operatorhub/operatorhub.go new file mode 100644 index 0000000000..e1f2ba0999 --- /dev/null +++ b/hack/operatorhub/internal/operatorhub/operatorhub.go @@ -0,0 +1,576 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package operatorhub + +import ( + "bufio" + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "log" + "net/http" + "os" + "path/filepath" + "sort" + "strings" + "text/template" + "time" + + "github.com/Masterminds/sprig/v3" + "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd/flags" + gyaml "github.com/ghodss/yaml" + admissionv1 "k8s.io/api/admissionregistration/v1" + rbacv1 "k8s.io/api/rbac/v1" + apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apimachinery/pkg/util/yaml" + "k8s.io/kubectl/pkg/scheme" +) + +const ( + allInOneURL = "https://download.elastic.co/downloads/eck/%s/all-in-one.yaml" + crdManifestURL = "https://download.elastic.co/downloads/eck/%s/crds.yaml" + operatorManifestURL = "https://download.elastic.co/downloads/eck/%s/operator.yaml" + operatorName = "elastic-operator" + + csvTemplateFile = "csv.tpl" + packageTemplateFile = "package.tpl" + + crdFileSuffix = "crd.yaml" + csvFileSuffix = "clusterserviceversion.yaml" + packageFileSuffix = "package.yaml" + + yamlSeparator = "---\n" + + imagesEndpoint = "https://catalog.redhat.com/api/containers/v1/projects/certification/id/%s/images" + + httpAcceptHeader = "Accept" + httpContentTypeHeader = "Content-Type" + httpXAPIKeyHeader = "X-API-KEY" + httpApplicationJSONHeaderValue = "application/json" +) + +var ( + errNotFound = errors.New("not found") +) + +// GenerateConfig is the configuration for the generate operation +type GenerateConfig struct { + ConfigFile *flags.Config + ManifestPaths []string + TemplatesPath string + RedhatAPIKey string + RedhatProjectID string +} + +// Generate will generate the Operator Lifecycle Manager format files +func Generate(config GenerateConfig) error { + var imageDigest string + if config.ConfigFile.HasDigestPinning() { + if len(config.RedhatAPIKey) == 0 { + return errors.New("Red Hat API key is required to get image digest") + } + if len(config.RedhatProjectID) == 0 { + return errors.New("Red Hat project ID is required to get image digest") + } + var err error + imageDigest, err = getImageDigest(config.RedhatAPIKey, config.RedhatProjectID, config.ConfigFile.NewVersion) + if err != nil { + log.Println("ⅹ") + return err + } + } + + log.Printf("Gathering and extracting data from yaml manifest path %v ", config.ManifestPaths) + manifestStream, close, err := getInstallManifestStream(config.ConfigFile, config.ManifestPaths) + if err != nil { + log.Println("ⅹ") + return err + } + log.Println("✓") + + defer close() + + extracts, err := extractYAMLParts(manifestStream) + if err != nil { + log.Println("ⅹ") + return err + } + log.Println("✓") + + log.Printf("Rendering final operatorhub data ") + for i := range config.ConfigFile.Packages { + params, err := buildRenderParams(config.ConfigFile, i, extracts, imageDigest) + if err != nil { + log.Println("ⅹ") + return err + } + + outDir := config.ConfigFile.Packages[i].OutputPath + if err := render(params, config.TemplatesPath, outDir); err != nil { + log.Println("ⅹ") + return err + } + } + + log.Println("✓") + return nil +} + +type Images struct { + Data []struct { + DockerImageDigest string `json:"docker_image_digest"` + Id string `json:"_id"` + CreationDate string `json:"creation_date"` + } `json:"data"` +} + +// getImageDigest connects to the Red Hat certification API to get the certified +// operator image digest as it is exposed by the Red Hat registry. +func getImageDigest(apiKey, projectId, version string) (string, error) { + requestURL := fmt.Sprintf(imagesEndpoint, projectId) + + req, err := http.NewRequest(http.MethodGet, requestURL, nil) + if err != nil { + return "", err + } + + req.Header.Set(httpContentTypeHeader, httpApplicationJSONHeaderValue) + req.Header.Set(httpAcceptHeader, httpApplicationJSONHeaderValue) + req.Header.Set(httpXAPIKeyHeader, apiKey) + + q := req.URL.Query() + q.Add("filter", fmt.Sprintf("repositories.tags.name==%s;deleted==false", version)) + req.URL.RawQuery = q.Encode() + + client := http.Client{ + Timeout: 30 * time.Second, + } + res, err := client.Do(req) + if err != nil { + return "", err + } + defer res.Body.Close() + + if res.StatusCode != http.StatusOK { + return "", fmt.Errorf("request error %s: %s", requestURL, res.Status) + } + + var images Images + if err := json.NewDecoder(res.Body).Decode(&images); err != nil { + return "", err + } + if len(images.Data) > 1 { + fmt.Fprintf(os.Stderr, "\nid creation_date docker_image_digest\n") + for _, image := range images.Data { + fmt.Fprintf(os.Stderr, "%s %s %s\n", image.Id, image.CreationDate, image.DockerImageDigest) + } + return "", fmt.Errorf("found %d images with tag %s in RedHat catalog while only one is expected", len(images.Data), version) + } + if len(images.Data) == 0 { + return "", fmt.Errorf("no image with tag %s in RedHat catalog", version) + } + imageDigest := images.Data[0].DockerImageDigest + if imageDigest == "" { + return "", fmt.Errorf("image digest for %s is empty", version) + } + return imageDigest, nil +} + +func getInstallManifestStream(conf *flags.Config, manifestPaths []string) (io.Reader, func(), error) { + if len(manifestPaths) == 0 { + s, err := installManifestFromWeb(conf.NewVersion) + return s, func() {}, err + } + + var rs []io.Reader + closer := func() { + for _, r := range rs { + if closer, ok := r.(io.Closer); ok { + closer.Close() + } + } + } + for _, p := range manifestPaths { + r, err := os.Open(p) + if err != nil { + return nil, closer, fmt.Errorf("while opening %s: %w", manifestPaths, err) + } + rs = append(rs, r) + // if we're using local yaml files, ensure that they have a proper + // end of directives marker between them. + rs = append(rs, strings.NewReader(yamlSeparator)) + } + return io.MultiReader(rs...), closer, nil +} + +func installManifestFromWeb(version string) (io.Reader, error) { + // try the legacy all-in-one first for older releases + buf, err := makeRequest(fmt.Sprintf(allInOneURL, version)) + if err == errNotFound { + // if not found load the separate manifests for CRDs and operator (version >= 1.7.0) + crds, err := makeRequest(fmt.Sprintf(crdManifestURL, version)) + if err != nil { + return nil, err + } + op, err := makeRequest(fmt.Sprintf(operatorManifestURL, version)) + if err != nil { + return nil, err + } + return io.MultiReader(crds, strings.NewReader(yamlSeparator), op), nil + } + return buf, err +} + +func makeRequest(url string) (io.Reader, error) { + client := http.Client{} + + ctx, cancelFunc := context.WithTimeout(context.Background(), 10*time.Second) + defer cancelFunc() + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, http.NoBody) + if err != nil { + return nil, fmt.Errorf("while creating request to %s: %w", url, err) + } + + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("while executing HTTP GET %s: %w", url, err) + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusNotFound { + return nil, errNotFound + } + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("request error %s: %s", url, resp.Status) + } + + buf := new(bytes.Buffer) + _, err = io.Copy(buf, resp.Body) + + return buf, err +} + +// CRD defines a custom resource definition +type CRD struct { + Name string + Group string + Kind string + Version string + DisplayName string + Description string + Def []byte +} + +// WebhookDefinition corresponds to a WebhookDefinition within an OLM +// ClusterServiceVersion. +// See https://olm.operatorframework.io/docs/advanced-tasks/adding-admission-and-conversion-webhooks/ +type WebhookDefinition struct { + AdmissionReviewVersions []string `json:"admissionReviewVersions"` + ContainerPort int `json:"containerPort"` + DeploymentName string `json:"deploymentName"` + FailurePolicy *admissionv1.FailurePolicyType `json:"failurePolicy"` + MatchPolicy admissionv1.MatchPolicyType `json:"matchPolicy"` + GenerateName string `json:"generateName"` + Rules []admissionv1.RuleWithOperations `json:"rules"` + SideEffects *admissionv1.SideEffectClass `json:"sideEffects"` + TargetPort int `json:"targetPort"` + Type string `json:"type"` + WebhookPath *string `json:"webhookPath"` +} + +type yamlExtracts struct { + crds map[string]*CRD + operatorRBAC []rbacv1.PolicyRule + operatorWebhooks []admissionv1.ValidatingWebhookConfiguration +} + +func extractYAMLParts(stream io.Reader) (*yamlExtracts, error) { + if err := apiextv1beta1.AddToScheme(scheme.Scheme); err != nil { + return nil, fmt.Errorf("while registering apiextensions/v1beta1: %w", err) + } + + if err := apiextv1.AddToScheme(scheme.Scheme); err != nil { + return nil, fmt.Errorf("while registering apiextensions/v1: %w", err) + } + + if err := admissionv1.AddToScheme(scheme.Scheme); err != nil { + return nil, fmt.Errorf("while registering admissionregistration/v1: %w", err) + } + + decoder := scheme.Codecs.UniversalDeserializer() + yamlReader := yaml.NewYAMLReader(bufio.NewReader(stream)) + + parts := &yamlExtracts{ + crds: make(map[string]*CRD), + } + + for { + yamlBytes, err := yamlReader.Read() + if err != nil { + if errors.Is(err, io.EOF) { + return parts, nil + } + + return nil, fmt.Errorf("while reading CRD YAML: %w", err) + } + + yamlBytes = normalizeTrailingNewlines(yamlBytes) + + runtimeObj, _, err := decoder.Decode(yamlBytes, nil, nil) + if err != nil { + return nil, fmt.Errorf("while decoding CRD YAML: %w", err) + } + + switch obj := runtimeObj.(type) { + case *apiextv1beta1.CustomResourceDefinition: + parts.crds[obj.Name] = &CRD{ + Name: obj.Name, + Group: obj.Spec.Group, + Kind: obj.Spec.Names.Kind, + Version: obj.Spec.Version, + Def: yamlBytes, + } + case *apiextv1.CustomResourceDefinition: + parts.crds[obj.Name] = &CRD{ + Name: obj.Name, + Group: obj.Spec.Group, + Kind: obj.Spec.Names.Kind, + Version: obj.Spec.Versions[0].Name, + Def: yamlBytes, + } + case *rbacv1.ClusterRole: + if obj.Name == operatorName { + parts.operatorRBAC = obj.Rules + } + case *admissionv1.ValidatingWebhookConfiguration: + parts.operatorWebhooks = append(parts.operatorWebhooks, *obj) + } + } +} + +// normalizeTrailingNewlines removed duplicate newlines at the end of the documents to satisfy YAML linter rules. +func normalizeTrailingNewlines(yamlBytes []byte) []byte { + trimmed := bytes.TrimRight(yamlBytes, "\n") + return append(trimmed, "\n"...) +} + +// RenderParams are the parameters sent to the render operation +type RenderParams struct { + NewVersion string + ShortVersion string + PrevVersion string + StackVersion string + OperatorRepo string + OperatorRBAC string + AdditionalArgs []string + CRDList []*CRD + OperatorWebhooks string + PackageName string + Tag string + UbiOnly bool +} + +func buildRenderParams(conf *flags.Config, packageIndex int, extracts *yamlExtracts, imageDigest string) (*RenderParams, error) { + for _, c := range conf.CRDs { + if crd, ok := extracts.crds[c.Name]; ok { + crd.DisplayName = c.DisplayName + crd.Description = c.Description + } + } + + crdList := make([]*CRD, 0, len(extracts.crds)) + + var missing []string + + for _, crd := range extracts.crds { + if strings.TrimSpace(crd.Description) == "" || strings.TrimSpace(crd.DisplayName) == "" { + missing = append(missing, crd.Name) + } + + crdList = append(crdList, crd) + } + + if len(missing) > 0 { + return nil, fmt.Errorf("config file does not contain descriptions for some CRDs: %+v", missing) + } + + sort.Slice(crdList, func(i, j int) bool { + return crdList[i].Name <= crdList[j].Name + }) + + var webhookDefinitionList []WebhookDefinition + + for _, webhook := range extracts.operatorWebhooks { + webhookDefinitionList = append(webhookDefinitionList, validatingWebhookConfigurationToWebhookDefinition(webhook)...) + } + + webhooks, err := gyaml.Marshal(webhookDefinitionList) + if err != nil { + return nil, fmt.Errorf("while marshaling operator webhook rules: %w", err) + } + + versionParts := strings.Split(conf.NewVersion, ".") + if len(versionParts) < 2 { + return nil, fmt.Errorf("newVersion in config file appears to be invalid [%s]", conf.NewVersion) + } + + rbac, err := gyaml.Marshal(extracts.operatorRBAC) + if err != nil { + return nil, fmt.Errorf("while marshaling operator RBAC rules: %w", err) + } + + var additionalArgs []string + if conf.Packages[packageIndex].UbiOnly { + additionalArgs = append(additionalArgs, "--ubi-only") + } + + additionalArgs = append(additionalArgs, "--distribution-channel="+conf.Packages[packageIndex].DistributionChannel) + + tag := ":" + conf.NewVersion + if conf.Packages[packageIndex].DigestPinning { + tag = "@" + imageDigest + } + + return &RenderParams{ + NewVersion: conf.NewVersion, + ShortVersion: strings.Join(versionParts[:2], "."), + PrevVersion: conf.PrevVersion, + StackVersion: conf.StackVersion, + OperatorRepo: conf.Packages[packageIndex].OperatorRepo, + AdditionalArgs: additionalArgs, + CRDList: crdList, + OperatorWebhooks: string(webhooks), + OperatorRBAC: string(rbac), + PackageName: conf.Packages[packageIndex].PackageName, + Tag: tag, + UbiOnly: conf.Packages[packageIndex].UbiOnly, + }, nil +} + +// validatingWebhookConfigurationToWebhookDefinition converts a standard validating webhook configuration resource +// to an OLM webhook definition resource. +func validatingWebhookConfigurationToWebhookDefinition(webhookConfiguration admissionv1.ValidatingWebhookConfiguration) []WebhookDefinition { + var webhookDefinitions []WebhookDefinition + for _, webhook := range webhookConfiguration.Webhooks { + webhookDefinitions = append(webhookDefinitions, WebhookDefinition{ + Type: "ValidatingAdmissionWebhook", + AdmissionReviewVersions: webhook.AdmissionReviewVersions, + TargetPort: 9443, + ContainerPort: 443, + DeploymentName: "elastic-operator", + FailurePolicy: webhook.FailurePolicy, + MatchPolicy: admissionv1.Exact, + GenerateName: webhook.Name, + Rules: webhook.Rules, + SideEffects: webhook.SideEffects, + WebhookPath: webhook.ClientConfig.Service.Path, + }) + } + return webhookDefinitions +} + +func render(params *RenderParams, templatesDir, outDir string) error { + versionDir := filepath.Join(outDir, params.NewVersion) + + // if the directory exists, throw an error because overwriting/merging is dangerous + _, err := os.Stat(versionDir) + if err != nil { + if !os.IsNotExist(err) { + return fmt.Errorf("failed to stat %s: %w", versionDir, err) + } + } else { + err := os.RemoveAll(versionDir) + if err != nil { + return fmt.Errorf("while removing existing directory: %w", err) + } + } + + if err := os.MkdirAll(versionDir, 0o766); err != nil { + return fmt.Errorf("while creating directory %s: %w", versionDir, err) + } + + if err := renderCSVFile(params, templatesDir, versionDir); err != nil { + return err + } + + if err := renderCRDs(params, versionDir); err != nil { + return err + } + + // package file is written outside the version directory + return renderPackageFile(params, templatesDir, outDir) +} + +func renderCSVFile(params *RenderParams, templatesDir, outDir string) error { + templateFile := filepath.Join(templatesDir, csvTemplateFile) + csvFile := filepath.Join(outDir, fmt.Sprintf("%s.v%s.%s", params.PackageName, params.NewVersion, csvFileSuffix)) + if strings.HasPrefix(params.NewVersion, "v") { + csvFile = filepath.Join(outDir, fmt.Sprintf("%s.%s.%s", params.PackageName, params.NewVersion, csvFileSuffix)) + } + + return renderTemplate(params, templateFile, csvFile) +} + +func renderPackageFile(params *RenderParams, templatesDir, outDir string) error { + templateFile := filepath.Join(templatesDir, packageTemplateFile) + pkgFile := filepath.Join(outDir, fmt.Sprintf("%s.%s", params.PackageName, packageFileSuffix)) + + return renderTemplate(params, templateFile, pkgFile) +} + +func renderTemplate(params *RenderParams, templatePath, outPath string) error { + // ensure NewVersion is never prefixed with 'v' when rendering template + // as we use the 'v' prefix in the `name:` field, but the `version:` field + // cannnot have the 'v' prefix, as the certified operator automation + // refused to accept this field with a 'v' prefix. + if strings.HasPrefix(params.NewVersion, "v") { + params.NewVersion = strings.TrimPrefix(params.NewVersion, "v") + } + tmpl, err := template.New(filepath.Base(templatePath)).Funcs(sprig.TxtFuncMap()).ParseFiles(templatePath) + if err != nil { + return fmt.Errorf("while parsing template at %s: %w", templatePath, err) + } + + outFile, err := os.OpenFile(outPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644) + if err != nil { + return fmt.Errorf("while opening file for writing [%s]: %w", outPath, err) + } + + defer outFile.Close() + + return tmpl.Execute(outFile, params) +} + +func renderCRDs(params *RenderParams, outDir string) error { + for _, crd := range params.CRDList { + crdFileName := fmt.Sprintf("%s.%s", strings.ToLower(crd.Name), crdFileSuffix) + crdPath := filepath.Join(outDir, crdFileName) + + crdFile, err := os.Create(crdPath) + if err != nil { + return fmt.Errorf("while creating %s: %w", crdPath, err) + } + + if err := writeCRD(crdFile, crd.Def); err != nil { + return fmt.Errorf("while writing to %s: %w", crdPath, err) + } + } + + return nil +} + +func writeCRD(out io.WriteCloser, data []byte) error { + defer out.Close() + + _, err := io.Copy(out, bytes.NewReader(data)) + + return err +} diff --git a/hack/operatorhub/internal/opm/opm.go b/hack/operatorhub/internal/opm/opm.go new file mode 100644 index 0000000000..d511196676 --- /dev/null +++ b/hack/operatorhub/internal/opm/opm.go @@ -0,0 +1,117 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +package opm + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "path/filepath" + "strings" + + "github.com/operator-framework/operator-registry/pkg/lib/bundle" + "github.com/sirupsen/logrus" +) + +// GenerateConfig is the configuration for generating +// a bundle using the operator registry tooling. +type GenerateConfig struct { + LocalDirectory string + OutputDirectory string +} + +// GenerateBundle is used to build the operator bundle image to publish on OperatorHub. +func GenerateBundle(conf GenerateConfig) error { + if _, err := os.Stat(conf.LocalDirectory); err != nil && os.IsNotExist(err) { + os.MkdirAll(conf.LocalDirectory, 0700) + } + log.Printf("Generating operator bundle image for publishing ") + // Disable logging of unnecessary information during bundle creation + logrus.SetLevel(logrus.WarnLevel) + err := bundle.GenerateFunc( + conf.LocalDirectory, + conf.OutputDirectory, + "", + "", + "", + true, + ) + if err != nil { + log.Println("ⅹ") + return fmt.Errorf("during opm generate: %w", err) + } + + files, err := filepath.Glob(filepath.Join(conf.LocalDirectory, "*")) + if err != nil { + return fmt.Errorf("listing all files in %s: %w", conf.LocalDirectory, err) + } + + for _, file := range files { + if strings.HasSuffix(file, ".yaml") || strings.HasSuffix(file, ".yml") { + err = os.RemoveAll(file) + if err != nil { + return fmt.Errorf("while deleting file %s: %w", file, err) + } + } + } + + log.Println("✓") + return nil +} + +// EnsureAnnotations will ensure that the required annotations exist within the given file. +func EnsureAnnotations(file string, supportedVersions string) error { + requiredAnnotations := []string{ + fmt.Sprintf(` com.redhat.openshift.versions: %s`, supportedVersions), + } + b, err := ioutil.ReadFile(file) + if err != nil { + return fmt.Errorf("while reading file (%s): %w", file, err) + } + contents := string(b) + for _, annotation := range requiredAnnotations { + if !strings.Contains(contents, annotation) { + if err = appendToFile(file, annotation); err != nil { + return err + } + } + } + return nil +} + +// EnsureLabels will ensure that the required labels exist within the given file. +func EnsureLabels(file string, supportedVersions string) error { + requiredLabels := []string{ + fmt.Sprintf(`LABEL com.redhat.openshift.versions=%s`, supportedVersions), + `LABEL com.redhat.delivery.backport=false`, + `LABEL com.redhat.delivery.operator.bundle=true`, + } + b, err := ioutil.ReadFile(file) + if err != nil { + return fmt.Errorf("while reading file (%s): %w", file, err) + } + contents := string(b) + for _, label := range requiredLabels { + if !strings.Contains(contents, label) { + if err = appendToFile(file, label); err != nil { + return err + } + } + } + return nil +} + +func appendToFile(file, data string) error { + f, err := os.OpenFile(file, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + return fmt.Errorf("while opening file (%s) for writing: %w", file, err) + } + defer f.Close() + if _, err := f.WriteString(data + "\n"); err != nil { + return fmt.Errorf("while appending to file (%s): %w", file, err) + } + return nil +} diff --git a/hack/operatorhub/main.go b/hack/operatorhub/main.go index 653d77dffa..bbc867cd6f 100644 --- a/hack/operatorhub/main.go +++ b/hack/operatorhub/main.go @@ -5,629 +5,15 @@ package main import ( - "bufio" - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" + "log" "os" - "path/filepath" - "sort" - "strings" - "text/template" - "time" - "github.com/Masterminds/sprig/v3" - gyaml "github.com/ghodss/yaml" - "github.com/spf13/cobra" - "github.com/spf13/viper" - admissionv1 "k8s.io/api/admissionregistration/v1" - rbacv1 "k8s.io/api/rbac/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/kubectl/pkg/scheme" + root "github.com/elastic/cloud-on-k8s/v2/hack/operatorhub/cmd" ) -const ( - allInOneURL = "https://download.elastic.co/downloads/eck/%s/all-in-one.yaml" - crdManifestURL = "https://download.elastic.co/downloads/eck/%s/crds.yaml" - operatorManifestURL = "https://download.elastic.co/downloads/eck/%s/operator.yaml" - operatorName = "elastic-operator" - - RedHatAPITokenFlag = "redhat-api-token" - RedHatProjectIdFLag = "redhat-project-id" - - csvTemplateFile = "csv.tpl" - packageTemplateFile = "package.tpl" - - crdFileSuffix = "crd.yaml" - csvFileSuffix = "clusterserviceversion.yaml" - packageFileSuffix = "package.yaml" - - yamlSeparator = "---\n" - - ImagesEndpoint = "https://catalog.redhat.com/api/containers/v1/projects/certification/id/%s/images" -) - -type cmdArgs struct { - confPath string - manifestPaths []string - templatesDir string -} - -var args = cmdArgs{} - func main() { - cmd := &cobra.Command{ - Use: "operatorhub", - Short: "Generate Operator Lifecycle Manager format files", - Example: "./operatorhub --conf=config.yaml", - Version: "0.2.0", - SilenceErrors: true, - SilenceUsage: true, - RunE: doRun, - } - - cmd.Flags().StringVar(&args.confPath, "conf", "config.yaml", "Path to config file") - - cmd.Flags().StringSliceVar(&args.manifestPaths, "yaml-manifest", nil, "Path to installation manifests") - cmd.Flags().StringVar(&args.templatesDir, "templates", "./templates", "Path to the templates directory") - cmd.Flags().String(RedHatAPITokenFlag, "", "RedHat API key") - cmd.Flags().String(RedHatProjectIdFLag, "", "RedHat project id") - - // enable using dashed notation in flags and underscores in env - viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) - if err := viper.BindPFlags(cmd.Flags()); err != nil { - fmt.Fprintf(os.Stderr, "failed to bind flags: %v\n", err) - os.Exit(1) - } - viper.AutomaticEnv() - - if err := cmd.Execute(); err != nil { - fmt.Fprintf(os.Stderr, "Error: %v\n", err) + if err := root.Cmd.Execute(); err != nil { + log.Printf("failed to run command: %s", err) os.Exit(1) } } - -func doRun(_ *cobra.Command, _ []string) error { - conf, err := loadConfig(args.confPath) - if err != nil { - return fmt.Errorf("when loading config: %w", err) - } - - // Sanity check, if RedHat API key and project ID are not provided then the certified bundle cannot be generated. - redhatAPIKey := viper.GetString(RedHatAPITokenFlag) - redhatProjectId := viper.GetString(RedHatProjectIdFLag) - imageDigest := "" - if conf.HasDigestPinning() { - if len(redhatAPIKey) == 0 { - return errors.New("RedHat API key is required to get image digest") - } - if len(redhatProjectId) == 0 { - return errors.New("RedHat project ID is required to get image digest") - } - imageDigest, err = getImageDigest(redhatAPIKey, redhatProjectId, conf.NewVersion) - if err != nil { - return err - } - } - - manifestStream, close, err := getInstallManifestStream(conf, args.manifestPaths) - if err != nil { - return fmt.Errorf("when getting install manifest stream: %w", err) - } - - defer close() - - extracts, err := extractYAMLParts(manifestStream) - if err != nil { - return fmt.Errorf("when extracting YAML parts: %w", err) - } - - for i := range conf.Packages { - params, err := buildRenderParams(conf, i, extracts, imageDigest) - if err != nil { - return fmt.Errorf("when building render params: %w", err) - } - - outDir := conf.Packages[i].OutputPath - if err := render(params, args.templatesDir, outDir); err != nil { - return fmt.Errorf("when rendering: %w", err) - } - } - - return nil -} - -type config struct { - NewVersion string `json:"newVersion"` - PrevVersion string `json:"prevVersion"` - StackVersion string `json:"stackVersion"` - CRDs []struct { - Name string `json:"name"` - DisplayName string `json:"displayName"` - Description string `json:"description"` - } `json:"crds"` - Packages []struct { - OutputPath string `json:"outputPath"` - PackageName string `json:"packageName"` - DistributionChannel string `json:"distributionChannel"` - OperatorRepo string `json:"operatorRepo"` - UbiOnly bool `json:"ubiOnly"` - DigestPinning bool `json:"digestPinning"` - } `json:"packages"` -} - -func (c *config) HasDigestPinning() bool { - if c == nil { - return false - } - for _, pkg := range c.Packages { - if pkg.DigestPinning { - return true - } - } - return false -} - -func loadConfig(path string) (*config, error) { - confBytes, err := os.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("failed to open file %s: %w", path, err) - } - - var conf config - if err := gyaml.Unmarshal(confBytes, &conf); err != nil { - return nil, fmt.Errorf("failed to unmarshal config from %s: %w", path, err) - } - - return &conf, nil -} - -var errNotFound = errors.New("not found") - -func getInstallManifestStream(conf *config, manifestPaths []string) (io.Reader, func(), error) { - if len(manifestPaths) == 0 { - s, err := installManifestFromWeb(conf.NewVersion) - return s, func() {}, err - } - - var rs []io.Reader - closer := func() { - for _, r := range rs { - if closer, ok := r.(io.Closer); ok { - closer.Close() - } - } - } - for _, p := range manifestPaths { - r, err := os.Open(p) - if err != nil { - return nil, closer, fmt.Errorf("failed to open %s: %w", manifestPaths, err) - } - rs = append(rs, r) - // if we're using local yaml files, ensure that they have a proper - // end of directives marker between them. - rs = append(rs, strings.NewReader(yamlSeparator)) - } - return io.MultiReader(rs...), closer, nil -} - -func installManifestFromWeb(version string) (io.Reader, error) { - // try the legacy all-in-one first for older releases - buf, err := makeRequest(fmt.Sprintf(allInOneURL, version)) - if err == errNotFound { - // if not found load the separate manifests for CRDs and operator (version >= 1.7.0) - crdManifestURL := fmt.Sprintf(crdManifestURL, version) - crds, err := makeRequest(crdManifestURL) - if err != nil { - return nil, fmt.Errorf("when getting %s: %w", crdManifestURL, err) - } - operatorManifestURL := fmt.Sprintf(operatorManifestURL, version) - op, err := makeRequest(operatorManifestURL) - if err != nil { - return nil, fmt.Errorf("when getting %s: %w", operatorManifestURL, err) - } - return io.MultiReader(crds, strings.NewReader(yamlSeparator), op), nil - } - return buf, err -} - -func makeRequest(url string) (io.Reader, error) { - client := http.Client{} - - ctx, cancelFunc := context.WithTimeout(context.Background(), 10*time.Second) - defer cancelFunc() - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, http.NoBody) - if err != nil { - return nil, fmt.Errorf("failed to create request to %s: %w", url, err) - } - - resp, err := client.Do(req) - if err != nil { - return nil, fmt.Errorf("failed to GET %s: %w", url, err) - } - defer resp.Body.Close() - - if resp.StatusCode == http.StatusNotFound { - return nil, errNotFound - } - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("request error %s: %s", url, resp.Status) - } - - buf := new(bytes.Buffer) - _, err = io.Copy(buf, resp.Body) - - return buf, err -} - -type CRD struct { - Name string - Group string - Kind string - Version string - DisplayName string - Description string - Def []byte -} - -// WebhookDefinition corresponds to a WebhookDefinition within an OLM -// ClusterServiceVersion. -// See https://olm.operatorframework.io/docs/advanced-tasks/adding-admission-and-conversion-webhooks/ -type WebhookDefinition struct { - AdmissionReviewVersions []string `json:"admissionReviewVersions"` - ContainerPort int `json:"containerPort"` - DeploymentName string `json:"deploymentName"` - FailurePolicy *admissionv1.FailurePolicyType `json:"failurePolicy"` - MatchPolicy admissionv1.MatchPolicyType `json:"matchPolicy"` - GenerateName string `json:"generateName"` - Rules []admissionv1.RuleWithOperations `json:"rules"` - SideEffects *admissionv1.SideEffectClass `json:"sideEffects"` - TargetPort int `json:"targetPort"` - Type string `json:"type"` - WebhookPath *string `json:"webhookPath"` -} - -type yamlExtracts struct { - crds map[string]*CRD - operatorRBAC []rbacv1.PolicyRule - operatorWebhooks []admissionv1.ValidatingWebhookConfiguration -} - -func extractYAMLParts(stream io.Reader) (*yamlExtracts, error) { - if err := apiextv1beta1.AddToScheme(scheme.Scheme); err != nil { - return nil, fmt.Errorf("failed to register apiextensions/v1beta1: %w", err) - } - - if err := apiextv1.AddToScheme(scheme.Scheme); err != nil { - return nil, fmt.Errorf("failed to register apiextensions/v1: %w", err) - } - - if err := admissionv1.AddToScheme(scheme.Scheme); err != nil { - return nil, fmt.Errorf("failed to register admissionregistration/v1: %w", err) - } - - decoder := scheme.Codecs.UniversalDeserializer() - yamlReader := yaml.NewYAMLReader(bufio.NewReader(stream)) - - parts := &yamlExtracts{ - crds: make(map[string]*CRD), - } - - for { - yamlBytes, err := yamlReader.Read() - if err != nil { - if errors.Is(err, io.EOF) { - return parts, nil - } - - return nil, fmt.Errorf("failed to read CRD YAML: %w", err) - } - - yamlBytes = normalizeTrailingNewlines(yamlBytes) - - runtimeObj, _, err := decoder.Decode(yamlBytes, nil, nil) - if err != nil { - return nil, fmt.Errorf("failed to decode CRD YAML: %w", err) - } - - switch obj := runtimeObj.(type) { - case *apiextv1beta1.CustomResourceDefinition: - parts.crds[obj.Name] = &CRD{ - Name: obj.Name, - Group: obj.Spec.Group, - Kind: obj.Spec.Names.Kind, - Version: obj.Spec.Version, - Def: yamlBytes, - } - case *apiextv1.CustomResourceDefinition: - parts.crds[obj.Name] = &CRD{ - Name: obj.Name, - Group: obj.Spec.Group, - Kind: obj.Spec.Names.Kind, - Version: obj.Spec.Versions[0].Name, - Def: yamlBytes, - } - case *rbacv1.ClusterRole: - if obj.Name == operatorName { - parts.operatorRBAC = obj.Rules - } - case *admissionv1.ValidatingWebhookConfiguration: - parts.operatorWebhooks = append(parts.operatorWebhooks, *obj) - } - } -} - -// normalizeTrailingNewlines removed duplicate newlines at the end of the documents to satisfy YAML linter rules. -func normalizeTrailingNewlines(yamlBytes []byte) []byte { - trimmed := bytes.TrimRight(yamlBytes, "\n") - return append(trimmed, "\n"...) -} - -type RenderParams struct { - NewVersion string - ShortVersion string - PrevVersion string - StackVersion string - OperatorRepo string - OperatorRBAC string - AdditionalArgs []string - CRDList []*CRD - OperatorWebhooks string - PackageName string - Tag string - UbiOnly bool -} - -func buildRenderParams(conf *config, packageIndex int, extracts *yamlExtracts, imageDigest string) (*RenderParams, error) { - for _, c := range conf.CRDs { - if crd, ok := extracts.crds[c.Name]; ok { - crd.DisplayName = c.DisplayName - crd.Description = c.Description - } - } - - crdList := make([]*CRD, 0, len(extracts.crds)) - - var missing []string - - for _, crd := range extracts.crds { - if strings.TrimSpace(crd.Description) == "" || strings.TrimSpace(crd.DisplayName) == "" { - missing = append(missing, crd.Name) - } - - crdList = append(crdList, crd) - } - - if len(missing) > 0 { - return nil, fmt.Errorf("config file does not contain descriptions for some CRDs: %+v", missing) - } - - sort.Slice(crdList, func(i, j int) bool { - return crdList[i].Name <= crdList[j].Name - }) - - var webhookDefinitionList []WebhookDefinition - - for _, webhook := range extracts.operatorWebhooks { - webhookDefinitionList = append(webhookDefinitionList, validatingWebhookConfigurationToWebhookDefinition(webhook)...) - } - - webhooks, err := gyaml.Marshal(webhookDefinitionList) - if err != nil { - return nil, fmt.Errorf("failed to marshal operator webhook rules: %w", err) - } - - versionParts := strings.Split(conf.NewVersion, ".") - if len(versionParts) < 2 { - return nil, fmt.Errorf("newVersion in config file appears to be invalid [%s]", conf.NewVersion) - } - - rbac, err := gyaml.Marshal(extracts.operatorRBAC) - if err != nil { - return nil, fmt.Errorf("failed to marshal operator RBAC rules: %w", err) - } - - var additionalArgs []string - if conf.Packages[packageIndex].UbiOnly { - additionalArgs = append(additionalArgs, "--ubi-only") - } - - additionalArgs = append(additionalArgs, "--distribution-channel="+conf.Packages[packageIndex].DistributionChannel) - - tag := ":" + conf.NewVersion - if conf.Packages[packageIndex].DigestPinning { - tag = "@" + imageDigest - } - - return &RenderParams{ - NewVersion: conf.NewVersion, - ShortVersion: strings.Join(versionParts[:2], "."), - PrevVersion: conf.PrevVersion, - StackVersion: conf.StackVersion, - OperatorRepo: conf.Packages[packageIndex].OperatorRepo, - AdditionalArgs: additionalArgs, - CRDList: crdList, - OperatorWebhooks: string(webhooks), - OperatorRBAC: string(rbac), - PackageName: conf.Packages[packageIndex].PackageName, - Tag: tag, - UbiOnly: conf.Packages[packageIndex].UbiOnly, - }, nil -} - -// validatingWebhookConfigurationToWebhookDefinition converts a standard validating webhook configuration resource -// to an OLM webhook definition resource. -func validatingWebhookConfigurationToWebhookDefinition(webhookConfiguration admissionv1.ValidatingWebhookConfiguration) []WebhookDefinition { - var webhookDefinitions []WebhookDefinition - for _, webhook := range webhookConfiguration.Webhooks { - webhookDefinitions = append(webhookDefinitions, WebhookDefinition{ - Type: "ValidatingAdmissionWebhook", - AdmissionReviewVersions: webhook.AdmissionReviewVersions, - TargetPort: 9443, - ContainerPort: 443, - DeploymentName: "elastic-operator", - FailurePolicy: webhook.FailurePolicy, - MatchPolicy: admissionv1.Exact, - GenerateName: webhook.Name, - Rules: webhook.Rules, - SideEffects: webhook.SideEffects, - WebhookPath: webhook.ClientConfig.Service.Path, - }) - } - return webhookDefinitions -} - -func render(params *RenderParams, templatesDir, outDir string) error { - versionDir := filepath.Join(outDir, params.NewVersion) - - // if the directory exists, throw an error because overwriting/merging is dangerous - _, err := os.Stat(versionDir) - if err != nil { - if !os.IsNotExist(err) { - return fmt.Errorf("failed to stat %s: %w", versionDir, err) - } - } else { - err := os.RemoveAll(versionDir) - if err != nil { - return fmt.Errorf("failed to remove existing directory: %w", err) - } - } - - if err := os.MkdirAll(versionDir, 0o766); err != nil { - return fmt.Errorf("failed to create directory %s: %w", versionDir, err) - } - - if err := renderCSVFile(params, templatesDir, versionDir); err != nil { - return err - } - - if err := renderCRDs(params, versionDir); err != nil { - return err - } - - // package file is written outside the version directory - return renderPackageFile(params, templatesDir, outDir) -} - -func renderCSVFile(params *RenderParams, templatesDir, outDir string) error { - templateFile := filepath.Join(templatesDir, csvTemplateFile) - csvFile := filepath.Join(outDir, fmt.Sprintf("%s.v%s.%s", params.PackageName, params.NewVersion, csvFileSuffix)) - - return renderTemplate(params, templateFile, csvFile) -} - -func renderPackageFile(params *RenderParams, templatesDir, outDir string) error { - templateFile := filepath.Join(templatesDir, packageTemplateFile) - pkgFile := filepath.Join(outDir, fmt.Sprintf("%s.%s", params.PackageName, packageFileSuffix)) - - return renderTemplate(params, templateFile, pkgFile) -} - -func renderTemplate(params *RenderParams, templatePath, outPath string) error { - tmpl, err := template.New(filepath.Base(templatePath)).Funcs(sprig.TxtFuncMap()).ParseFiles(templatePath) - if err != nil { - return fmt.Errorf("failed to parse template at %s: %w", templatePath, err) - } - - outFile, err := os.OpenFile(outPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644) - if err != nil { - return fmt.Errorf("failed to open file for writing [%s]: %w", outPath, err) - } - - defer outFile.Close() - - return tmpl.Execute(outFile, params) -} - -func renderCRDs(params *RenderParams, outDir string) error { - for _, crd := range params.CRDList { - crdFileName := fmt.Sprintf("%s.%s", strings.ToLower(crd.Name), crdFileSuffix) - crdPath := filepath.Join(outDir, crdFileName) - - crdFile, err := os.Create(crdPath) - if err != nil { - return fmt.Errorf("failed to create %s: %w", crdPath, err) - } - - if err := writeCRD(crdFile, crd.Def); err != nil { - return fmt.Errorf("failed to write to %s: %w", crdPath, err) - } - } - - return nil -} - -func writeCRD(out io.WriteCloser, data []byte) error { - defer out.Close() - - _, err := io.Copy(out, bytes.NewReader(data)) - - return err -} - -type Images struct { - Data []struct { - DockerImageDigest string `json:"docker_image_digest"` - Id string `json:"_id"` - CreationDate string `json:"creation_date"` - } `json:"data"` -} - -// getImageDigest connects to the RedHat catalog API to get the certified operator image digest as it is exposed -// by the RedHat registry. -func getImageDigest(apiKey, projectId, version string) (string, error) { - requestURL := fmt.Sprintf(ImagesEndpoint, projectId) - - req, err := http.NewRequest(http.MethodGet, requestURL, nil) - if err != nil { - return "", err - } - req.Header.Set("Content-Type", "application/json") - req.Header.Set("Accept", "application/json") - req.Header.Set("X-API-KEY", apiKey) - - q := req.URL.Query() - q.Add("filter", fmt.Sprintf("repositories.tags.name==%s;deleted==false", version)) - req.URL.RawQuery = q.Encode() - - client := http.Client{ - Timeout: 30 * time.Second, - } - res, err := client.Do(req) - if err != nil { - return "", err - } - defer res.Body.Close() - - if res.StatusCode != http.StatusOK { - return "", fmt.Errorf("request error %s: %s", requestURL, res.Status) - } - - var images Images - if err := json.NewDecoder(res.Body).Decode(&images); err != nil { - return "", err - } - if len(images.Data) > 1 { - fmt.Fprintf(os.Stderr, "\nid creation_date docker_image_digest\n") - for _, image := range images.Data { - fmt.Fprintf(os.Stderr, "%s %s %s\n", image.Id, image.CreationDate, image.DockerImageDigest) - } - return "", fmt.Errorf("found %d images with tag %s in RedHat catalog while only one is expected", len(images.Data), version) - } - if len(images.Data) == 0 { - return "", fmt.Errorf("no image with tag %s in RedHat catalog", version) - } - imageDigest := images.Data[0].DockerImageDigest - if imageDigest == "" { - return "", fmt.Errorf("image digest for %s is empty", version) - } - return imageDigest, nil -}