From f6a6c0f8a50f31ad563ebf16669af7864fe22d6d Mon Sep 17 00:00:00 2001 From: Jeremy Lewi Date: Wed, 28 Oct 2020 07:11:55 -0700 Subject: [PATCH] Autosync kubeflow.org groups using GitOps (#367) * This is a replacement for shelling out to GAM. * Import all the existing groups to YAML files. * Get rid of the old text files and GAM code * Only import members for groups that already defined in GitHub * We don't want to be the ones putting people's emails into GitHub * As part of the migration we will ask members of groups not currently being auto-sync'd to open up PRs to add themselves * We will then enable AutoSync for all groups. * We import stubs for all Groups but disable auto-sync; this way we can start asking people to submit PRs to join the group before we turn on the sync. * Support reading the OAuth2 credential from GCS * Add a Makefile to make it easy to run the commands. * Use a content hash to detect when files have changed and determine when to resync. * Also periodically force a resync so if there is any drift due to changes made outside the system they are reverted. Related to kubeflow/internal-acls#365 auto sync the Google groups Co-authored-by: Jeremy Lewi --- .gitignore | 2 + google_groups/Dockerfile | 26 + google_groups/Makefile | 43 ++ google_groups/README.md | 108 ++- google_groups/calendar-admins.members.txt | 9 - google_groups/ci-team.members.txt | 9 - google_groups/ci-viewer.members.txt | 14 - google_groups/cmd/main.go | 396 +++++++++++ google_groups/code-search-team.members.txt | 4 - .../community-meeting-hosts.members.txt | 2 - google_groups/create_group.sh | 67 -- google_groups/devrel-team.members.txt | 32 - google_groups/devstats.members.txt | 2 - .../drive-content-managers.members.txt | 23 - google_groups/example-maintainers.members.txt | 3 - google_groups/feast-team.members.txt | 3 - google_groups/github-team.members.txt | 8 - google_groups/go.mod | 25 + google_groups/go.sum | 657 ++++++++++++++++++ ...google-codelab-projects-owners.members.txt | 2 - .../google-kubeflow-admins.members.txt | 6 - google_groups/google-team.members.txt | 20 - google_groups/groups/blog.yaml | 11 + google_groups/groups/calendar-admins.yaml | 25 + google_groups/groups/ci-bot-owners.yaml | 11 + google_groups/groups/ci-team.yaml | 27 + google_groups/groups/ci-viewer.yaml | 35 + google_groups/groups/code-search-team.yaml | 15 + .../groups/community-meeting-hosts.yaml | 23 + google_groups/groups/devrel-team.yaml | 76 ++ google_groups/groups/devstats.yaml | 15 + .../groups/drive-content-managers.yaml | 57 ++ google_groups/groups/eventbrite.yaml | 11 + google_groups/groups/events.yaml | 10 + google_groups/groups/example-maintainers.yaml | 17 + google_groups/groups/feast-team.yaml | 17 + google_groups/groups/github-team.yaml | 25 + .../google-codelab-projects-owners.yaml | 14 + google_groups/groups/kf-demo-owners.yaml | 22 + google_groups/groups/kf-kcc-admins.yaml | 25 + .../groups/kubeflow-examples-gcr-writers.yaml | 11 + google_groups/groups/kubeflow-gsoc-admin.yaml | 14 + .../groups/kubeflow-gsoc-mentors.yaml | 14 + google_groups/groups/release-team.yaml | 24 + google_groups/groups/summit-2018.yaml | 11 + google_groups/groups/test-group.yaml | 11 + google_groups/groups/tf-operator.yaml | 11 + google_groups/groups/web-team.yaml | 11 + google_groups/insight-fellowship.members.txt | 3 - google_groups/kf-demo-owners.members.txt | 5 - google_groups/kf-kcc-admins.members.txt | 8 - .../kubeflow-examples-gcr-writers.members.txt | 1 - google_groups/latest_image.yaml | 4 + google_groups/manifests/deployment.yaml | 43 ++ google_groups/manifests/kustomization.yaml | 9 + google_groups/modeldb-team.members.txt | 2 - google_groups/pkg/api/upgrade.go | 66 ++ google_groups/pkg/api/upgrade_test.go | 60 ++ google_groups/pkg/api/util.go | 98 +++ google_groups/pkg/api/v1alpha1/types.go | 33 + google_groups/pkg/gcp/credentials.go | 210 ++++++ google_groups/pkg/gcp/gcs/doc.go | 4 + google_groups/pkg/gcp/gcs/filehelper.go | 15 + google_groups/pkg/gcp/gcs/local.go | 48 ++ google_groups/pkg/gcp/gcs/paths.go | 34 + google_groups/pkg/gcp/gcs/paths_test.go | 57 ++ google_groups/pkg/gcp/gcs/util.go | 277 ++++++++ google_groups/pkg/gcp/gcs/util_test.go | 149 ++++ google_groups/pkg/gcp/secret_cache.go | 153 ++++ google_groups/pkg/groups/const.go | 9 + google_groups/pkg/groups/importer.go | 97 +++ google_groups/pkg/groups/syncer.go | 227 ++++++ google_groups/pkg/groups/syncer_test.go | 54 ++ google_groups/pkg/util/files.go | 94 +++ google_groups/pkg/util/files_test.go | 41 ++ google_groups/pkg/util/io.go | 18 + google_groups/pkg/util/regex.go | 64 ++ google_groups/pkg/util/regex_test.go | 63 ++ google_groups/pkg/util/util.go | 18 + google_groups/release-team.members.txt | 5 - google_groups/sync_groups.sh | 29 - 81 files changed, 3726 insertions(+), 276 deletions(-) create mode 100644 .gitignore create mode 100644 google_groups/Dockerfile create mode 100644 google_groups/Makefile delete mode 100644 google_groups/calendar-admins.members.txt delete mode 100644 google_groups/ci-team.members.txt delete mode 100644 google_groups/ci-viewer.members.txt create mode 100644 google_groups/cmd/main.go delete mode 100644 google_groups/code-search-team.members.txt delete mode 100644 google_groups/community-meeting-hosts.members.txt delete mode 100755 google_groups/create_group.sh delete mode 100644 google_groups/devrel-team.members.txt delete mode 100644 google_groups/devstats.members.txt delete mode 100644 google_groups/drive-content-managers.members.txt delete mode 100644 google_groups/example-maintainers.members.txt delete mode 100644 google_groups/feast-team.members.txt delete mode 100644 google_groups/github-team.members.txt create mode 100644 google_groups/go.mod create mode 100644 google_groups/go.sum delete mode 100644 google_groups/google-codelab-projects-owners.members.txt delete mode 100644 google_groups/google-kubeflow-admins.members.txt delete mode 100644 google_groups/google-team.members.txt create mode 100644 google_groups/groups/blog.yaml create mode 100644 google_groups/groups/calendar-admins.yaml create mode 100644 google_groups/groups/ci-bot-owners.yaml create mode 100644 google_groups/groups/ci-team.yaml create mode 100644 google_groups/groups/ci-viewer.yaml create mode 100644 google_groups/groups/code-search-team.yaml create mode 100644 google_groups/groups/community-meeting-hosts.yaml create mode 100644 google_groups/groups/devrel-team.yaml create mode 100644 google_groups/groups/devstats.yaml create mode 100644 google_groups/groups/drive-content-managers.yaml create mode 100644 google_groups/groups/eventbrite.yaml create mode 100644 google_groups/groups/events.yaml create mode 100644 google_groups/groups/example-maintainers.yaml create mode 100644 google_groups/groups/feast-team.yaml create mode 100644 google_groups/groups/github-team.yaml create mode 100644 google_groups/groups/google-codelab-projects-owners.yaml create mode 100644 google_groups/groups/kf-demo-owners.yaml create mode 100644 google_groups/groups/kf-kcc-admins.yaml create mode 100644 google_groups/groups/kubeflow-examples-gcr-writers.yaml create mode 100644 google_groups/groups/kubeflow-gsoc-admin.yaml create mode 100644 google_groups/groups/kubeflow-gsoc-mentors.yaml create mode 100644 google_groups/groups/release-team.yaml create mode 100644 google_groups/groups/summit-2018.yaml create mode 100644 google_groups/groups/test-group.yaml create mode 100644 google_groups/groups/tf-operator.yaml create mode 100644 google_groups/groups/web-team.yaml delete mode 100644 google_groups/insight-fellowship.members.txt delete mode 100644 google_groups/kf-demo-owners.members.txt delete mode 100644 google_groups/kf-kcc-admins.members.txt delete mode 100644 google_groups/kubeflow-examples-gcr-writers.members.txt create mode 100644 google_groups/latest_image.yaml create mode 100644 google_groups/manifests/deployment.yaml create mode 100644 google_groups/manifests/kustomization.yaml delete mode 100644 google_groups/modeldb-team.members.txt create mode 100644 google_groups/pkg/api/upgrade.go create mode 100644 google_groups/pkg/api/upgrade_test.go create mode 100644 google_groups/pkg/api/util.go create mode 100644 google_groups/pkg/api/v1alpha1/types.go create mode 100644 google_groups/pkg/gcp/credentials.go create mode 100644 google_groups/pkg/gcp/gcs/doc.go create mode 100644 google_groups/pkg/gcp/gcs/filehelper.go create mode 100644 google_groups/pkg/gcp/gcs/local.go create mode 100644 google_groups/pkg/gcp/gcs/paths.go create mode 100644 google_groups/pkg/gcp/gcs/paths_test.go create mode 100644 google_groups/pkg/gcp/gcs/util.go create mode 100644 google_groups/pkg/gcp/gcs/util_test.go create mode 100644 google_groups/pkg/gcp/secret_cache.go create mode 100644 google_groups/pkg/groups/const.go create mode 100644 google_groups/pkg/groups/importer.go create mode 100644 google_groups/pkg/groups/syncer.go create mode 100644 google_groups/pkg/groups/syncer_test.go create mode 100644 google_groups/pkg/util/files.go create mode 100644 google_groups/pkg/util/files_test.go create mode 100644 google_groups/pkg/util/io.go create mode 100644 google_groups/pkg/util/regex.go create mode 100644 google_groups/pkg/util/regex_test.go create mode 100644 google_groups/pkg/util/util.go delete mode 100644 google_groups/release-team.members.txt delete mode 100755 google_groups/sync_groups.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..4c4fa6db417 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +**/.idea +**/.build \ No newline at end of file diff --git a/google_groups/Dockerfile b/google_groups/Dockerfile new file mode 100644 index 00000000000..f2d3a034148 --- /dev/null +++ b/google_groups/Dockerfile @@ -0,0 +1,26 @@ +# Build the manager binary +FROM golang:1.13 as builder + +WORKDIR /workspace +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY cmd/ cmd/ +COPY pkg/ pkg/ + +# Build +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o groups ./cmd/ + +# Use distroless as minimal base image to package the manager binary +# Refer to https://github.com/GoogleContainerTools/distroless for more details +FROM gcr.io/distroless/static:nonroot +WORKDIR / +COPY --from=builder /workspace/groups . +USER nonroot:nonroot + +ENTRYPOINT ["/groups"] diff --git a/google_groups/Makefile b/google_groups/Makefile new file mode 100644 index 00000000000..532108a30d5 --- /dev/null +++ b/google_groups/Makefile @@ -0,0 +1,43 @@ +GIT_VERSION:=$(shell git describe --dirty --always) + +PROJECT:=kf-infra-gitops + +IMAGE:=gcr.io/$(PROJECT)/groups-sync:$(GIT_VERSION) + +# Echo commands +SHELL = sh -xv + +LATESTIMAGES=latest_image.yaml + +CONTEXT:=kf-autobot + +# Build it locally +build: + mkdir -p .build + go build -o .build/groups ./cmd + +# Synchronize the groups using personal credentials. +sync: build + ./.build/groups run --input=./groups/*.yaml \ + --continuous=false \ + --credentials-file=gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json + +build-submit: + gcloud --project=$(PROJECT) builds submit --machine-type=n1-highcpu-32 --tag=$(IMAGE) ./ + +build-output: + yq w -i latest_image.yaml $(PROJECT).groups.image \ + $(IMAGE)@$(shell gcloud container images describe $(IMAGE) | yq r - image_summary.digest) + +set-image: + cd manifests && kustomize edit set image groups=$(shell yq r $(LATESTIMAGES) $(PROJECT).groups.image) + +update-image: build-submit build-output set-image + + +deploy: + kustomize build manifests | kubectl --context=$(CONTEXT) apply -f - + +# Build the image using GCB +# We can't use skaffold due to: https://github.com/GoogleContainerTools/skaffold/issues/3468 +build: build-submit build-output diff --git a/google_groups/README.md b/google_groups/README.md index f3a8dc43f24..6c55afc7740 100644 --- a/google_groups/README.md +++ b/google_groups/README.md @@ -1,29 +1,99 @@ -# internal-acls +# Google Groups Sync For kubeflow.org -Folder used to maintain google group ACLs used by the Kubeflow community. +This directory contains -The text files contain lists of folks that should be added -to various Google Groups in kubeflow.org that control -access to various shared resources. +* A Go Binary to auto sync Google group membership based on YAML configurations checked into GitHub +* The YAML configurations in groups/ -The script `sync_groups.sh` can be used to sync groups -using the GAM CLI. Only administrators with appropriate -permissions will be able to sync groups. +## How this Works -To create a new group +* We use the [Directory API](https://developers.google.com/admin-sdk/directory/v1/quickstart/go) + to programmatically update Google groups based on YAML files + +* The script runs using the gsuite account `autobot@kubeflow.org` + + * Password and recovery codes are stored in secret manager + + * **secret**: [projects/kf-infra-gitops/secrets/autobot-at-kubeflow-oauth-admin-api](https://console.cloud.google.com/security/secret-manager/secret/autobot-at-kubeflow-oauth-admin-api?project=kf-infra-gitops) + + ``` + gcloud --project=kf-infra-gitops secrets versions access latest --secret="autobot-at-kubeflow-oauth-admin-api" + ``` + +* An OAuthClient ID is stored in gcs: `gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json` + +* An OAuth2 refresh token is stored in secret manager to allow the script to run without human intervention + +* When `groups` runs it uses a GSA to read the OAuth2 refresh token from secret manager and then uses it + to authenticate as `autobot@kubeflow.org` to the calendar API + +* A side car runs git-sync](https://github.com/kubernetes/git-sync) in a side car to synchronize the repo to a volume mount + +* The `groups` program polls the location of the YAML file and when it detects a change (based on a hash of file contents) it runs a synchronization + + * The groups program will also periodically force a sync even if no changes are detected to deal with any + drift for this to occur + + +* The account `autobot@kubeflow.org` is a groups admin for kubeflow.org + +## To Manually Synchronize the Groups + +In order to run the sync you need the following + + * You must be a Groups admin for kubeflow.org + + * You must use an @kubeflow.org email an @google.com account won't work. + + * You must have access to an OAuth2 ClientSecret + + * The Makefile command below reads the OAuth2 credentials from GCS + * You must have access to that GCS file or else change it to use a different file ``` -GROUP_NAME=google-kubecon-europe -GROUP_EMAIL=${GROUP_NAME}@kubeflow.org -DESCRIPTION="Some group description" +make sync +``` + +## Refreshing the OAuth2 Refresh Token For `autobot@kubeflow.org` + +The OAuth2 refresh token is stored inside a secret in secret manager + + * **secret** [projects/kf-infra-gitops/secrets/autobot-at-kubeflow-oauth-admin-api](https://console.cloud.google.com/security/secret-manager/secret/autobot-at-kubeflow-oauth-admin-api?project=kf-infra-gitops) + +To regenerate the refresh token + +1. Destroy the latest version of the secret stored in secret manager + +1. Run a sync manually + + ``` + run --input=./groups/*.yaml \ + --credentials-file=gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json \ + --secret=kf-infra-gitops/autobot-at-kubeflow-oauth-admin-api + ``` -/home/jlewi/bin/gam/gam create group ${GROUP_EMAIL} who_can_join invited_can_join \ - name ${GROUP_NAME} description "${DESCRIPTION}" \ - allow_external_members true + * You will be directed through the OAuth2 Web Flow + * Be sure to login using the account **autobot@kubeflow.org** + + * The password and recovery codes for **autobot@kubeflow.org** are stored in secret manager + + * **secret** [projects/kf-infra-gitops/secrets/autobot-kubeflow-org-password](https://console.cloud.google.com/security/secret-manager/secret/autobot-kubeflow-org-password?project=kf-infra-gitops) + + +## Importing Settings + +The groups binary has an `import` command which can be used to update the YAML files with the latest configuration +in Google Groups + +* This is useful for intializing the configs for any Groups not currently controlled via GitOps + +``` +groups import \ + --domain=kubeflow.org \ + --output=./google_groups/groups \ + --credentials-file=gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json ``` -## Setting Up GAM to run `sync_groups.sh` +## References -1. You need a `xxxx@kubeflow.org` email address and you must be an admin in kubeflow.org gsuite. Ask an existing admin to invite you and give you permissions. -1. Follow instructions in https://github.com/jay0lee/GAM/wiki to set up the GAM CLI tool. -1. You can now run `sync_groups.sh`. +* https://developers.google.com/admin-sdk/directory/v1/quickstart/go \ No newline at end of file diff --git a/google_groups/calendar-admins.members.txt b/google_groups/calendar-admins.members.txt deleted file mode 100644 index 1536ae7d382..00000000000 --- a/google_groups/calendar-admins.members.txt +++ /dev/null @@ -1,9 +0,0 @@ - -gongyuan@google.com -jamesjwu@google.com -jtf.github@gmail.com -kschriek@gmail.com -nicholas.a.abad@gmail.com -renming@google.com -yliu989@bloomberg.net - diff --git a/google_groups/ci-team.members.txt b/google_groups/ci-team.members.txt deleted file mode 100644 index a28c5d7b4e2..00000000000 --- a/google_groups/ci-team.members.txt +++ /dev/null @@ -1,9 +0,0 @@ -andrey.velichkevich@gmail.com -dsun20@bloomberg.net -google-team@kubeflow.org -gongyuan@google.com -hejinchi@cn.ibm.com -hnalla@redhat.com -scottleehello@gmail.com -seedjeffwan@gmail.com -yangpa@google.com diff --git a/google_groups/ci-viewer.members.txt b/google_groups/ci-viewer.members.txt deleted file mode 100644 index 7faa62b6631..00000000000 --- a/google_groups/ci-viewer.members.txt +++ /dev/null @@ -1,14 +0,0 @@ -abolfazl.shahbazi@intel.com -adselvar@cisco.com -cc@seldon.io -dsun20@bloomberg.net -gaoce@caicloud.io -hejinchi@cn.ibm.com -holden.karau@gmail.com -icoffey@vmware.com -ifilonenko@bloomberg.net -iman.tabrizian@gmail.com -nrchakradhar379@gmail.com -redhat-team@kubeflow.org -subodh.pushkar@gmail.com -yliu989@bloomberg.net diff --git a/google_groups/cmd/main.go b/google_groups/cmd/main.go new file mode 100644 index 00000000000..dda72a322e3 --- /dev/null +++ b/google_groups/cmd/main.go @@ -0,0 +1,396 @@ +// Package main implements a tool to sync google groups +package main + +import ( + "context" + "fmt" + "github.com/go-logr/logr" + "github.com/go-logr/zapr" + "github.com/gogo/protobuf/proto" + "github.com/kubeflow/internal-acls/google_groups/pkg/api" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + "github.com/kubeflow/internal-acls/google_groups/pkg/gcp" + "github.com/kubeflow/internal-acls/google_groups/pkg/groups" + "github.com/kubeflow/internal-acls/google_groups/pkg/util" + "github.com/spf13/cobra" + "go.uber.org/zap" + "golang.org/x/oauth2" + admin "google.golang.org/api/admin/directory/v1" + settingsSdk "google.golang.org/api/groupssettings/v1" + "net/http" + "os" + "path/filepath" + "strings" + "time" +) + + +type RunOptions struct{ + Input string + CredentialsFile string + Secret string + Continuous bool + SyncPeriod time.Duration + ForcedResyncPreiod time.Duration +} + +type ImportOptions struct{ + Output string + Domain string +} + +var ( + opts = RunOptions{} + iOpts = ImportOptions{} + + rootCmd = &cobra.Command{} + + runCmd = &cobra.Command{ + Use: "run", + Short: "Run a sync", + Run: func(cmd *cobra.Command, args []string) { + run() + }, + } + + importCmd = &cobra.Command{ + Use: "import", + Short: "Import existing group definitions to YAML files.", + Run: func(cmd *cobra.Command, args []string) { + runImport() + }, + } + + upgradeCmd = &cobra.Command{ + Use: "upgrade", + Short: "Upgrade/Fix all groups. Bulk applies one or more transformations to all groups.", + Run: func(cmd *cobra.Command, args []string) { + upgrade() + }, + } + + log logr.Logger + + scopes = []string { + admin.AdminDirectoryGroupMemberScope, + admin.AdminDirectoryGroupScope, + admin.CloudPlatformScope, + settingsSdk.AppsGroupsSettingsScope, + } +) + +func init() { + rootCmd.AddCommand(runCmd) + rootCmd.AddCommand(upgradeCmd) + rootCmd.AddCommand(importCmd) + + upgradeCmd.Flags().StringVarP(&opts.Input, "input", "", "", "A glob to match config files to upgrade.") + upgradeCmd.Flags().StringVarP(&iOpts.Output, "output", "", "", "The directory to write the Group specs to") + upgradeCmd.MarkFlagRequired("input") + upgradeCmd.MarkFlagRequired("output") + + runCmd.Flags().StringVarP(&opts.Input, "input", "", "", "A glob to match config files to apply.") + + runCmd.Flags().StringVarP(&opts.CredentialsFile, "credentials-file", "", "", "JSON File containing OAuth2Client credentials as downloaded from APIConsole. Can be a GCS file.") + runCmd.Flags().StringVarP(&opts.Secret, "secret", "", "", "The name of a secret in GCP secret manager where the OAuth2 token should be cached. Should be in the form {project}/{secret}") + runCmd.Flags().BoolVarP(&opts.Continuous, "continuous", "", false, "If true runs forever; resyncing the groups whenever a change is detected") + runCmd.Flags().DurationVarP(&opts.SyncPeriod, "sync-period", "", 30 * time.Second, "How often to check for changes. This should be O(seconds)") + runCmd.Flags().DurationVarP(&opts.ForcedResyncPreiod, "forced-sync-period", "", 4 * time.Hour, "How often to resync even when no changes have been detected. Should be on the order of hours") + + importCmd.Flags().StringVarP(&opts.CredentialsFile, "credentials-file", "", "", "JSON File containing OAuth2Client credentials as downloaded from APIConsole.") + importCmd.Flags().StringVarP(&iOpts.Domain, "domain", "", "kubeflow.org", "The domain containing the Google groups to import") + importCmd.Flags().StringVarP(&iOpts.Output, "output", "", "", "The directory to write the results to") + importCmd.MarkFlagRequired("input") + importCmd.MarkFlagRequired("output") + importCmd.MarkFlagRequired("domain") +} + +func initLogger() { + // TODO(jlewi): Make the verbosity level configurable. + + // Start with a production logger config. + config := zap.NewProductionConfig() + + // TODO(jlewi): In development mode we should use the console encoder as opposed to json formatted logs. + + // Increment the logging level. + // TODO(jlewi): Make this a flag. + config.Level = zap.NewAtomicLevelAt(zap.DebugLevel) + + zapLog, err := config.Build() + if err != nil { + panic(fmt.Sprintf("Could not create zap instance (%v)?", err)) + } + log = zapr.NewLogger(zapLog) + + zap.ReplaceGlobals(zapLog) +} + +func getWebFlowLocal() *gcp.CachedCredentialHelper { + webFlow, err := gcp.NewWebFlowHelper(opts.CredentialsFile, scopes) + + if err != nil { + log.Error(err, "Failed to create a WebFlowHelper credential helper") + return nil + } + + home, err := os.UserHomeDir() + + if err != nil { + log.Error(err,"Could not get home directory") + return nil + } + + cacheFile := filepath.Join(home, ".cache", "kubeflow", "groups.sync.token") + h := &gcp.CachedCredentialHelper { + CredentialHelper: webFlow, + TokenCache: &gcp.FileTokenCache{ + CacheFile: cacheFile, + Log: log, + }, + Log: log, + } + + return h +} + +func getWebFlowSecretManager() *gcp.CachedCredentialHelper { + webFlow, err := gcp.NewWebFlowHelper(opts.CredentialsFile, scopes) + + if err != nil { + log.Error(err, "Failed to create a WebFlowHelper credential helper") + return nil + } + + pieces := strings.Split(opts.Secret, "/") + + if len(pieces) != 2 { + log.Error(fmt.Errorf("Secret %v not in form {project}/{secret}", opts.Secret), "Incorrectly specified secret", "secret", opts.Secret) + return nil + } + + cache, err := gcp.NewSecretCache(pieces[0], pieces[1], "latest") + + if err != nil { + log.Error(err, "Could not create cache for secret manager") + return nil + } + + cache.Log = log + + h := &gcp.CachedCredentialHelper { + CredentialHelper: webFlow, + TokenCache: cache, + Log: log, + } + + return h +} + +// getAdminClient initializes an admin client using a local credential cahce +func getAdminClient(h gcp.CredentialHelper) *http.Client{ + ctx := context.Background() + ts, err := h.GetTokenSource(ctx) + + if err != nil { + log.Error(err, "Failed to obtain token source") + return nil + } + + client := oauth2.NewClient(ctx, ts) + return client +} + +func run() { + initLogger() + + var credsHelper gcp.CredentialHelper + + if opts.Secret != "" { + log.Info("Getting OAuth2 credential via webflow and secret manager") + credsHelper = getWebFlowSecretManager() + } else { + log.Info("Getting OAuth2 credential via webflow and local cache") + credsHelper = getWebFlowLocal() + } + + if credsHelper == nil { + return + } + + client := getAdminClient(credsHelper) + + if client == nil { + return + } + + s := &groups.GroupSyncer{ + Client: client, + Log: log, + } + + + runSync := func () error { + defs := api.ReadGroups(opts.Input) + + if len(defs) == 0 { + log.Info("No groups matched glob", "glob", opts.Input) + return nil + } + + err := s.Sync(defs) + + if err != nil { + log.Error(err, "Failed to sync") + } + + return err + } + + lastHash := "" + + // Set the resync time in the past to force a resync immediately + nextResyncTime := time.Now().Add(-10 *time.Minute) + + for ;; { + // Get the current content hash so we can see if its changed. + log.Info("Reading glob", "directory", opts.Input) + matches, err := filepath.Glob(opts.Input) + if err != nil { + log.Error(err, "Error matching glob path", "glob", opts.Input) + return + } + + log.Info("Found files", "files", matches) + + hashBytes, err := util.ContentHash(matches) + + if err != nil { + log.Error(err, "Could not hash the file contents") + return + } + + newHash := string(hashBytes) + + if newHash != lastHash || time.Now().After(nextResyncTime) { + log.Info("Sync needed", "lastHash", lastHash, "newHash", newHash, "nextResyncTime", nextResyncTime) + err := runSync() + + if err == nil { + // Only update the hash if the sync succeeded otherwise we want to try again. + // ToDO(jlewi): Should we do exponential backoff in the event of errors. + lastHash = newHash + nextResyncTime = time.Now().Add(opts.ForcedResyncPreiod) + + log.Info("Updated content hash and resync time", "lasthash", lastHash, "nextResyncTime", nextResyncTime) + } + } else { + log.Info("No sync needed", "lastHash", lastHash, "newHash", newHash, "nextResyncTime", nextResyncTime) + } + + if !opts.Continuous { + return + } + + time.Sleep(opts.SyncPeriod) + } +} + +func runImport() { + initLogger() + log.Info("Getting OAuth2 credential via webflow and local cache") + credsHelper := getWebFlowLocal() + + if credsHelper == nil { + return + } + + client := getAdminClient(credsHelper) + + if client == nil { + return + } + + s := &groups.GroupImporter{ + Client: client, + Log: log, + } + + groups, err := s.Import(iOpts.Domain) + + if err != nil { + log.Error(err, "Failed to import group specs") + return + } + + // This is a list of groups that are already in GitHub. + // We don't want to import members for groups that aren't already in GitHub + // because don't want to put emails into GitHub without people's consent. + // So they should be the ones to open the PR adding themselves. + // This should go away once we've completely migrated to using GitOps. + groupsToImportMembersFor := map[string]bool { + "calendar-admins@kubeflow.org": true, + "ci-team@kubeflow.org": true, + "ci-viewer@kubeflow.org": true, + "code-search-team@kubeflow.org": true, + "community-meeting-hosts@kubeflow.org":true, + "devrel-team@kubeflow.org": true, + "devstats@kubeflow.org": true, + "drive-content-managers@kubeflow.org": true, + "example-maintainers@kubeflow.org": true, + "feast-team@kubeflow.org": true, + "github-team@kubeflow.org": true, + "google-codelab-projects-owners@kubeflow.org": true, + "kf-demo-owners@kubeflow.org": true, + "kf-kcc-admins@kubeflow.org": true, + "release-team@kubeflow.org": true, + } + + for _, g := range groups { + if _, ok := groupsToImportMembersFor[g.Spec.Email]; !ok { + log.Info("Removing members from group not in hardcoded allow list", "group", g.Spec.Email) + g.Spec.Members = []v1alpha1.Member{} + + log.Info("Disabling autosync", "group", g.Spec.Email) + g.Spec.AutoSync = proto.Bool(false) + } + } + + err = api.WriteGroups(groups, iOpts.Output) + + if err != nil { + log.Error(err, "Error writing groups") + } +} + +func upgrade() { + grps := api.ReadGroups(opts.Input) + + if len(grps) == 0 { + log.Info("No groups matched glob", "glob", opts.Input) + return + } + + requiredUsers := []*v1alpha1.Member{} + removeUsers := map[string]bool{ + "kf-autobot@kf-infra-gitops.iam.gserviceaccount.com": true, + } + + err := api.Upgrade(grps, requiredUsers, removeUsers) + + if err != nil { + log.Error(err, "Failed to upgrade specs") + return + } + + err = api.WriteGroups(grps, iOpts.Output) + + if err != nil { + log.Error(err, "Failed to write specs", "output", iOpts.Output) + return + } +} + +func main() { + rootCmd.Execute() +} diff --git a/google_groups/code-search-team.members.txt b/google_groups/code-search-team.members.txt deleted file mode 100644 index 9f380c77375..00000000000 --- a/google_groups/code-search-team.members.txt +++ /dev/null @@ -1,4 +0,0 @@ -google-team@kubeflow.org -clarae@google.com -sanyam@nyu.edu -yangpa@google.com \ No newline at end of file diff --git a/google_groups/community-meeting-hosts.members.txt b/google_groups/community-meeting-hosts.members.txt deleted file mode 100644 index f24c2e8a2db..00000000000 --- a/google_groups/community-meeting-hosts.members.txt +++ /dev/null @@ -1,2 +0,0 @@ -j.007ba7@gmail.com -mathew.wicks@gmail.com \ No newline at end of file diff --git a/google_groups/create_group.sh b/google_groups/create_group.sh deleted file mode 100755 index 74428c20a6e..00000000000 --- a/google_groups/create_group.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# Helper script to create a group -set -xe - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - -parseArgs() { - # Parse all command line options - while [[ $# -gt 0 ]]; do - # Parameters should be of the form - # --{name}=${value} - echo parsing "$1" - if [[ $1 =~ ^--(.*)=(.*)$ ]]; then - name=${BASH_REMATCH[1]} - value=${BASH_REMATCH[2]} - - eval ${name}="${value}" - elif [[ $1 =~ ^--(.*)$ ]]; then - name=${BASH_REMATCH[1]} - value=true - eval ${name}="${value}" - else - echo "Argument $1 did not match the pattern --{name}={value} or --{name}" - fi - shift - done -} - -usage() { - echo "Usage: checkout_repos --group= --description=" -} - -main() { - - cd "${DIR}" - - # List of required parameters - names=(group description) - - missingParam=false - for i in ${names[@]}; do - if [ -z ${!i} ]; then - echo "--${i} not set" - missingParam=true - fi - done - - if ${missingParam}; then - usage - exit 1 - fi - - GROUP_EMAIL=${group}@kubeflow.org - - if [ ! -f ${group}.members.txt ]; then - touch ${group}.members.txt - fi - - gam create group ${GROUP_EMAIL} who_can_join invited_can_join \ - name ${group} description "${description}" \ - allow_external_members true - -} - -parseArgs $* -main diff --git a/google_groups/devrel-team.members.txt b/google_groups/devrel-team.members.txt deleted file mode 100644 index dbe08d70410..00000000000 --- a/google_groups/devrel-team.members.txt +++ /dev/null @@ -1,32 +0,0 @@ -1sanyamkapoor@gmail.com -abcdefgs0324@gmail.com -amyu@google.com -cc@seldon.io -chasm@google.com -davidg@nvidia.com -elikatsis@arrikto.com -erichards@nvidia.com -ewj@google.com -github-team@kubeflow.org -hanneshapke@gmail.com -hseltmann@nvidia.com -inc007@gmail.com -ioannis@arrikto.com -jlewi.dataflow@gmail.com -jlewi@kubeflow.org -kam.d.kasravi@intel.com -kimwnasptd@arrikto.com -kunming@google.com -lunkai@google.com -mdemoret@nvidia.com -pmackinn@redhat.com -puneith@google.com -ricliu@google.com -rolson@nvidia.com -sanche@google.com -sanyamkapoor@google.com -thealamkin@google.com -vkoukis@arrikto.com -wibuch@microsoft.com -yanniszark@arrikto.com -yelsayed@google.com diff --git a/google_groups/devstats.members.txt b/google_groups/devstats.members.txt deleted file mode 100644 index d5c40192bda..00000000000 --- a/google_groups/devstats.members.txt +++ /dev/null @@ -1,2 +0,0 @@ -johnugeo@cisco.com -johnugeorge109@gmail.com \ No newline at end of file diff --git a/google_groups/drive-content-managers.members.txt b/google_groups/drive-content-managers.members.txt deleted file mode 100644 index f4ce5293d8b..00000000000 --- a/google_groups/drive-content-managers.members.txt +++ /dev/null @@ -1,23 +0,0 @@ -abhi.gupta@gmail.com -abhishek@google.com -campoa@kubeflow.org -campoa@google.com -chasm@kubeflow.org -ewj@kubeflow.org -j.007ba7@gmail.com -jessiezhu@google.com -jessie@kubeflow.org -jlewi@google.com -jlewi@kubeflow.org -joe@liedt.ke -karl@kubeflow.org -kam.d.kasravi@intel.com -kweinmeister@google.com -mathew.wicks@gmail.com -nju.wzh@gmail.com -qkmqwe@gmail.com -richards.liu@gmail.com -sarahmaddoxmail@gmail.com -sarahmaddox@google.com -sun428@gmail.com -thea@kubeflow.org diff --git a/google_groups/example-maintainers.members.txt b/google_groups/example-maintainers.members.txt deleted file mode 100644 index fcd8376c0a1..00000000000 --- a/google_groups/example-maintainers.members.txt +++ /dev/null @@ -1,3 +0,0 @@ -chasm@google.com -hejinchi@cn.ibm.com -jinchihe@gmail.com diff --git a/google_groups/feast-team.members.txt b/google_groups/feast-team.members.txt deleted file mode 100644 index c188be59430..00000000000 --- a/google_groups/feast-team.members.txt +++ /dev/null @@ -1,3 +0,0 @@ -dsp@go-jek.com -tsell@google.com -willem.p@go-jek.com diff --git a/google_groups/github-team.members.txt b/google_groups/github-team.members.txt deleted file mode 100644 index 03cef027311..00000000000 --- a/google_groups/github-team.members.txt +++ /dev/null @@ -1,8 +0,0 @@ -bathompso@github.com -hamel.husain@gmail.com -hamelsmu@github.com -hohsiangwu@github.com -hohsiangwu@gmail.com -inc007@gmail.com -rand@github.com -wingr@github.com diff --git a/google_groups/go.mod b/google_groups/go.mod new file mode 100644 index 00000000000..4685e19a40a --- /dev/null +++ b/google_groups/go.mod @@ -0,0 +1,25 @@ +module github.com/kubeflow/internal-acls/google_groups + +go 1.13 + +require ( + cloud.google.com/go v0.70.0 + cloud.google.com/go/storage v1.10.0 + github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 + github.com/ghodss/yaml v1.0.0 + github.com/go-logr/logr v0.2.1 + github.com/go-logr/zapr v0.2.0 + github.com/gogo/protobuf v1.3.1 + github.com/google/go-cmp v0.5.2 + github.com/google/martian v2.1.0+incompatible + github.com/pkg/errors v0.9.1 + github.com/sirupsen/logrus v1.2.0 + github.com/spf13/cobra v1.1.1 + go.uber.org/zap v1.16.0 + golang.org/x/net v0.0.0-20201010224723-4f7140c49acb + golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 + google.golang.org/api v0.33.0 + google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 + google.golang.org/grpc v1.32.0 + k8s.io/apimachinery v0.19.3 +) diff --git a/google_groups/go.sum b/google_groups/go.sum new file mode 100644 index 00000000000..e73760b68e1 --- /dev/null +++ b/google_groups/go.sum @@ -0,0 +1,657 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.70.0 h1:ujhG1RejZYi+HYfJNlgBh3j/bVKD8DewM7AkJ5UPyBc= +cloud.google.com/go v0.70.0/go.mod h1:/UTKYRQTWjVnSe7nGvoSzxEFUELzSI/yAYd0JQT6cRo= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 h1:/P9/RL0xgWE+ehnCUUN5h3RpG3dmoMCOONO1CCvq23Y= +github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013/go.mod h1:pccXHIvs3TV/TUqSNyEvF99sxjX2r4FFRIyw6TZY9+w= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/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/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/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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= +github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +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 h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201009210932-67992a1a5a35/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +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 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +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-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-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/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc h1:NCy3Ohtk6Iny5V/reW2Ktypo4zIpWBdRJ1uFMjBxdg8= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201017001424-6003fad69a88 h1:ZB1XYzdDo7c/O48jzjMkvIjnC120Z9/CwgDWhePjQdQ= +golang.org/x/tools v0.0.0-20201017001424-6003fad69a88/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.33.0 h1:+gL0XvACeMIvpwLZ5rQZzLn5cwOsgg8dIcfJ2SYfBVw= +google.golang.org/api v0.33.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= +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-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 h1:bFFRpT+e8JJVY7lMMfvezL1ZIwqiwmPl2bsE2yx4HqM= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +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 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc= +k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/google_groups/google-codelab-projects-owners.members.txt b/google_groups/google-codelab-projects-owners.members.txt deleted file mode 100644 index b7c931dc1b9..00000000000 --- a/google_groups/google-codelab-projects-owners.members.txt +++ /dev/null @@ -1,2 +0,0 @@ -google-team@kubeflow.org -codelab-admin-user@kf-codelab-admin.iam.gserviceaccount.com \ No newline at end of file diff --git a/google_groups/google-kubeflow-admins.members.txt b/google_groups/google-kubeflow-admins.members.txt deleted file mode 100644 index 2cd26be30af..00000000000 --- a/google_groups/google-kubeflow-admins.members.txt +++ /dev/null @@ -1,6 +0,0 @@ -chesu@google.com -gongyuan@google.com -jamesjwu@google.com -jlewi@google.com -ramachandrank@google.com -renming@google.com diff --git a/google_groups/google-team.members.txt b/google_groups/google-team.members.txt deleted file mode 100644 index da2785bf510..00000000000 --- a/google_groups/google-team.members.txt +++ /dev/null @@ -1,20 +0,0 @@ -abhishek@google.com -apverma@google.com -cartick@google.com -chesu@google.com -ewj@google.com -gabrielwen@google.com -gongyuan@google.com -jlewi@google.com -kunming@google.com -kwasinti@google.com -lunkai@google.com -mrick@google.com -prodonjs@google.com -quanlin@google.com -ricliu@google.com -sanyamkapoor@google.com -thealamkin@google.com -yxshi@google.com -zhenghui@google.com -zahraabbasi@google.com diff --git a/google_groups/groups/blog.yaml b/google_groups/groups/blog.yaml new file mode 100644 index 00000000000..046f86a1ab5 --- /dev/null +++ b/google_groups/groups/blog.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: blog@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: Submissions to the Kubeflow blog + email: blog@kubeflow.org + name: Blog submissions + whoCanJoin: ANYONE_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/calendar-admins.yaml b/google_groups/groups/calendar-admins.yaml new file mode 100644 index 00000000000..b495594a79a --- /dev/null +++ b/google_groups/groups/calendar-admins.yaml @@ -0,0 +1,25 @@ +metadata: + creationTimestamp: null + name: calendar-admins@kubeflow.org +spec: + allowExternalMembers: "true" + description: Admins for the Kubeflow calendar. + email: calendar-admins@kubeflow.org + members: + - email: gongyuan@google.com + role: MEMBER + - email: jamesjwu@google.com + role: OWNER + - email: jtf.github@gmail.com + role: MEMBER + - email: kschriek@gmail.com + role: MEMBER + - email: nicholas.a.abad@gmail.com + role: MEMBER + - email: renming@google.com + role: MEMBER + - email: yliu989@bloomberg.net + role: MEMBER + name: calendar-admins + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/ci-bot-owners.yaml b/google_groups/groups/ci-bot-owners.yaml new file mode 100644 index 00000000000..80d09c1860c --- /dev/null +++ b/google_groups/groups/ci-bot-owners.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: ci-bot-owners@kubeflow.org +spec: + allowExternalMembers: "false" + autoSync: false + description: The group that owns our ci bots. + email: ci-bot-owners@kubeflow.org + name: ci-bot-owners + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/ci-team.yaml b/google_groups/groups/ci-team.yaml new file mode 100644 index 00000000000..f007636e199 --- /dev/null +++ b/google_groups/groups/ci-team.yaml @@ -0,0 +1,27 @@ +metadata: + creationTimestamp: null + name: ci-team@kubeflow.org +spec: + allowExternalMembers: "false" + description: The team working on continuous integration. + email: ci-team@kubeflow.org + members: + - email: andrey.velichkevich@gmail.com + role: MEMBER + - email: dsun20@bloomberg.net + role: MEMBER + - email: gongyuan@google.com + role: MEMBER + - email: hejinchi@cn.ibm.com + role: MEMBER + - email: hnalla@redhat.com + role: MEMBER + - email: scottleehello@gmail.com + role: MEMBER + - email: seedjeffwan@gmail.com + role: MEMBER + - email: yangpa@google.com + role: MEMBER + name: ci-team + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/groups/ci-viewer.yaml b/google_groups/groups/ci-viewer.yaml new file mode 100644 index 00000000000..07750a1680a --- /dev/null +++ b/google_groups/groups/ci-viewer.yaml @@ -0,0 +1,35 @@ +metadata: + creationTimestamp: null + name: ci-viewer@kubeflow.org +spec: + allowExternalMembers: "false" + description: Users with viewer access to kubeflow-ci projects + email: ci-viewer@kubeflow.org + members: + - email: abolfazl.shahbazi@intel.com + role: MEMBER + - email: adselvar@cisco.com + role: MEMBER + - email: cc@seldon.io + role: MEMBER + - email: dsun20@bloomberg.net + role: MEMBER + - email: gaoce@caicloud.io + role: MEMBER + - email: hejinchi@cn.ibm.com + role: MEMBER + - email: holden.karau@gmail.com + role: MEMBER + - email: icoffey@vmware.com + role: MEMBER + - email: ifilonenko@bloomberg.net + role: MEMBER + - email: iman.tabrizian@gmail.com + role: MEMBER + - email: nrchakradhar379@gmail.com + role: MEMBER + - email: yliu989@bloomberg.net + role: MEMBER + name: ci-viewer + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/groups/code-search-team.yaml b/google_groups/groups/code-search-team.yaml new file mode 100644 index 00000000000..118392eb88c --- /dev/null +++ b/google_groups/groups/code-search-team.yaml @@ -0,0 +1,15 @@ +metadata: + creationTimestamp: null + name: code-search-team@kubeflow.org +spec: + allowExternalMembers: "true" + description: ModelDB contributors contributing to Kubeflow. + email: code-search-team@kubeflow.org + members: + - email: clarae@google.com + role: MEMBER + - email: yangpa@google.com + role: MEMBER + name: code-search-team + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/community-meeting-hosts.yaml b/google_groups/groups/community-meeting-hosts.yaml new file mode 100644 index 00000000000..2b81237b0cc --- /dev/null +++ b/google_groups/groups/community-meeting-hosts.yaml @@ -0,0 +1,23 @@ +metadata: + creationTimestamp: null + name: community-meeting-hosts@kubeflow.org +spec: + allowExternalMembers: "true" + description: Hosts for the weekly Kubeflow community meeting + email: community-meeting-hosts@kubeflow.org + members: + - email: ewj@google.com + role: OWNER + - email: j.007ba7@gmail.com + role: MEMBER + - email: jlewi@google.com + role: OWNER + - email: mathew.wicks@gmail.com + role: MEMBER + - email: michellecasbon@google.com + role: MANAGER + - email: thealamkin@google.com + role: OWNER + name: Community Meeting Hosts + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/devrel-team.yaml b/google_groups/groups/devrel-team.yaml new file mode 100644 index 00000000000..ad1f8ebe7b8 --- /dev/null +++ b/google_groups/groups/devrel-team.yaml @@ -0,0 +1,76 @@ +metadata: + creationTimestamp: null + name: devrel-team@kubeflow.org +spec: + allowExternalMembers: "false" + description: List of contributors who function in a DevRel capacity. Used to grant + access to various resources. + email: devrel-team@kubeflow.org + members: + - email: 1sanyamkapoor@gmail.com + role: MEMBER + - email: abcdefgs0324@gmail.com + role: MEMBER + - email: amyu@google.com + role: MEMBER + - email: cc@seldon.io + role: MEMBER + - email: chasm@google.com + role: MEMBER + - email: davidg@nvidia.com + role: MEMBER + - email: elikatsis@arrikto.com + role: MEMBER + - email: erichards@nvidia.com + role: MEMBER + - email: ewj@google.com + role: MEMBER + - email: github-team@kubeflow.org + role: MEMBER + - email: hannes.hapke@gmail.com + role: MEMBER + - email: hseltmann@nvidia.com + role: MEMBER + - email: inc007@gmail.com + role: MEMBER + - email: ioannis@arrikto.com + role: MEMBER + - email: jlewi.dataflow@gmail.com + role: MEMBER + - email: jlewi@kubeflow.org + role: MEMBER + - email: kam.d.kasravi@intel.com + role: MEMBER + - email: kimwnasptd@arrikto.com + role: MEMBER + - email: kunming@google.com + role: MEMBER + - email: lunkai@google.com + role: MEMBER + - email: mdemoret@nvidia.com + role: MEMBER + - email: pmackinn@redhat.com + role: MEMBER + - email: puneith@google.com + role: MEMBER + - email: ricliu@google.com + role: MEMBER + - email: rolson@nvidia.com + role: MEMBER + - email: sanche@google.com + role: MEMBER + - email: sanyamkapoor@google.com + role: MEMBER + - email: thealamkin@google.com + role: MEMBER + - email: vkoukis@arrikto.com + role: MEMBER + - email: wibuch@microsoft.com + role: MEMBER + - email: yanniszark@arrikto.com + role: MEMBER + - email: yelsayed@google.com + role: MEMBER + name: Developer relations team + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/groups/devstats.yaml b/google_groups/groups/devstats.yaml new file mode 100644 index 00000000000..f0dc1e86881 --- /dev/null +++ b/google_groups/groups/devstats.yaml @@ -0,0 +1,15 @@ +metadata: + creationTimestamp: null + name: devstats@kubeflow.org +spec: + allowExternalMembers: "true" + description: Folks with edit rights to devstats.kubeflow.org. + email: devstats@kubeflow.org + members: + - email: johnugeo@cisco.com + role: MEMBER + - email: johnugeorge109@gmail.com + role: MEMBER + name: devstats + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/drive-content-managers.yaml b/google_groups/groups/drive-content-managers.yaml new file mode 100644 index 00000000000..d4b890af305 --- /dev/null +++ b/google_groups/groups/drive-content-managers.yaml @@ -0,0 +1,57 @@ +metadata: + creationTimestamp: null + name: drive-content-managers@kubeflow.org +spec: + allowExternalMembers: "true" + description: Content managers for kubeflow shared drives. + email: drive-content-managers@kubeflow.org + members: + - email: abhi.gupta@gmail.com + role: MEMBER + - email: abhishek@google.com + role: MEMBER + - email: campoa@google.com + role: MEMBER + - email: campoa@kubeflow.org + role: MEMBER + - email: chasm@kubeflow.org + role: MEMBER + - email: ewj@kubeflow.org + role: MEMBER + - email: j.007ba7@gmail.com + role: MEMBER + - email: jessie@kubeflow.org + role: MEMBER + - email: jessiezhu@google.com + role: MEMBER + - email: jlewi@google.com + role: MEMBER + - email: jlewi@kubeflow.org + role: MEMBER + - email: joe@liedt.ke + role: MEMBER + - email: kam.d.kasravi@intel.com + role: MEMBER + - email: karl@kubeflow.org + role: MEMBER + - email: kweinmeister@google.com + role: MEMBER + - email: mathew.wicks@gmail.com + role: MEMBER + - email: nju.wzh@gmail.com + role: MEMBER + - email: qkmqwe@gmail.com + role: MEMBER + - email: richards.liu@gmail.com + role: MEMBER + - email: sarahmaddox@google.com + role: MEMBER + - email: sarahmaddoxmail@gmail.com + role: MEMBER + - email: sun428@gmail.com + role: MEMBER + - email: thea@kubeflow.org + role: MEMBER + name: drive-content-managers + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/eventbrite.yaml b/google_groups/groups/eventbrite.yaml new file mode 100644 index 00000000000..dff6d1344fb --- /dev/null +++ b/google_groups/groups/eventbrite.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: eventbrite@kubeflow.org +spec: + allowExternalMembers: "false" + autoSync: false + description: Group to administrate our Eventbrite account + email: eventbrite@kubeflow.org + name: Eventbrite Admins + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/events.yaml b/google_groups/groups/events.yaml new file mode 100644 index 00000000000..ae5a92ef8e6 --- /dev/null +++ b/google_groups/groups/events.yaml @@ -0,0 +1,10 @@ +metadata: + creationTimestamp: null + name: events@kubeflow.org +spec: + allowExternalMembers: "false" + autoSync: false + email: events@kubeflow.org + name: Kubeflow Community Events Organizers + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/example-maintainers.yaml b/google_groups/groups/example-maintainers.yaml new file mode 100644 index 00000000000..9e8c5c8ef24 --- /dev/null +++ b/google_groups/groups/example-maintainers.yaml @@ -0,0 +1,17 @@ +metadata: + creationTimestamp: null + name: example-maintainers@kubeflow.org +spec: + allowExternalMembers: "true" + description: People + email: example-maintainers@kubeflow.org + members: + - email: chasm@google.com + role: MEMBER + - email: hejinchi@cn.ibm.com + role: MEMBER + - email: jinchihe@gmail.com + role: MEMBER + name: example-maintainers + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/feast-team.yaml b/google_groups/groups/feast-team.yaml new file mode 100644 index 00000000000..4af5d636c29 --- /dev/null +++ b/google_groups/groups/feast-team.yaml @@ -0,0 +1,17 @@ +metadata: + creationTimestamp: null + name: feast-team@kubeflow.org +spec: + allowExternalMembers: "true" + description: People contributing to feast; the feature store. + email: feast-team@kubeflow.org + members: + - email: dsp@go-jek.com + role: MEMBER + - email: tsell@google.com + role: MEMBER + - email: willem.p@go-jek.com + role: MEMBER + name: feast-team + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/github-team.yaml b/google_groups/groups/github-team.yaml new file mode 100644 index 00000000000..6052142bb76 --- /dev/null +++ b/google_groups/groups/github-team.yaml @@ -0,0 +1,25 @@ +metadata: + creationTimestamp: null + name: github-team@kubeflow.org +spec: + allowExternalMembers: "false" + description: Folks at GitHub that are helping out. + email: github-team@kubeflow.org + members: + - email: bathompso@github.com + role: MEMBER + - email: hamel.husain@gmail.com + role: MEMBER + - email: hamelsmu@github.com + role: MEMBER + - email: hohsiangwu@gmail.com + role: MEMBER + - email: inc007@gmail.com + role: MEMBER + - email: rand@github.com + role: MEMBER + - email: wingr@github.com + role: MEMBER + name: github-team + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/groups/google-codelab-projects-owners.yaml b/google_groups/groups/google-codelab-projects-owners.yaml new file mode 100644 index 00000000000..635e4e62be4 --- /dev/null +++ b/google_groups/groups/google-codelab-projects-owners.yaml @@ -0,0 +1,14 @@ +metadata: + creationTimestamp: null + name: google-codelab-projects-owners@kubeflow.org +spec: + allowExternalMembers: "true" + description: Group of accounts to grant as owners to temporary projects created + for codelabs so we can do bulk operations + email: google-codelab-projects-owners@kubeflow.org + members: + - email: codelab-admin-user@kf-codelab-admin.iam.gserviceaccount.com + role: MEMBER + name: google-codelab-projects-owners + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/kf-demo-owners.yaml b/google_groups/groups/kf-demo-owners.yaml new file mode 100644 index 00000000000..a61385a2339 --- /dev/null +++ b/google_groups/groups/kf-demo-owners.yaml @@ -0,0 +1,22 @@ +metadata: + creationTimestamp: null + name: kf-demo-owners@kubeflow.org +spec: + allowExternalMembers: "true" + description: Owners of project kf-demo-owner that is the project that owns/manages + all the demo projects. + email: kf-demo-owners@kubeflow.org + members: + - email: aronchick@google.com + role: MEMBER + - email: chasm@google.com + role: MEMBER + - email: jlewi@google.com + role: MEMBER + - email: kunming@google.com + role: MEMBER + - email: lunkai@google.com + role: MEMBER + name: kf-demo-owners + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/kf-kcc-admins.yaml b/google_groups/groups/kf-kcc-admins.yaml new file mode 100644 index 00000000000..b08f2000b3d --- /dev/null +++ b/google_groups/groups/kf-kcc-admins.yaml @@ -0,0 +1,25 @@ +metadata: + creationTimestamp: null + name: kf-kcc-admins@kubeflow.org +spec: + allowExternalMembers: "true" + description: Group of folks setting up administering kcc for kubeflow.org + email: kf-kcc-admins@kubeflow.org + members: + - email: andrey.velichkevich@gmail.com + role: MEMBER + - email: derekhh@snap.com + role: MEMBER + - email: dsun20@bloomberg.net + role: MEMBER + - email: hejinchi@cn.ibm.com + role: MEMBER + - email: scottleehello@gmail.com + role: MEMBER + - email: seedjeffwan@gmail.com + role: MEMBER + - email: yliu989@bloomberg.net + role: MEMBER + name: kf-kcc-admins + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/kubeflow-examples-gcr-writers.yaml b/google_groups/groups/kubeflow-examples-gcr-writers.yaml new file mode 100644 index 00000000000..990c87e3fab --- /dev/null +++ b/google_groups/groups/kubeflow-examples-gcr-writers.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: kubeflow-examples-gcr-writers@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: People who can write to the kubeflow-excamples GCR registry. + email: kubeflow-examples-gcr-writers@kubeflow.org + name: kubeflow-examples-gcr-writers + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/kubeflow-gsoc-admin.yaml b/google_groups/groups/kubeflow-gsoc-admin.yaml new file mode 100644 index 00000000000..a23b5e1bdb6 --- /dev/null +++ b/google_groups/groups/kubeflow-gsoc-admin.yaml @@ -0,0 +1,14 @@ +metadata: + creationTimestamp: null + name: kubeflow-gsoc-admin@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: Org administration for Kubeflow's participation in GSoC. Students and + mentors email this group to raise Kubeflow GSoC matters with org administrators. + Group members are Kubeflow org admins only. Messages are visible to sender, CCs, + and group members. + email: kubeflow-gsoc-admin@kubeflow.org + name: kubeflow-gsoc-admin + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/kubeflow-gsoc-mentors.yaml b/google_groups/groups/kubeflow-gsoc-mentors.yaml new file mode 100644 index 00000000000..8373d4c34ae --- /dev/null +++ b/google_groups/groups/kubeflow-gsoc-mentors.yaml @@ -0,0 +1,14 @@ +metadata: + creationTimestamp: null + name: kubeflow-gsoc-mentors@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: Mentors for Kubeflow GSoC projects. Students email this group to receive + feedback on project proposals. Mentors use this group to discuss Kubeflow GSoC + matters. Group members are Kubeflow GSoC mentors and org admins. Messages are + visible to sender, CCs, and group members. + email: kubeflow-gsoc-mentors@kubeflow.org + name: kubeflow-gsoc-mentors + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/release-team.yaml b/google_groups/groups/release-team.yaml new file mode 100644 index 00000000000..47d8d368e4a --- /dev/null +++ b/google_groups/groups/release-team.yaml @@ -0,0 +1,24 @@ +metadata: + creationTimestamp: null + name: release-team@kubeflow.org +spec: + allowExternalMembers: "false" + description: Folks in charge of kubeflow releases. This group is use to grant access to test + infrastructure. + email: release-team@kubeflow.org + members: + - email: abhishek@google.com + role: MEMBER + - email: andrey.velichkevich@gmail.com + role: MEMBER + - email: apverma@google.com + role: MEMBER + - email: jlewi@google.com + role: MEMBER + - email: terrytangyuan@gmail.com + role: MEMBER + - email: wibenton@redhat.com + role: OWNER + name: release-team + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/summit-2018.yaml b/google_groups/groups/summit-2018.yaml new file mode 100644 index 00000000000..e00dfb02113 --- /dev/null +++ b/google_groups/groups/summit-2018.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: summit-2018@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: For the organizers of the Kubeflow Contributor Summit 2018 + email: summit-2018@kubeflow.org + name: Contributor Summit Organizers + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/test-group.yaml b/google_groups/groups/test-group.yaml new file mode 100644 index 00000000000..850b8642b24 --- /dev/null +++ b/google_groups/groups/test-group.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: test-group@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: A group to test auto-syncing of google groups + email: test-group@kubeflow.org + name: test-group + whoCanJoin: INVITED_CAN_JOIN + whoCanPostMessage: ANYONE_CAN_POST diff --git a/google_groups/groups/tf-operator.yaml b/google_groups/groups/tf-operator.yaml new file mode 100644 index 00000000000..c8a34661910 --- /dev/null +++ b/google_groups/groups/tf-operator.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: tf-operator@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: Discussion and development around kubeflow/tf-operator + email: tf-operator@kubeflow.org + name: TF Operator + whoCanJoin: ANYONE_CAN_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/groups/web-team.yaml b/google_groups/groups/web-team.yaml new file mode 100644 index 00000000000..f19bada265d --- /dev/null +++ b/google_groups/groups/web-team.yaml @@ -0,0 +1,11 @@ +metadata: + creationTimestamp: null + name: web-team@kubeflow.org +spec: + allowExternalMembers: "true" + autoSync: false + description: Community members working on the web site + email: web-team@kubeflow.org + name: Web team + whoCanJoin: CAN_REQUEST_TO_JOIN + whoCanPostMessage: ALL_MEMBERS_CAN_POST diff --git a/google_groups/insight-fellowship.members.txt b/google_groups/insight-fellowship.members.txt deleted file mode 100644 index 05161d62d02..00000000000 --- a/google_groups/insight-fellowship.members.txt +++ /dev/null @@ -1,3 +0,0 @@ -emmanuel.ameisen@gmail.com -emmanuel@insightdatascience.com -jeremy@lewi.us \ No newline at end of file diff --git a/google_groups/kf-demo-owners.members.txt b/google_groups/kf-demo-owners.members.txt deleted file mode 100644 index fd5505e8024..00000000000 --- a/google_groups/kf-demo-owners.members.txt +++ /dev/null @@ -1,5 +0,0 @@ -aronchick@google.com -chasm@google.com -jlewi@google.com -kunming@google.com -lunkai@google.com diff --git a/google_groups/kf-kcc-admins.members.txt b/google_groups/kf-kcc-admins.members.txt deleted file mode 100644 index 3bad391cdd7..00000000000 --- a/google_groups/kf-kcc-admins.members.txt +++ /dev/null @@ -1,8 +0,0 @@ -andrey.velichkevich@gmail.com -derekhh@snap.com -dsun20@bloomberg.net -hejinchi@cn.ibm.com -google-kubeflow-admins@kubeflow.org -scottleehello@gmail.com -seedjeffwan@gmail.com -yliu989@bloomberg.net diff --git a/google_groups/kubeflow-examples-gcr-writers.members.txt b/google_groups/kubeflow-examples-gcr-writers.members.txt deleted file mode 100644 index e454c143a16..00000000000 --- a/google_groups/kubeflow-examples-gcr-writers.members.txt +++ /dev/null @@ -1 +0,0 @@ -yangpa@google.com \ No newline at end of file diff --git a/google_groups/latest_image.yaml b/google_groups/latest_image.yaml new file mode 100644 index 00000000000..7504f08d49e --- /dev/null +++ b/google_groups/latest_image.yaml @@ -0,0 +1,4 @@ +image: none +kf-infra-gitops: + groups: + image: gcr.io/kf-infra-gitops/groups-sync:f933775@sha256:ec4d1ea45b47ce34c14f6c023d40d562ff26db5ae874af6947a17a6199520ad6 diff --git a/google_groups/manifests/deployment.yaml b/google_groups/manifests/deployment.yaml new file mode 100644 index 00000000000..b67cfef2f21 --- /dev/null +++ b/google_groups/manifests/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: groups-sync + labels: + app: groups-sync +spec: + replicas: 1 + selector: + matchLabels: + app: groups-sync + template: + metadata: + labels: + app: groups-sync + spec: + containers: + - name: groups + image: groups + args: + - run + - --input=/data/internal-acls.git/google_groups/groups/*.yaml + - --continuous=true + - --credentials-file=gs://kf-infra-gitops_secrets/autobot-at-kubeflow_client_secret.json + - --secret=kf-infra-gitops/autobot-at-kubeflow-oauth-admin-api + volumeMounts: + - name: data + mountPath: /data + - name: git + image: k8s.gcr.io/git-sync:v3.1.6 + args: + - --repo=https://github.com/kubeflow/internal-acls.git + - --branch=master + - --root=/data + # In seconds + - --wait=30 + volumeMounts: + - name: data + mountPath: /data + serviceAccount: kf-autobot + volumes: + - name: data + emptyDir: {} diff --git a/google_groups/manifests/kustomization.yaml b/google_groups/manifests/kustomization.yaml new file mode 100644 index 00000000000..1ae200f87c7 --- /dev/null +++ b/google_groups/manifests/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kf-autobot +resources: +- deployment.yaml +images: +- digest: sha256:ec4d1ea45b47ce34c14f6c023d40d562ff26db5ae874af6947a17a6199520ad6 + name: groups + newName: gcr.io/kf-infra-gitops/groups-sync:f933775 diff --git a/google_groups/modeldb-team.members.txt b/google_groups/modeldb-team.members.txt deleted file mode 100644 index 7cea9034862..00000000000 --- a/google_groups/modeldb-team.members.txt +++ /dev/null @@ -1,2 +0,0 @@ -mvartak@csail.mit.edu -acshanth@gmail.com diff --git a/google_groups/pkg/api/upgrade.go b/google_groups/pkg/api/upgrade.go new file mode 100644 index 00000000000..6222f90eb74 --- /dev/null +++ b/google_groups/pkg/api/upgrade.go @@ -0,0 +1,66 @@ +package api + +import ( + "github.com/go-logr/zapr" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + "go.uber.org/zap" + "sort" +) + + +const ( + expectedSuffix = ".members.txt" +) + +// Upgrade all specs. addUsers a list of users to ensure are present in all groups +func Upgrade(groups []*v1alpha1.GoogleGroup, addUsers []*v1alpha1.Member, removeUsers map[string]bool) error { + log := zapr.NewLogger(zap.L()) + + initMissing := func() map[string]*v1alpha1.Member{ + r := map[string]*v1alpha1.Member {} + for _, a := range addUsers{ + r[a.Email] = a + } + return r + } + + for _, g := range groups { + missing := initMissing() + + toKeep := []v1alpha1.Member{} + for _, m := range g.Spec.Members { + if _, ok := removeUsers[m.Email]; ok { + log.Info("Removing member", "group" ,g.Spec.Email , "member", m.Email) + continue + } + + toKeep = append(toKeep, m) + + desired, ok := missing[m.Email] + + if !ok { + continue + } + + log.Info("Group already has member", "group",g.Spec.Email , "member", m.Email) + + m.Role = desired.Role + + delete(missing, m.Email) + } + + g.Spec.Members = toKeep + for _, m := range missing { + log.Info("Adding member to group", "group", g.Spec.Email, "member", m.Email) + + g.Spec.Members = append(g.Spec.Members, *m) + } + + // Sort the members + sort.Slice(g.Spec.Members[:], func(i, j int) bool { + return g.Spec.Members[i].Email < g.Spec.Members[j].Email + }) + } + + return nil +} diff --git a/google_groups/pkg/api/upgrade_test.go b/google_groups/pkg/api/upgrade_test.go new file mode 100644 index 00000000000..e1f237759d5 --- /dev/null +++ b/google_groups/pkg/api/upgrade_test.go @@ -0,0 +1,60 @@ +package api + +import ( + "github.com/google/go-cmp/cmp" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "testing" +) + +func TestUpgrade(t *testing.T) { + type testCase struct { + filename string + contents string + expected v1alpha1.GoogleGroup + } + + cases := []testCase { + { + filename: "calendar-admins.members.txt", + contents: ` + +abe@acme.com +joe@gmail.net + +`, + expected: v1alpha1.GoogleGroup{ + ObjectMeta: v1.ObjectMeta{ + Name: "calendar-admins@kubeflow.org", + }, + Spec: v1alpha1.GoogleGroupSpec{ + Members: []v1alpha1.Member{ + { + Principal: v1alpha1.Principal{ + User:"abe@acme.com", + }, + }, + { + Principal: v1alpha1.Principal{ + User:"joe@gmail.net", + }, + }, + }, + }, + }, + }, + } + + for _, c := range cases { + actual, err := ConvertTextToGroup(c.filename, c.contents) + + if err != nil { + t.Errorf("Failed to convert text %v", err) + continue + } + + if diff := cmp.Diff(c.expected, *actual); diff != "" { + t.Errorf("ConvertTextToGroup() mismatch (-want +got):\n%s", diff) + } + } +} diff --git a/google_groups/pkg/api/util.go b/google_groups/pkg/api/util.go new file mode 100644 index 00000000000..babf729a8c7 --- /dev/null +++ b/google_groups/pkg/api/util.go @@ -0,0 +1,98 @@ +package api + +import ( + "github.com/ghodss/yaml" + "github.com/go-logr/zapr" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + "go.uber.org/zap" + "io/ioutil" + "os" + "path/filepath" + "strings" +) + +// ReadGroups reads in all group specs from a directory +func ReadGroups(inputGlob string) ([]*v1alpha1.GoogleGroup) { + log := zapr.NewLogger(zap.L()) + results := []*v1alpha1.GoogleGroup{} + log.Info("Reading glob", "directory", inputGlob) + matches, err := filepath.Glob(inputGlob) + if err != nil { + log.Error(err, "Error matching glob path", "glob", inputGlob) + return results + } + + for _, f := range matches { + log.Info("Reading file", "input", f) + b, err := ioutil.ReadFile(f) + + if err != nil { + log.Error(err, "Error reading file.", "file", f) + continue + } + + g := &v1alpha1.GoogleGroup{} + err = yaml.Unmarshal(b, g) + + if err != nil { + log.Error(err, "Error parsing GoogleGroup from file.", "file", f) + continue + } + results = append(results, g) + } + + return results +} + +func ensureDirExists(dir string) error { + log := zapr.NewLogger(zap.L()) + _, err := os.Stat(dir) + + if err != nil { + if os.IsNotExist(err) { + log.Info("Create cache directory", "dir", dir) + err := os.MkdirAll(dir, 0770) + if err != nil { + return err + } + } else { + return err + } + } + return nil +} + +// WriterGroups serializes the groups as YAML to the specified directory +func WriteGroups(groups []*v1alpha1.GoogleGroup, output string) error { + log := zapr.NewLogger(zap.L()) + + err := ensureDirExists(output) + + if err != nil { + log.Error(err, "Could not ensure output directory exists", "output", output) + return err + } + + + for _, g := range groups { + gBytes, err := yaml.Marshal(g) + + if err != nil { + log.Error(err, "Error marshling group", "group", g) + continue + } + + fileName := strings.Split(g.Spec.Email, "@")[0] + yamlFile := filepath.Join(output, fileName+".yaml") + + err = ioutil.WriteFile(yamlFile, gBytes, 0644) + + if err != nil { + log.Error(err, "Error writing file", "target", yamlFile) + continue + } + + log.Info("Converted group file.", "output", yamlFile) + } + return nil +} \ No newline at end of file diff --git a/google_groups/pkg/api/v1alpha1/types.go b/google_groups/pkg/api/v1alpha1/types.go new file mode 100644 index 00000000000..39681cf6424 --- /dev/null +++ b/google_groups/pkg/api/v1alpha1/types.go @@ -0,0 +1,33 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// GoogleGroup defines a google group. +type GoogleGroup struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec GoogleGroupSpec `json:"spec,omitempty"` +} + +type GoogleGroupSpec struct { + // Whether to AutoSync the group + AutoSync *bool `json:"autoSync,omitempty"` + Email string `json:"email,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + // https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups#json + WhoCanPostMessage string `json:"whoCanPostMessage",omitempty` + WhoCanJoin string `json:"whoCanJoin",omitempty` + AllowExternalMembers string `json:"allowExternalMembers",omitempty` + Members []Member `json:"members,omitempty"` +} + +type Member struct { + // Principal is the identity of the member + Email string `json:"email,omitempty"` + + // Role of the member + // see https://developers.google.com/admin-sdk/directory/v1/reference/members/insert + Role string `json:"role,omitempty"` +} diff --git a/google_groups/pkg/gcp/credentials.go b/google_groups/pkg/gcp/credentials.go new file mode 100644 index 00000000000..f4cc6232e9b --- /dev/null +++ b/google_groups/pkg/gcp/credentials.go @@ -0,0 +1,210 @@ +// package gcp provides utilities for working with GCP +package gcp + +import ( + "cloud.google.com/go/storage" + "context" + "encoding/json" + "fmt" + "github.com/go-logr/logr" + "github.com/go-logr/zapr" + "github.com/kubeflow/internal-acls/google_groups/pkg/gcp/gcs" + "github.com/pkg/errors" + "go.uber.org/zap" + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" + "io/ioutil" + "os" + "path/filepath" + "strings" +) + +const ( + // CredentialDirPermMode unix permission max suitable for directory storing credentials + CredentialDirPermMode = 0700 +) + +// CredentialHelper defines an interface for getting tokens. +type CredentialHelper interface { + //GetTokenAndConfig() (*TokenAndConfig, error) + GetTokenSource(ctx context.Context)(oauth2.TokenSource ,error) + + // GetOAuthConfig returns the OAuth2 client configuration + GetOAuthConfig()(*oauth2.Config) +} + +// WebFlowHelper helps get credentials using the webflow. +type WebFlowHelper struct { + config *oauth2.Config + Log logr.Logger +} + +// NewWebFlowHelper constructs a new web flow helper. oAuthClientFile should be the path to a credentials.json +// downloaded from the API console. +func NewWebFlowHelper(oAuthClientFile string, scopes []string) (*WebFlowHelper, error) { + var fHelper gcs.FileHelper + + if strings.HasPrefix(oAuthClientFile, "gs://") { + ctx := context.Background() + client, err := storage.NewClient(ctx) + + if err != nil { + return nil, err + } + + fHelper = &gcs.GcsHelper { + Ctx: ctx, + Client: client, + } + } else { + fHelper = &gcs.LocalFileHelper{} + } + + reader, err := fHelper.NewReader(oAuthClientFile) + + if err != nil { + return nil, err + + } + b, err := ioutil.ReadAll(reader) + + if err != nil { + return nil, err + } + // If modifying these scopes, delete your previously saved token.json. + config, err := google.ConfigFromJSON(b, scopes...) + if err != nil { + return nil, errors.Wrapf(err, "Unable to parse client secret file to config") + } + return &WebFlowHelper{ + config: config, + Log: zapr.NewLogger(zap.L()), + }, nil +} + +func (h *WebFlowHelper) GetOAuthConfig() (*oauth2.Config) { + return h.config +} + +// GetTokenSource requests a token from the web, then returns the retrieved token. +func (h *WebFlowHelper) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) { + authURL := h.config.AuthCodeURL("state-token", oauth2.AccessTypeOffline) + + // TODO(jlewi): How to open it automatically? + fmt.Printf("Go to the following link in your browser then type the "+ + "authorization code: \n%v\n", authURL) + + var authCode string + if _, err := fmt.Scan(&authCode); err != nil { + return nil, errors.Wrapf(err, "Unable to read authorization code") + } + + tok, err := h.config.Exchange(context.TODO(), authCode) + if err != nil { + return nil, errors.Wrapf(err, "Unable to retrieve token from web: %v") + } + + return h.config.TokenSource(ctx, tok), nil +} + +// TokenCache defines an interface for caching tokens +type TokenCache interface { + GetToken() (*oauth2.Token, error) + Save(token *oauth2.Token) error +} + +// FileTokenCache implements caching to a file. +type FileTokenCache struct { + CacheFile string + Log logr.Logger +} + +func (c *FileTokenCache) GetToken() (*oauth2.Token, error) { + f, err := os.Open(c.CacheFile) + if err != nil { + if os.IsNotExist(err) { + return nil, nil + } + return nil, err + } + defer f.Close() + tok := &oauth2.Token{} + err = json.NewDecoder(f).Decode(tok) + return tok, err +} + +// Save saves a token to a file path. +func (c *FileTokenCache) Save(token *oauth2.Token) error { + c.Log.Info("Saving credential", "file", c.CacheFile) + + dir := filepath.Dir(c.CacheFile) + + _, err := os.Stat(dir) + + if err != nil { + if os.IsNotExist(err) { + c.Log.Info("Create cache directory", "dir", dir) + err := os.MkdirAll(dir, CredentialDirPermMode) + if err != nil { + return err + } + } else { + return err + } + } + + f, err := os.OpenFile(c.CacheFile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) + if err != nil { + c.Log.Error(err, "Unable to cache oauth token: %v") + return err + } + defer f.Close() + json.NewEncoder(f).Encode(token) + return nil +} + +// CachedCredentialHelper is a credential helper that will cache the credential. +type CachedCredentialHelper struct { + CredentialHelper CredentialHelper + TokenCache TokenCache + Log logr.Logger +} + +func (h *CachedCredentialHelper) GetOAuthConfig() (*oauth2.Config) { + return h.CredentialHelper.GetOAuthConfig() +} + +func (c *CachedCredentialHelper) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) { + log := c.Log + // Try the cache. + tok, err := c.TokenCache.GetToken() + + if err != nil { + return nil, err + } + + if tok == nil { + // Cache is empty so get a token + ts, err := c.CredentialHelper.GetTokenSource(context.Background()) + + if err != nil { + return nil, err + } + + // Save the token + newTok, err := ts.Token() + tok = newTok + if err != nil { + log.Error(err, "Could generate token from token source") + return ts, err + } + err = c.TokenCache.Save(newTok) + + if err != nil { + log.Error(err, "Could not save token") + } + } + + ts := c.CredentialHelper.GetOAuthConfig().TokenSource(ctx, tok) + return ts, nil +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/gcs/doc.go b/google_groups/pkg/gcp/gcs/doc.go new file mode 100644 index 00000000000..1b7a2f8b851 --- /dev/null +++ b/google_groups/pkg/gcp/gcs/doc.go @@ -0,0 +1,4 @@ +// package gcs provides useful utilities for GCS +// This package isn't specific to our groups sync. We should probably move it to a more generic location +// and make it its own go module to make it easy to reuse. +package gcs diff --git a/google_groups/pkg/gcp/gcs/filehelper.go b/google_groups/pkg/gcp/gcs/filehelper.go new file mode 100644 index 00000000000..6e3e9b73184 --- /dev/null +++ b/google_groups/pkg/gcp/gcs/filehelper.go @@ -0,0 +1,15 @@ +package gcs + +import ( + "io" +) + +// TODO(jlewi): We should implement a UnionFileHelper that will delegate to the GcsFileHelper or LocalFileHelper + +// FileHelper is an interface intended to transparently handle working with GCS and local files. +// TODO(jlewi): Move into the util package? +type FileHelper interface { + Exists(path string) (bool, error) + NewReader(path string) (io.Reader, error) + NewWriter(path string) (io.Writer, error) +} diff --git a/google_groups/pkg/gcp/gcs/local.go b/google_groups/pkg/gcp/gcs/local.go new file mode 100644 index 00000000000..603c12c6323 --- /dev/null +++ b/google_groups/pkg/gcp/gcs/local.go @@ -0,0 +1,48 @@ +package gcs + +import ( + "github.com/pkg/errors" + "io" + "os" +) + +type LocalFileHelper struct {} + +// NewReader creates a new Reader for local file. +func (h *LocalFileHelper) NewReader(uri string) (io.Reader, error) { + reader, err := os.Open(uri) + + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Clould not read: %v", uri)) + } + + return reader, nil +} + +// NewWriter creates a new Writer for the local file. +// +// TODO(jlewi): Can we add options to control filemode? +func (h *LocalFileHelper) NewWriter(uri string) (io.Writer, error) { + _, err := os.Stat(uri) + + if err == nil || !os.IsNotExist(err) { + return nil, errors.WithStack(errors.Errorf("Can't write %v; It already exists", uri )) + } + + writer, err := os.Create(uri) + + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Clould not write: %v", uri)) + } + + return writer, nil +} + +// Exists checks whether the file exists. +func (h *LocalFileHelper) Exists(uri string) (bool, error) { + _, err := os.Stat(uri) + if os.IsNotExist(err) { + return false, nil + } + return true, nil +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/gcs/paths.go b/google_groups/pkg/gcp/gcs/paths.go new file mode 100644 index 00000000000..2ce0ab6ce3c --- /dev/null +++ b/google_groups/pkg/gcp/gcs/paths.go @@ -0,0 +1,34 @@ +package gcs + +import ( + "path" +) + +// Dir should have the same semantics as Path.Dir except it should work with URIs +// e.g. file://some and gs:// as well as non URIs +func Dir(uri string) string { + gcsPath, err := Parse(uri) + + if err != nil { + return path.Dir(uri) + } + + objDir := path.Dir(gcsPath.Path) + + p := &GcsPath{Path: objDir, + Bucket: gcsPath.Bucket, + } + return p.ToURI() +} + +// Base should have the same semantics as Path.Base except it should work with URIs +// e.g. file://some and gs:// as well as non URIs +func Base(uri string) string { + gcsPath, err := Parse(uri) + + if err != nil { + return path.Base(uri) + } + + return path.Base(gcsPath.Path) +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/gcs/paths_test.go b/google_groups/pkg/gcp/gcs/paths_test.go new file mode 100644 index 00000000000..705e5b13294 --- /dev/null +++ b/google_groups/pkg/gcp/gcs/paths_test.go @@ -0,0 +1,57 @@ +package gcs + +import ( + "testing" +) + +func Test_Dir(t *testing.T) { + type testCase struct { + input string + output string + } + + testCases := []testCase { + { + input: "gs://bucket/dirA/dirB", + output: "gs://bucket/dirA", + }, + { + input: "/bucket/dirA/dirB", + output: "/bucket/dirA", + }, + } + + for _, c := range testCases { + actual := Dir(c.input) + + if actual != c.output { + t.Errorf("Input: %v; Got %v; Want %v", c.input, actual, c.output) + } + } +} + +func Test_Base(t *testing.T) { + type testCase struct { + input string + output string + } + + testCases := []testCase { + { + input: "gs://bucket/dirA/dirB", + output: "dirB", + }, + { + input: "/bucket/dirA/dirB", + output: "dirB", + }, + } + + for _, c := range testCases { + actual := Base(c.input) + + if actual != c.output { + t.Errorf("Input: %v; Got %v; Want %v", c.input, actual, c.output) + } + } +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/gcs/util.go b/google_groups/pkg/gcp/gcs/util.go new file mode 100644 index 00000000000..449f52ff0ae --- /dev/null +++ b/google_groups/pkg/gcp/gcs/util.go @@ -0,0 +1,277 @@ +package gcs + +import ( + "cloud.google.com/go/storage" + "context" + "fmt" + "github.com/kubeflow/internal-acls/google_groups/pkg/util" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "google.golang.org/api/iterator" + "io" + "math/rand" + "path" + "regexp" +) + +var ( + gcsRe *regexp.Regexp +) + +type GcsPath struct { + Bucket string + Path string +} + +func (p *GcsPath) ToURI() string { + r := "gs://" + p.Bucket + if p.Path != "" { + r = r + "/" + p.Path + } + return r +} + +func Parse(path string) (*GcsPath, error) { + m := gcsRe.FindStringSubmatch(path) + + if m == nil { + return nil, fmt.Errorf("Path %v; doesn't match regex %v", path, gcsRe.String()) + } + + r := &GcsPath{} + + if len(m) >= 2 { + r.Bucket = m[1] + } + + if len(m) >= 3 { + r.Path = m[2] + } + return r, nil +} + +type GcsHelper struct { + Ctx context.Context + Client *storage.Client +} + +// NewReader creates a new Reader for GCS path or local file. +func (h *GcsHelper) NewReader(uri string) (io.Reader, error) { + p, err := Parse(uri) + if err != nil { + return nil, err + } + b := h.Client.Bucket(p.Bucket) + o := b.Object(p.Path) + + reader, err := o.NewReader(h.Ctx) + + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Clould not read: %v", uri)) + } + + return reader, nil +} + +// NewWriter creates a new Writer for GCS path or local file. +// +// TODO(jlewi): Can we add options to control filemode? +func (h *GcsHelper) NewWriter( uri string) (io.Writer, error) { + p, err := Parse(uri) + if err != nil { + return nil, err + } + b := h.Client.Bucket(p.Bucket) + + _, err = b.Attrs(h.Ctx) + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Can't access bucket %v; It may not exist", p.Bucket )) + } + + o := b.Object(p.Path) + + // Make sure object doesn't already exist + if ObjectExists(h.Ctx, o) { + return nil, errors.WithStack(errors.Errorf("Can't write %v; It already exists", uri )) + } + + return o.NewWriter(h.Ctx), nil +} + +// Exists checks whether the URI exists. +// +// If error is not nil the boolean value will be random. +func (h *GcsHelper) Exists( uri string) (bool, error) { + // In the event of an error we return a random value for the boolean. + // This is meant to discourage callers from trusting the value in the event an error occured. + randVal := rand.Float32() > .5 + + p, err := Parse(uri) + if err != nil { + return randVal, err + } + b := h.Client.Bucket(p.Bucket) + + _, err = b.Attrs(h.Ctx) + + if err != nil { + isMatch, _ := regexp.MatchString(".*doesn't.*exist.*", err.Error()) + + if isMatch { + return true, nil + } + + return randVal, err + } + + o := b.Object(p.Path) + + return ObjectExists(h.Ctx, o), nil +} + +// BuildInputOutputList builds a map from input files to the files that they +// should be mapped to. +// +// input is a regex as specified by TransformFiles. This is used to find existing files and generate +// the corresponding output files. +func (h *GcsHelper) BuildInputOutputList(input string, output string) (map[string]string, error) { + paths, err := ListObjects(h.Ctx, h.Client, input) + + if err != nil { + return map[string]string{}, errors.Wrapf(err, "Could not list files matching: %v", input) + } + return util.TransformFiles(paths, input, output) +} + +func ObjectExists(ctx context.Context, o *storage.ObjectHandle) bool { + _, err := o.Attrs(ctx) + + if err == nil { + return true + } + + isMatch, mErr := regexp.MatchString(".*doesn't.*exist.*", err.Error()) + + if mErr != nil { + log.Errorf("There was a problem matching the regex; %v", err) + } + + if err !=nil && isMatch { + return false + } + + return true +} + +// ListObjects lists all objects matching some regex. +// +// This is listing all files in the parent directory. +func ListObjects(ctx context.Context, client *storage.Client, uri string) ([]string, error) { + paths := []string{} + p, err := Parse(uri) + if err != nil { + return paths, errors.WithStack(errors.Wrapf(err, "Could not list objects matching %v", uri)) + } + + b := client.Bucket(p.Bucket) + + prefix := path.Dir(p.Path) + + q := &storage.Query{ + Delimiter: "/", + Prefix: prefix + "/", + Versions: false, + } + + objs := b.Objects(ctx, q) + return findMatches(p, objs) +} + +// ListObjectsWithPrefix returns a list of all GCS objects within the given prefix. +func ListObjectsWithPrefix(ctx context.Context, client *storage.Client, prefix string) ([]string, error) { + paths := []string{} + p, err := Parse(prefix) + if err != nil { + return paths, errors.WithStack(errors.Wrapf(err, "Could not list objects matching %v", prefix)) + } + + b := client.Bucket(p.Bucket) + + q := &storage.Query{ + Prefix: p.Path, + Versions: false, + } + + objs := b.Objects(ctx, q) + + for ;; { + i, err := objs.Next() + + if err == iterator.Done { + return paths, nil + } + + if err != nil { + return paths, errors.WithStack(errors.Wrapf(err,"Error getting next object with prefix %v", prefix)) + } + + // Skip it is just a prefix + if i.Prefix != "" { + continue + } + + iPath := GcsPath{ + Bucket: i.Bucket, + Path: i.Name, + } + + + paths = append(paths, iPath.ToURI()) + + } +} + +type objectAttrsIterator interface { + Next() (*storage.ObjectAttrs, error) +} + +func findMatches(pattern *GcsPath, objs objectAttrsIterator) ([]string, error) { + paths := []string{} + for ;; { + i, err := objs.Next() + + if err == iterator.Done { + return paths, nil + } + + if err != nil { + return paths, errors.WithStack(errors.Wrapf(err,"Error getting next object matching %v", pattern.ToURI())) + } + + // Skip it is just a prefix + if i.Prefix != "" { + continue + } + + iPath := GcsPath{ + Bucket: i.Bucket, + Path: i.Name, + } + + log.Debugf("path.Match(%v, %v)", pattern.ToURI(), iPath.ToURI()) + isMatch, err := regexp.MatchString(pattern.ToURI(), iPath.ToURI()) + + if err != nil { + log.Errorf("path.Match(%v, %v) returned error; %v", pattern.Path, iPath.ToURI(), err) + continue + } + + if isMatch { + paths = append(paths, iPath.ToURI()) + } + } +} + +func init() { + gcsRe = regexp.MustCompile("gs://([^/]+)/{0,1}(.*)") +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/gcs/util_test.go b/google_groups/pkg/gcp/gcs/util_test.go new file mode 100644 index 00000000000..053c4cf9348 --- /dev/null +++ b/google_groups/pkg/gcp/gcs/util_test.go @@ -0,0 +1,149 @@ +package gcs + +import ( + "cloud.google.com/go/storage" + "github.com/google/go-cmp/cmp" + "google.golang.org/api/iterator" + "regexp" + "testing" +) + +func TestParse(t *testing.T) { + type testCase struct { + Input string + ExpectedErrRe string + Expected *GcsPath + } + + + cases := []testCase{ + { + Input: "gs://bucket/folder1/file.csv", + ExpectedErrRe: "", + Expected: &GcsPath{ + Bucket: "bucket", + Path: "folder1/file.csv", + }, + }, + { + Input: "gs://bucket", + ExpectedErrRe: "", + Expected: &GcsPath{ + Bucket: "bucket", + Path: "", + }, + }, + { + Input: "gs://bucket/", + ExpectedErrRe: "", + Expected: &GcsPath{ + Bucket: "bucket", + Path: "", + }, + }, + { + Input: "/some/path", + ExpectedErrRe: ".*path.*doesn't.*match", + }, + } + + + for i, c := range cases { + actual, err := Parse(c.Input) + + if c.ExpectedErrRe != "" { + if err == nil { + t.Errorf("Case %v: Expected error %v but no error returned", i, c.ExpectedErrRe) + continue + } + + if b, _ :=regexp.MatchString(c.ExpectedErrRe, err.Error()); !b { + t.Errorf("Case %v; Got error %v; want error matching %v", i, err, c.ExpectedErrRe) + } + } + + if err != nil && c.ExpectedErrRe == "" { + t.Errorf("Case %v: Parse gave unexpected error: %v", i, err) + continue + } + + if d := cmp.Diff(c.Expected, actual); d != "" { + t.Errorf("Case %v: Parse() mismatch (-want +got):\n%s", i, d) + continue + } + } +} + + +type FakeObjectIterator struct { + results []string + pos int +} + +func (i *FakeObjectIterator) Next()(*storage.ObjectAttrs, error) { + if i.pos >= len(i.results) { + return nil, iterator.Done + } + + p, err := Parse(i.results[i.pos]) + + if err != nil { + return nil, err + } + + a := &storage.ObjectAttrs{ + Bucket: p.Bucket, + Name: p.Path, + } + i.pos = i.pos + 1 + return a, nil +} + +func TestFindMatches(t *testing.T) { + type testCase struct { + Input string + Results []string + Expected []string + } + + testCases := []testCase{ + { + Input: "gs://mybucket/dirA/contract*.pdf", + Results: []string { + "gs://mybucket/dirA/contract-1.pdf", + "gs://mybucket/dirA/contract-2.pdf", + "gs://mybucket/dirA/contract-2.csv", + "gs://mybucket/dirA/other-1.pdf", + }, + Expected: []string { + "gs://mybucket/dirA/contract-1.pdf", + "gs://mybucket/dirA/contract-2.pdf", + }, + }, + } + + for i, c := range testCases { + o := &FakeObjectIterator{ + results: c.Results, + pos: 0, + } + + pattern, err := Parse(c.Input) + + if err != nil { + t.Errorf("Could not parse %v; error %v", c.Input, err) + } + + actual, err := findMatches(pattern, o) + + if err != nil && err != iterator.Done { + t.Errorf("findMatches returned error %v", err) + continue + } + + if d := cmp.Diff(c.Expected, actual); d != "" { + t.Errorf("Case %v: Parse() mismatch (-want +got):\n%s", i, d) + continue + } + } +} \ No newline at end of file diff --git a/google_groups/pkg/gcp/secret_cache.go b/google_groups/pkg/gcp/secret_cache.go new file mode 100644 index 00000000000..5f0179b12c0 --- /dev/null +++ b/google_groups/pkg/gcp/secret_cache.go @@ -0,0 +1,153 @@ +package gcp + +import ( + secretmanager "cloud.google.com/go/secretmanager/apiv1" + "context" + "encoding/json" + "fmt" + "github.com/go-logr/logr" + "github.com/go-logr/zapr" + "github.com/pkg/errors" + "go.uber.org/zap" + "golang.org/x/oauth2" + secretmanagerpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// SecretCache implements a cache for an OAuth2 credential using GCP secret manager +type SecretCache struct { + client *secretmanager.Client + Project string + Secret string + Version string + Log logr.Logger + +} + +func NewSecretCache(project string, secret string, version string) (*SecretCache, error) { + c := &SecretCache{ + Project: project, + Secret: secret, + Version: version, + Log: zapr.NewLogger(zap.L()), + } + + client, err := secretmanager.NewClient(context.Background()) + + if err != nil { + return nil, err + } + + c.client = client + return c, nil +} + +func (c *SecretCache) GetToken() (*oauth2.Token, error) { + payload, err := c.loadSecret() + + if err != nil { + return nil, err + } + + // No secret has been saved yet. + if payload == nil { + return nil, nil + } + + tok := &oauth2.Token{} + err = json.Unmarshal(payload, tok) + return tok, err +} + +// Save saves a token to a file path. +func (c *SecretCache) Save(token *oauth2.Token) error { + log := c.Log + log.Info("Saving credential to secret manager", "project", c.Project, "secret", c.Secret) + + // Create the request to create the secret. + createSecretReq := &secretmanagerpb.CreateSecretRequest{ + Parent: fmt.Sprintf("projects/%s", c.Project), + SecretId: c.Secret, + Secret: &secretmanagerpb.Secret{ + Replication: &secretmanagerpb.Replication{ + Replication: &secretmanagerpb.Replication_Automatic_{ + Automatic: &secretmanagerpb.Replication_Automatic{}, + }, + }, + }, + } + + ctx := context.Background() + + _, err := c.client.CreateSecret(ctx, createSecretReq) + if err != nil { + status, ok := status.FromError(err) + + if !ok { + log.Error(err, "Error creating secret.", "project", c.Project, "secret", c.Secret) + return err + } + + if status.Code() == codes.AlreadyExists { + log.Info("Secret exists", "project", c.Project, "secret", c.Secret) + } else { + log.Error(err, "Error creating secret.", "project", c.Project, "secret", c.Secret) + return err + } + } + + payload, err := json.Marshal(token) + if err != nil { + return err + } + + + // Build the request. + addSecretVersionReq := &secretmanagerpb.AddSecretVersionRequest{ + Parent: fmt.Sprintf("projects/%v/secrets/%v", c.Project, c.Secret), + Payload: &secretmanagerpb.SecretPayload{ + Data: payload, + }, + } + + // Call the API. + version, err := c.client.AddSecretVersion(ctx, addSecretVersionReq) + if err != nil { + return err + } + + log.Info("Stored token in secret manager,", "version", version) + return nil +} + +func (c *SecretCache) loadSecret() ([]byte, error) { + log := c.Log + name := fmt.Sprintf("projects/%v/secrets/%v/versions/%s", c.Project, c.Secret, c.Version) + accessRequest := &secretmanagerpb.AccessSecretVersionRequest{ + Name: name, + } + + ctx := context.Background() + + // Call the API. + result, err := c.client.AccessSecretVersion(ctx, accessRequest) + if err != nil { + status, ok := status.FromError(err) + + if ok { + if status.Code() == codes.NotFound { + log.Info("No secret exists containing cached token", "secret", name) + return nil, nil + } + + if status.Code() == codes.FailedPrecondition { + log.Info("Latest version of secret is not valid a new secret will be created.", "secret", name, "status_message", status.Message()) + return nil, nil + } + } + return nil, errors.Wrapf(err, "failed to access secret %v", name) + } + + return result.Payload.Data, nil +} \ No newline at end of file diff --git a/google_groups/pkg/groups/const.go b/google_groups/pkg/groups/const.go new file mode 100644 index 00000000000..9ebb1c7d135 --- /dev/null +++ b/google_groups/pkg/groups/const.go @@ -0,0 +1,9 @@ +package groups + +type GroupRole string + +const ( + ManagerRole GroupRole = "MANAGER" + OwnerRole GroupRole = "OWNER" + MemberRole GroupRole = "MEMBER" +) diff --git a/google_groups/pkg/groups/importer.go b/google_groups/pkg/groups/importer.go new file mode 100644 index 00000000000..dde8190d88b --- /dev/null +++ b/google_groups/pkg/groups/importer.go @@ -0,0 +1,97 @@ +package groups + +import ( + "context" + "github.com/go-logr/logr" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + admin "google.golang.org/api/admin/directory/v1" + settingsSdk "google.golang.org/api/groupssettings/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "net/http" +) + +// GroupImporter is used to import existing groups to YAML files. +type GroupImporter struct { + Client *http.Client + Log logr.Logger +} + +// Import group definitions +func (s *GroupImporter) Import(org string) ([]*v1alpha1.GoogleGroup, error) { + log := s.Log + results := []*v1alpha1.GoogleGroup{} + + // TODO(jlewi): Using admin.NewService was giving me auth problems. I think it might be an OAuthScope + // issue because the credential didn't have all the scopes but admin.NewService appears to request all scopes + // so the client was requesting a token for scopes it wasn't authorized for. + service, err := admin.New(s.Client) + + if err != nil { + return results, err + } + + settingsService, err := settingsSdk.New(s.Client) + + if err != nil { + return results, err + } + + groups := []*admin.Group{} + pageFunc := func(g *admin.Groups) error { + groups = append(groups, g.Groups...) + return nil + } + + err = service.Groups.List().Domain(org).Pages(context.Background(), pageFunc) + + if err != nil { + return results, err + } + + for _, g := range groups { + newGroup := &v1alpha1.GoogleGroup{ + ObjectMeta: metav1.ObjectMeta{ + Name: g.Email, + }, + Spec: v1alpha1.GoogleGroupSpec{ + Name: g.Name, + Email: g.Email, + Description: g.Description, + Members: []v1alpha1.Member{}, + }, + } + + // Update the group settings. + gSettings, err := settingsService.Groups.Get(g.Email).Do() + + if err != nil { + log.Error(err, "Error getting group settings", "group", g.Email) + continue + } + + newGroup.Spec.AllowExternalMembers = gSettings.AllowExternalMembers + newGroup.Spec.WhoCanPostMessage = gSettings.WhoCanPostMessage + newGroup.Spec.WhoCanJoin = gSettings.WhoCanJoin + + appendMembers := func(page *admin.Members) error { + + for _, m := range page.Members { + newGroup.Spec.Members = append(newGroup.Spec.Members, v1alpha1.Member{ + Email: m.Email, + Role: m.Role, + }) + } + return nil + } + + err = service.Members.List(g.Email).Pages(context.Background(), appendMembers) + + if err != nil { + log.Error(err, "Error getting group members", "group", g.Email) + continue + } + + results = append(results, newGroup) + } + return results, nil +} diff --git a/google_groups/pkg/groups/syncer.go b/google_groups/pkg/groups/syncer.go new file mode 100644 index 00000000000..620431497bc --- /dev/null +++ b/google_groups/pkg/groups/syncer.go @@ -0,0 +1,227 @@ +package groups + +import ( + "context" + "fmt" + "github.com/go-logr/logr" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + admin "google.golang.org/api/admin/directory/v1" + "google.golang.org/api/googleapi" + settingsSdk "google.golang.org/api/groupssettings/v1" + "net/http" + "strings" +) + +type GroupSyncer struct { + Client *http.Client + Log logr.Logger +} + +func (s *GroupSyncer) Sync(groupSpecs []*v1alpha1.GoogleGroup) error { + log := s.Log + // TODO(jlewi): Using admin.NewService was giving me auth problems. I think it might be an OAuthScope + // issue because the credential didn't have all the scopes but admin.NewService appears to request all scopes + // so the client was requesting a token for scopes it wasn't authorized for. + service, err := admin.New(s.Client) + + if err != nil { + return err + } + + settingsService, err := settingsSdk.New(s.Client) + + if err != nil { + return err + } + + for _, gDef := range groupSpecs { + if gDef.Spec.AutoSync != nil && !*gDef.Spec.AutoSync { + log.Info("AutoSync not enabled for group", "group", gDef.Spec.Email) + continue + } + + // Ensure each group exists and settings are up to date + s.syncGroupSettings(gDef, service, settingsService) + + // Sync members + s.syncMembers(gDef, service) + } + + // Sync members + return nil +} + +// syncGroupSettings synchronizes a groups setting (but not the membership). +// This includes; +// * creating the group if it doesn't exist +// * setting description and properties on the group +func (s *GroupSyncer) syncGroupSettings(gDef *v1alpha1.GoogleGroup,service *admin.Service, settingsService *settingsSdk.Service) error { + _, err := service.Groups.Get(gDef.Spec.Email).Do() + + log := s.Log + if err != nil { + gErr, ok := err.(*googleapi.Error) + + if !ok { + log.Error(err, "Error getting group.", "group", gDef.Spec.Email) + return err + } + + if gErr.Code != http.StatusNotFound { + log.Error(err, "Error getting group.", "group", gDef.Spec.Email) + return err + } + + // Group doesn't exist so create it + log.Info("Creating group", "group", gDef.Spec.Email) + // TODO(jlewi): How do we set who can join? How do we allow external members? + pieces := strings.Split(gDef.Spec.Email, "@") + newGroup := &admin.Group { + Email: gDef.Spec.Email, + Name: pieces[0], + Description: gDef.Spec.Description, + } + _, err := service.Groups.Insert(newGroup).Do() + + if err != nil { + log.Error(err, "Error creating group.", "group", gDef.Spec.Email) + return err + } + } + + // Update the group settings. + gSettings, err := settingsService.Groups.Get(gDef.Spec.Email).Do() + + if err != nil { + s.Log.Error(err, "Error getting group settings", "group", gDef.Spec.Email) + return err + } + + // Ref: https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups#json + gSettings.Description = gDef.Spec.Description + + // The only mechanism for joining these groups should be via the configs and the sync + // program + gSettings.WhoCanJoin = gDef.Spec.WhoCanJoin + // Most members will be joining with their non kubeflow accounts + gSettings.AllowExternalMembers = gSettings.AllowExternalMembers + + // TODO(jlewi): How should we validate its set to a correct value? + gSettings.WhoCanPostMessage = gDef.Spec.WhoCanPostMessage + + if gSettings.WhoCanPostMessage == "" { + gSettings.WhoCanPostMessage = "ANYONE_CAN_POST" + } + + log.Info("Updating group settings", "group", gDef.Spec.Email) + _, err = settingsService.Groups.Update(gDef.Spec.Email, gSettings).Do() + if err != nil { + s.Log.Error(err, "Error updating group settings", "group", gDef.Spec.Email) + } + + return nil +} + +func (s *GroupSyncer) syncMembers(gDef *v1alpha1.GoogleGroup, service *admin.Service) error { + log := s.Log + currentMembers := []*admin.Member{} + + appendMembers := func(page *admin.Members) error { + currentMembers = append(currentMembers, page.Members...) + return nil + } + + err := service.Members.List(gDef.Spec.Email).Pages(context.Background(), appendMembers) + + if err != nil { + log.Error(err, "Error getting group members", "group", gDef.Spec.Email) + return err + } + + diff := diffCurrentDesiredMembers(currentMembers, gDef.Spec.Members) + + log.Info("Diff Group Membership", "group", gDef.Spec.Email, "diff", diff) + + // Add missing members + for _, m := range diff.ToAdd { + if !isValidGroupRole(GroupRole(m.Role)) { + log.Error(fmt.Errorf("Member has invalid role"), "Member has invalid role", "group", gDef.Spec.Email, "member", m) + continue + } + newMember := admin.Member{ + Email: m.Email, + Role: m.Role, + } + result, err := service.Members.Insert(gDef.Spec.Email, &newMember).Do() + + if err != nil { + log.Error(err, "Could not insert member", "group", gDef.Spec.Email, "member", newMember) + } else { + log.Info( "Inserted member", "group", gDef.Spec.Email, "member", result) + } + } + + // Delete removed members + for _, m := range diff.ToRemove { + err := service.Members.Delete(gDef.Spec.Email, m).Do() + + if err != nil { + log.Error(err, "Could not delete member", "group", gDef.Spec.Email, "member", m) + } else { + log.Info( "Delete member", "group", gDef.Spec.Email, "member", m) + } + } + return nil +} + +// TODO(jlewi): We should also figure out if there are any members that need to be updated e.g. have their +// role changed. +type memberDiff struct{ + // List of members that are missing from the group + ToAdd []v1alpha1.Member + + // List of members to remove from the group + ToRemove []string +} + +func diffCurrentDesiredMembers(current []*admin.Member, desired []v1alpha1.Member) memberDiff { + cSet := map[string] bool {} + + for _, m := range current { + cSet[m.Email] = true + } + + diff := memberDiff{ + ToAdd: []v1alpha1.Member{}, + ToRemove: []string{}, + } + + dSet := map[string] bool {} + + // generate missing members + for _, m := range desired { + dSet[m.Email] = true + + if _, ok := cSet[m.Email]; !ok { + diff.ToAdd = append(diff.ToAdd, m) + } + } + + // generate members to delete + for _, m := range current { + if _, ok := dSet[m.Email]; !ok { + diff.ToRemove = append(diff.ToRemove, m.Email) + } + } + + return diff +} + +func isValidGroupRole(role GroupRole) bool { + for _, v := range []GroupRole{OwnerRole, ManagerRole, MemberRole} { + if v == role { + return true + } + } + return false +} \ No newline at end of file diff --git a/google_groups/pkg/groups/syncer_test.go b/google_groups/pkg/groups/syncer_test.go new file mode 100644 index 00000000000..6ecc4c6f53e --- /dev/null +++ b/google_groups/pkg/groups/syncer_test.go @@ -0,0 +1,54 @@ +package groups + +import ( + "github.com/google/go-cmp/cmp" + "github.com/kubeflow/internal-acls/google_groups/pkg/api/v1alpha1" + admin "google.golang.org/api/admin/directory/v1" + "testing" +) + +func TestMembersDiff(t *testing.T) { + + type testCase struct { + current []string + desired []string + expected memberDiff + } + + testCases := []testCase { + { + current : []string {"a", "b", "c"}, + desired: []string{"b", "c", "d"}, + expected: memberDiff{ + ToAdd: []v1alpha1.Member{ + { + Email: "d", + }, + }, + ToRemove: []string{"a"}, + }, + }, + } + + for _, c := range testCases { + current := []*admin.Member{} + + for _, e := range c.current { + current = append(current, &admin.Member{Email: e}) + } + + desired := []v1alpha1.Member{} + + for _, e := range c.desired { + desired = append(desired, v1alpha1.Member{ + Email: e, + }) + } + + memberDiff := diffCurrentDesiredMembers(current, desired) + + if diff := cmp.Diff(c.expected, memberDiff); diff != "" { + t.Errorf("diffCurrentDesiredMembers() mismatch (-want +got):\n%s", diff) + } + } +} diff --git a/google_groups/pkg/util/files.go b/google_groups/pkg/util/files.go new file mode 100644 index 00000000000..7dd55eb9b51 --- /dev/null +++ b/google_groups/pkg/util/files.go @@ -0,0 +1,94 @@ +package util + +import ( + "bytes" + "crypto/sha256" + "github.com/go-logr/zapr" + "go.uber.org/zap" + "io" + "os" + "regexp" + "sort" +) +import "github.com/pkg/errors" +import "text/template" + + +// TransformFiles matches the input pattern against the input files. For any matching file the corresponding +// output is generated according to outputPattern. +// +// inputPattern is a regex that should contain named groups using the syntax +// (?Pregex) +// +// For example: +// inputPattern: "gs://someBucket/(?p.*)\.pdf" +// +// The outputPattern can reference the named patterns using the syntax {{.name}} e.g. +// +// outputPattern: "gs://outputBucket/{{.name}}.csv" +// regex groups to capture groups. The outputPattern is a go template that uses {{.g1}, {{.g2}}, ..., {{.gn}} +// to refer to the captured groups +func TransformFiles(files []string, inputPattern string, outputPattern string) (map[string]string , error) { + results := map[string]string{} + + p, err := regexp.Compile(inputPattern) + + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Error compiling regex: %v", inputPattern)) + } + + t, err := template.New("output").Parse(outputPattern) + + if err != nil { + return nil, errors.WithStack(errors.Wrapf(err, "Error parsing template: %v", outputPattern)) + } + + l := &ArrayLister{ + files, + } + matches, err := FilterByRe(l, p) + + if err != nil { + return results, errors.WithStack(errors.Wrapf(err, "Error occurred applying pattern %v", inputPattern)) + } + + for _, m := range matches { + buf := new(bytes.Buffer) + t.Execute(buf, m.Groups) + results[m.Value] = buf.String() + } + return results, nil +} + +// FileLister is an interface intended to transparently handle working with GCS and local files. +type FileLister interface { + ListByRe(pattern string) ([]ReMatch, error) +} + +// FilesHash generates a hash based on the contents of a list of files. +// This is intended to be used to detect when one or more files has changed. +func ContentHash(files[]string) ([]byte, error) { + log := zapr.NewLogger(zap.L()) + + // Sort the files. + sort.Slice(files[:], func(i, j int) bool { + return files[i] < files[j] + }) + + hash := sha256.New() + + for _, f := range files { + input, err := os.Open(f) + + if err != nil { + log.Error(err,"Could not read file", "file", f) + return []byte{}, err + } + + if _, err := io.Copy(hash, input); err != nil { + log.Error(err, "Error reading file", "file", f) + return []byte{}, err + } + } + return hash.Sum(nil), nil +} \ No newline at end of file diff --git a/google_groups/pkg/util/files_test.go b/google_groups/pkg/util/files_test.go new file mode 100644 index 00000000000..d3d3521fdca --- /dev/null +++ b/google_groups/pkg/util/files_test.go @@ -0,0 +1,41 @@ +package util + +import "testing" +import "github.com/google/go-cmp/cmp" + +func TestTransformFiles(t *testing.T) { + type testCase struct { + InputPattern string + OutputPattern string + Files []string + Expected map[string]string + } + + cases := []testCase { + { + InputPattern: `gs://input/(?P.*)\.pdf`, + OutputPattern: `gs://output/{{.name}}.csv`, + Files: []string{ + "gs://input/file1.pdf", + "gs://input/file2.pdf", + }, + Expected: map[string]string { + "gs://input/file1.pdf": "gs://output/file1.csv", + "gs://input/file2.pdf": "gs://output/file2.csv", + }, + }, + } + + for _, c := range cases { + results, err := TransformFiles(c.Files, c.InputPattern, c.OutputPattern) + + if err != nil { + t.Errorf("TransformFiles returned error; %v", err) + continue + } + + if diff := cmp.Diff(c.Expected, results); diff != "" { + t.Errorf("TransformFiles() mismatch (-want +got):\n%s", diff) + } + } +} diff --git a/google_groups/pkg/util/io.go b/google_groups/pkg/util/io.go new file mode 100644 index 00000000000..a7eedda8b40 --- /dev/null +++ b/google_groups/pkg/util/io.go @@ -0,0 +1,18 @@ +package util + +import ( + log "github.com/sirupsen/logrus" + "io" +) + +// MaybeClose will close the writer if its a Closer. +// Intended to be used with calls to defer. +func MaybeClose(writer io.Writer) { + if closer, isCloser := writer.(io.Closer); isCloser { + err := closer.Close() + + if err != nil { + log.Errorf("Error closing writer; error %v", err) + } + } +} \ No newline at end of file diff --git a/google_groups/pkg/util/regex.go b/google_groups/pkg/util/regex.go new file mode 100644 index 00000000000..5d9ce59a668 --- /dev/null +++ b/google_groups/pkg/util/regex.go @@ -0,0 +1,64 @@ +package util + +import ( + "regexp" +) + +// StringLister is an interface to return a list of strings +type StringLister interface { + List() ([]string, error) +} + + +// ArrayLister implements the Lister interface for an array. +type ArrayLister struct { + Items []string +} + +// List lists the items in the array +func (l *ArrayLister) List() ([]string, error) { + return l.Items, nil +} + +// ReMatch represents a regex match +type ReMatch struct { + // Value is the matched value + Value string + + // Groups is a map of the named groups if any captured from the regex + Groups map[string]string +} + +func FilterByRe(l StringLister, p *regexp.Regexp) ([]ReMatch, error){ + matches := []ReMatch{} + + items, err := l.List() + + if err != nil { + return matches, err + } + + for _, i := range items { + m := p.FindStringSubmatch(i) + + if m == nil { + continue + } + + newMatch := ReMatch{ + Value: m[0], + Groups: map[string]string{}, + } + for i, k := range p.SubexpNames() { + // 0'th position corresponds to the whole string + if i == 0 { + continue + } + newMatch.Groups[k] = m[i] + } + + matches = append(matches, newMatch) + } + + return matches, nil +} \ No newline at end of file diff --git a/google_groups/pkg/util/regex_test.go b/google_groups/pkg/util/regex_test.go new file mode 100644 index 00000000000..3e22dad1806 --- /dev/null +++ b/google_groups/pkg/util/regex_test.go @@ -0,0 +1,63 @@ +package util + +import ( + "github.com/google/go-cmp/cmp" + "regexp" + "testing" +) + +func Test_FilterByRe(t *testing.T) { + type testCase struct { + items []string + re string + expected []ReMatch + } + + testCases := []testCase{ + { + items: []string{ + "gs://a/b/doc-1.pdf", + "gs://a/b/doc-2.pdf", + "gs://a/b/skip.txt", + }, + re: `gs://a/b/(?P.*)\.pdf`, + expected: []ReMatch{ + { + Value: "gs://a/b/doc-1.pdf", + Groups: map[string]string{ + "name": "doc-1", + }, + }, + { + Value: "gs://a/b/doc-2.pdf", + Groups: map[string]string{ + "name": "doc-2", + }, + }, + }, + }, + } + + for _, c := range testCases { + p, err := regexp.Compile(c.re) + + if err != nil { + t.Errorf("Could not compile %v; error %v", c.re, err) + continue + } + + l := &ArrayLister{ + c.items, + } + matches, err := FilterByRe(l, p) + + if err != nil { + t.Errorf("FilterByRe failed; error %v", err) + continue + } + + if diff := cmp.Diff(c.expected, matches); diff != "" { + t.Errorf("FilterByRe() mismatch (-want +got):\n%s", diff) + } + } +} diff --git a/google_groups/pkg/util/util.go b/google_groups/pkg/util/util.go new file mode 100644 index 00000000000..f55d9448e40 --- /dev/null +++ b/google_groups/pkg/util/util.go @@ -0,0 +1,18 @@ +package util + +import ( + "encoding/json" + "fmt" +) + +// Pformat returns a pretty format output of any value. +func Pformat(value interface{}) (string) { + if s, ok := value.(string); ok { + return s + } + valueJson, err := json.MarshalIndent(value, "", " ") + if err != nil { + return fmt.Sprintf("Could not marshal the value; error %v", err) + } + return string(valueJson) +} diff --git a/google_groups/release-team.members.txt b/google_groups/release-team.members.txt deleted file mode 100644 index 2be2e4c2e5d..00000000000 --- a/google_groups/release-team.members.txt +++ /dev/null @@ -1,5 +0,0 @@ -abhishek@google.com -andrey.velichkevich@gmail.com -apverma@google.com -jlewi@google.com -terrytangyuan@gmail.com diff --git a/google_groups/sync_groups.sh b/google_groups/sync_groups.sh deleted file mode 100755 index 0754328a021..00000000000 --- a/google_groups/sync_groups.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Sync groups using the gam CLI -set -ex - -KF_GROUPS=( - "calendar-admins" - "ci-team" - "ci-viewer" - "code-search-team" - "community-meeting-hosts" - "devrel-team" - "devstats" - "drive-content-managers" - "example-maintainers" - "feast-team" - "github-team" - "google-kubeflow-admins" - "google-team" - "insight-fellowship" - "kf-demo-owners" - "kf-kcc-admins" - "kubeflow-examples-gcr-writers" - "modeldb-team" - "release-team" -) -for g in "${KF_GROUPS[@]}"; do - gam update group ${g}@kubeflow.org sync member file ${g}.members.txt -done