├── CODEOWNERS ├── pkg ├── testdata │ ├── im_not_json.json │ └── valid_pricing.json ├── kube_test.go ├── cost.go ├── call.go ├── cost_test.go ├── prom.go └── kube.go ├── main.go ├── mutating-webhook ├── deployments │ ├── webhook-serviceaccount.yaml │ ├── webhook-service.yaml │ ├── webhook-role.yaml │ ├── webhook-rolebinding.yaml │ └── webhook-deployment.yaml ├── Dockerfile.mutating-webhook-ca ├── Dockerfile.mutating-webhook ├── Makefile ├── cmd │ ├── mutating-webhook │ │ ├── main_test.go │ │ ├── testdata │ │ │ └── admission-webhook.json │ │ └── main.go │ └── mutating-webhook-ca │ │ └── main.go └── go.mod ├── Tools.mk ├── pricing ├── gcp │ ├── gcp.json │ └── gcp_rate_converter.go ├── aws │ ├── aws_regions.json │ ├── pull_aws_rate_prices.go │ └── aws_pricing.json └── PRICING.md ├── .gitignore ├── cmd ├── root.go ├── destroy.go ├── analyze.go └── setup.go ├── go.mod ├── .github └── workflows │ └── commit.yaml ├── README.md ├── Makefile ├── LICENSE └── go.sum /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @adiprerepa -------------------------------------------------------------------------------- /pkg/testdata/im_not_json.json: -------------------------------------------------------------------------------- 1 | I'm definitely not json. -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/tetratelabs/istio-cost-analyzer/cmd" 4 | 5 | func main() { 6 | cmd.Execute() 7 | } 8 | -------------------------------------------------------------------------------- /mutating-webhook/deployments/webhook-serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: cost-analyzer-sa -------------------------------------------------------------------------------- /pkg/testdata/valid_pricing.json: -------------------------------------------------------------------------------- 1 | { 2 | "us-west1-a": { 3 | "us-west1-b": 0.01 4 | }, 5 | "us-west1-b": { 6 | "us-west1-a": 0.01 7 | } 8 | } -------------------------------------------------------------------------------- /mutating-webhook/deployments/webhook-service.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: cost-analyzer-mutating-webhook 5 | spec: 6 | selector: 7 | app: cost-analyzer-mutating-webhook 8 | ports: 9 | - port: 443 10 | protocol: TCP 11 | targetPort: 443 12 | -------------------------------------------------------------------------------- /Tools.mk: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Tetrate 2 | # Licensed under the Apache License, Version 2.0 (the "License") 3 | 4 | addlicense@v := github.com/google/addlicense@2b44b367595c 5 | goimports@v := golang.org/x/tools/cmd/goimports@v0.1.7 6 | golangci-lint@v := github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2 7 | -------------------------------------------------------------------------------- /mutating-webhook/deployments/webhook-role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: cost-analyzer-service-role 5 | rules: 6 | - apiGroups: [ "", "admissionregistration.k8s.io" ] 7 | resources: [ "mutatingwebhookconfigurations", "pods", "nodes" ] 8 | verbs: [ "get", "create", "patch", "list", "update" ] -------------------------------------------------------------------------------- /mutating-webhook/deployments/webhook-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: cost-analyzer-role-binding 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: cost-analyzer-service-role 9 | subjects: 10 | - kind: ServiceAccount 11 | name: cost-analyzer-sa 12 | namespace: default -------------------------------------------------------------------------------- /mutating-webhook/Dockerfile.mutating-webhook-ca: -------------------------------------------------------------------------------- 1 | FROM golang:1.17-alpine as build 2 | 3 | WORKDIR /usr/src/mutating-webhook-ca 4 | 5 | COPY . . 6 | 7 | RUN go build -o ./bin/mutating-webhook-ca ./cmd/mutating-webhook-ca 8 | 9 | FROM alpine 10 | 11 | WORKDIR /opt 12 | 13 | COPY --from=build /usr/src/mutating-webhook-ca/bin/mutating-webhook-ca . 14 | 15 | CMD ["./mutating-webhook-ca", "--output-dir", "/etc/webhook/certs"] -------------------------------------------------------------------------------- /mutating-webhook/Dockerfile.mutating-webhook: -------------------------------------------------------------------------------- 1 | FROM golang:1.17-alpine as build 2 | 3 | WORKDIR /usr/src/mutating-webhook 4 | 5 | COPY . . 6 | 7 | RUN go build -o ./bin/mutating-webhook ./cmd/mutating-webhook 8 | 9 | FROM alpine 10 | 11 | WORKDIR /opt 12 | 13 | COPY --from=build /usr/src/mutating-webhook/bin/mutating-webhook . 14 | 15 | CMD ["./mutating-webhook", "--tls-cert", "/etc/webhook/certs/tls.crt", "--tls-key", "/etc/webhook/certs/tls.key"] -------------------------------------------------------------------------------- /mutating-webhook/Makefile: -------------------------------------------------------------------------------- 1 | docker: 2 | exec docker build -t adiprerepa/cost-analyzer-mutating-webhook:latest -f Dockerfile.mutating-webhook . 3 | exec docker build -t adiprerepa/cost-analyzer-mutating-webhook-ca:latest -f Dockerfile.mutating-webhook-ca . 4 | docker push adiprerepa/cost-analyzer-mutating-webhook:latest 5 | docker push adiprerepa/cost-analyzer-mutating-webhook-ca:latest 6 | 7 | build: 8 | docker build -t mutating-webhook:latest -f Dockerfile.mutating-webhook . 9 | docker build -t mutating-webhook-ca:latest -f Dockerfile.mutating-webhook-ca . 10 | 11 | push: 12 | docker push adiprerepa/cost-analyzer-mutating-webhook:latest 13 | docker push adiprerepa/cost-analyzer-mutating-webhook-ca:latest 14 | 15 | -------------------------------------------------------------------------------- /pricing/gcp/gcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "inter-zone-intra-region": { 3 | "us": "0.01", 4 | "northamerica": "0.01", 5 | "eu": "0.01", 6 | "europe": "0.01", 7 | "asia": "0.01", 8 | "southamerica": "0.01", 9 | "australia": "0.01" 10 | }, 11 | "inter-region-intra-continent": { 12 | "us": "0.01", 13 | "northamerica": "0.01", 14 | "eu": "0.02", 15 | "europe": "0.01", 16 | "asia": "0.05", 17 | "southamerica": "0.08", 18 | "australia": "0.08" 19 | }, 20 | "inter-continent": { 21 | "us": "0.08", 22 | "northamerica": "0.08", 23 | "eu": "0.08", 24 | "europe": "0.01", 25 | "asia": "0.08", 26 | "southamerica": "0.08", 27 | "australia": "0.15" 28 | } 29 | } -------------------------------------------------------------------------------- /mutating-webhook/cmd/mutating-webhook/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | _ "embed" 6 | "io" 7 | "net/http" 8 | "net/http/httptest" 9 | "testing" 10 | 11 | "github.com/stretchr/testify/assert" 12 | "github.com/stretchr/testify/require" 13 | ) 14 | 15 | //go:embed testdata/admission-webhook.json 16 | var reqBody string 17 | 18 | func TestServer(t *testing.T) { 19 | srv := httptest.NewServer(http.HandlerFunc(mutatePod)) 20 | defer srv.Close() 21 | 22 | req, _ := http.NewRequest("POST", srv.URL, bytes.NewBufferString(reqBody)) 23 | req.Header.Set("Content-Type", "application/json") 24 | 25 | res, err := http.DefaultClient.Do(req) 26 | require.NoError(t, err) 27 | 28 | body, _ := io.ReadAll(res.Body) 29 | t.Logf("Response body: %s\n", body) 30 | assert.Equal(t, http.StatusOK, res.StatusCode) 31 | } 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | vendor 3 | .vscode 4 | .makerc 5 | .DS_Store 6 | *.swp 7 | *.code-workspace 8 | .cache 9 | *.proto-descriptor 10 | *-packr.go 11 | 12 | # == Terraform == 13 | # Local .terraform directories 14 | **/.terraform 15 | 16 | # .tfstate files 17 | *.tfstate 18 | *.tfstate.* 19 | *.tfvars 20 | .build 21 | # kubeconfig files 22 | kubeconfig-* 23 | 24 | # Crash log files 25 | crash.log 26 | 27 | # Ignore any .tfvars files that are generated automatically for each Terraform run. Most 28 | # .tfvars files are managed as part of configuration and so should be included in 29 | # version control. 30 | # 31 | # example.tfvars 32 | 33 | *.json-e 34 | 35 | **/generated/ts 36 | yarn 37 | node_modules 38 | bin 39 | 40 | test.sh 41 | *.kubeconfig 42 | *.bak 43 | 44 | assets.gen.go 45 | 46 | /bazel-* 47 | /venv* 48 | __pycache__/ 49 | *.py[cod] 50 | .dmypy.json 51 | .vimrc -------------------------------------------------------------------------------- /pricing/aws/aws_regions.json: -------------------------------------------------------------------------------- 1 | { 2 | "US East Ohio": "us-east-2", 3 | "US East N. Virginia": "us-east-1", 4 | "US West N. California": "us-west-1", 5 | "US West Oregon": "us-west-2", 6 | "Africa Cape Town": "af-south-1", 7 | "Asia Pacific Hong Kong": "ap-east-1", 8 | "Asia Pacific Jakarta": "ap-southeast-3", 9 | "Asia Pacific Mumbai": "ap-south-1", 10 | "Asia Pacific Osaka": "ap-northeast-3", 11 | "Asia Pacific Seoul": "ap-northeast-2", 12 | "Asia Pacific Singapore": "ap-southeast-1", 13 | "Asia Pacific Sydney": "ap-southeast-2", 14 | "Asia Pacific Tokyo": "ap-northeast-1", 15 | "Canada Central": "ca-central-1", 16 | "Europe Frankfurt": "eu-central-1", 17 | "Europe Ireland": "eu-west-1", 18 | "Europe London": "eu-west-2", 19 | "Europe Milan": "eu-south-1", 20 | "Europe Paris": "eu-west-3", 21 | "Europe Stockholm": "eu-north-1", 22 | "Middle East Bahrain": "me-south-1", 23 | "South America Sao Paulo": "sa-east-1" 24 | } 25 | -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package cmd 16 | 17 | import ( 18 | "fmt" 19 | "os" 20 | 21 | "github.com/spf13/cobra" 22 | ) 23 | 24 | var rootCmd = &cobra.Command{ 25 | Use: "istio-cost-analyzer", 26 | Short: "Istio Cost Tooling", 27 | Run: func(cmd *cobra.Command, args []string) { 28 | fmt.Println("usage: istio-cost-analyzer analyze --targetNamespace ") 29 | }, 30 | } 31 | 32 | func Execute() { 33 | err := rootCmd.Execute() 34 | if err != nil { 35 | os.Exit(1) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /mutating-webhook/deployments/webhook-deployment.yaml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: cost-analyzer-mutating-webhook 5 | spec: 6 | replicas: 1 7 | selector: 8 | matchLabels: 9 | app: cost-analyzer-mutating-webhook 10 | template: 11 | metadata: 12 | labels: 13 | app: cost-analyzer-mutating-webhook 14 | spec: 15 | initContainers: 16 | - name: cost-analyzer-mutating-webhook-ca 17 | image: adiprerepa/cost-analyzer-mutating-webhook-ca:latest 18 | imagePullPolicy: Always 19 | volumeMounts: 20 | - mountPath: /etc/webhook/certs 21 | name: certs 22 | env: 23 | - name: MUTATE_CONFIG 24 | value: cost-analyzer-mutating-webhook-configuration 25 | - name: WEBHOOK_SERVICE 26 | value: cost-analyzer-mutating-webhook 27 | - name: WEBHOOK_NAMESPACE 28 | value: default 29 | containers: 30 | - name: cost-analyzer-mutating-webhook 31 | image: adiprerepa/cost-analyzer-mutating-webhook:latest 32 | imagePullPolicy: Always 33 | ports: 34 | - containerPort: 443 35 | volumeMounts: 36 | - name: certs 37 | mountPath: /etc/webhook/certs 38 | resources: 39 | requests: 40 | memory: "64Mi" 41 | cpu: "250m" 42 | limits: 43 | memory: "128Mi" 44 | cpu: "500m" 45 | volumes: 46 | - name: certs 47 | emptyDir: {} 48 | serviceAccountName: cost-analyzer-sa -------------------------------------------------------------------------------- /pkg/kube_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "math" 19 | "reflect" 20 | "testing" 21 | ) 22 | 23 | func TestKubeClient_CollapseLocalityCalls(t *testing.T) { 24 | k := &KubeClient{} 25 | tests := []struct { 26 | name string 27 | calls []*Call 28 | expected []*Call 29 | }{ 30 | { 31 | name: "no calls", 32 | calls: []*Call{}, 33 | expected: []*Call{}, 34 | }, 35 | { 36 | name: "collapse calls", 37 | calls: []*Call{ 38 | { 39 | From: "us-west1-b", 40 | To: "us-east1-b", 41 | CallSize: uint64(math.Pow(10, 9)), 42 | }, 43 | { 44 | From: "us-west1-b", 45 | To: "us-east1-b", 46 | CallSize: 2 * uint64(math.Pow(10, 9)), 47 | }, 48 | { 49 | From: "us-west1-a", 50 | To: "us-east1-a", 51 | CallSize: uint64(math.Pow(10, 9)), 52 | }, 53 | }, 54 | expected: []*Call{ 55 | { 56 | From: "us-west1-b", 57 | To: "us-east1-b", 58 | CallSize: 3 * uint64(math.Pow(10, 9)), 59 | }, 60 | { 61 | From: "us-west1-a", 62 | To: "us-east1-a", 63 | CallSize: uint64(math.Pow(10, 9)), 64 | }, 65 | }, 66 | }, 67 | } 68 | for _, tt := range tests { 69 | t.Run(tt.name, func(t *testing.T) { 70 | if got, _ := k.CollapseLocalityCalls(tt.calls); !reflect.DeepEqual(got, tt.expected) { 71 | t.Errorf("KubeClient.CollapseLocalityCalls() = %v, want %v", got, tt.expected) 72 | } 73 | }) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /pricing/PRICING.md: -------------------------------------------------------------------------------- 1 | # Pricing Egress 2 | 3 | The cost tool reads rates in a "flat" format, which means: 4 | 5 | ```json 6 | { 7 | "us-west1-b": { 8 | "us-west1-c": 0.05 9 | } 10 | } 11 | ``` 12 | Here, the first entry (`us-west1-b`) is the call origin, and the nested entry (`us-west1-c`) is the call 13 | destination. The value to that is the egress rate in $/GB. 14 | 15 | The cost tool pulls the flat files `aws/aws_pricing.json` and `gcp/gcp_pricing.json` from GitHub at runtime. 16 | 17 | ## Custom Pricing 18 | 19 | You can use `format_converter.go` to transform a somewhat generalized and structured egress pricing 20 | structure to the flat one (flat structures can go on for thousands of lines). To do this, put 21 | your egress pricing in the following schema: 22 | - `inter-zone-intra-region`: Across Zones within a Region 23 | - `inter-region-intra-continent`: Across Regions within a Continent 24 | - `inter-continent`: Across Continents 25 | 26 | The GCP rates exist in this format (`gcp/gcp.json`), and are converted to a flat pricing scheme that the cost 27 | analyzer can read in `gcp/gcp_rate_converter.go` (See below). The format above can also be generalized to any 28 | custom rates, as long as `gcp_rate_converter.go` is provided a file with prices in that structure. 29 | 30 | Each of these fields hold a sub-object, which holds the rates for all 31 | of the regions. **Rates are in American dollars per Gigabyte.** 32 | An example from 33 | `gcp.json` is: 34 | ```json 35 | "inter-zone-intra-region": { 36 | "us": "0.01", 37 | "northamerica": "0.01", 38 | "eu": "0.01", 39 | "asia": "0.01", 40 | "southamerica": "0.01", 41 | "australia": "0.01" 42 | } 43 | ``` 44 | This means, for example, if `us-west-1` calls `us-west-2` for `x` GB, there is an egress 45 | charge of $0.01*x. You would repeat this for `inter-region-intra-continent` and `inter-continent`. 46 | 47 | After this, you can run `format_converter.go` like so (replace `--in` and `--out` with your values): 48 | 49 | ```shell 50 | go run pricing/gcp/gcp_rate_converter.go --in pricing/gcp/gcp.json --out pricing/gcp/gcp_pricing.json 51 | ``` 52 | 53 | Where `pricing/gcp.json` holds structured rates and `pricing/gcp_pricing.json` holds outputted flat rates. -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/tetratelabs/istio-cost-analyzer 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/olekukonko/tablewriter v0.0.5 7 | github.com/prometheus/client_golang v1.12.1 8 | github.com/prometheus/common v0.32.1 9 | github.com/spf13/cobra v1.4.0 10 | istio.io/client-go v1.12.0-alpha.5.0.20220708133129-920c6070d070 11 | k8s.io/api v0.24.2 12 | k8s.io/apimachinery v0.24.2 13 | k8s.io/client-go v0.24.2 14 | ) 15 | 16 | require ( 17 | cloud.google.com/go v0.81.0 // indirect 18 | github.com/PuerkitoBio/purell v1.1.1 // indirect 19 | github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect 20 | github.com/davecgh/go-spew v1.1.1 // indirect 21 | github.com/emicklei/go-restful v2.16.0+incompatible // indirect 22 | github.com/go-logr/logr v1.2.0 // indirect 23 | github.com/go-openapi/jsonpointer v0.19.5 // indirect 24 | github.com/go-openapi/jsonreference v0.19.5 // indirect 25 | github.com/go-openapi/swag v0.19.14 // indirect 26 | github.com/gogo/protobuf v1.3.2 // indirect 27 | github.com/golang/protobuf v1.5.2 // indirect 28 | github.com/google/gnostic v0.5.7-v3refs // indirect 29 | github.com/google/gofuzz v1.1.0 // indirect 30 | github.com/imdario/mergo v0.3.5 // indirect 31 | github.com/inconshreveable/mousetrap v1.0.0 // indirect 32 | github.com/josharian/intern v1.0.0 // indirect 33 | github.com/json-iterator/go v1.1.12 // indirect 34 | github.com/mailru/easyjson v0.7.6 // indirect 35 | github.com/mattn/go-runewidth v0.0.9 // indirect 36 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 37 | github.com/modern-go/reflect2 v1.0.2 // indirect 38 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect 39 | github.com/spf13/pflag v1.0.5 // indirect 40 | golang.org/x/net v0.7.0 // indirect 41 | golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect 42 | golang.org/x/sys v0.5.0 // indirect 43 | golang.org/x/term v0.5.0 // indirect 44 | golang.org/x/text v0.7.0 // indirect 45 | golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect 46 | google.golang.org/appengine v1.6.7 // indirect 47 | google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 // indirect 48 | google.golang.org/protobuf v1.28.0 // indirect 49 | gopkg.in/inf.v0 v0.9.1 // indirect 50 | gopkg.in/yaml.v2 v2.4.0 // indirect 51 | gopkg.in/yaml.v3 v3.0.1 // indirect 52 | istio.io/api v0.0.0-20220708132629-6a4e706e0018 // indirect 53 | k8s.io/klog/v2 v2.60.1 // indirect 54 | k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect 55 | k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect 56 | sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect 57 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect 58 | sigs.k8s.io/yaml v1.2.0 // indirect 59 | ) 60 | -------------------------------------------------------------------------------- /mutating-webhook/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/tetratelabs/istio-cost-analyzer/mutating-webhook 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/stretchr/testify v1.7.0 7 | k8s.io/api v0.23.5 8 | k8s.io/apimachinery v0.23.5 9 | k8s.io/client-go v0.23.5 10 | sigs.k8s.io/controller-runtime v0.11.2 11 | ) 12 | 13 | require ( 14 | github.com/beorn7/perks v1.0.1 // indirect 15 | github.com/cespare/xxhash/v2 v2.1.1 // indirect 16 | github.com/davecgh/go-spew v1.1.1 // indirect 17 | github.com/evanphx/json-patch v4.12.0+incompatible // indirect 18 | github.com/fsnotify/fsnotify v1.5.1 // indirect 19 | github.com/go-logr/logr v1.2.0 // indirect 20 | github.com/gogo/protobuf v1.3.2 // indirect 21 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect 22 | github.com/golang/protobuf v1.5.2 // indirect 23 | github.com/google/go-cmp v0.5.5 // indirect 24 | github.com/google/gofuzz v1.1.0 // indirect 25 | github.com/google/uuid v1.1.2 // indirect 26 | github.com/googleapis/gnostic v0.5.5 // indirect 27 | github.com/imdario/mergo v0.3.12 // indirect 28 | github.com/json-iterator/go v1.1.12 // indirect 29 | github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect 30 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 31 | github.com/modern-go/reflect2 v1.0.2 // indirect 32 | github.com/pkg/errors v0.9.1 // indirect 33 | github.com/pmezard/go-difflib v1.0.0 // indirect 34 | github.com/prometheus/client_golang v1.11.1 // indirect 35 | github.com/prometheus/client_model v0.2.0 // indirect 36 | github.com/prometheus/common v0.28.0 // indirect 37 | github.com/prometheus/procfs v0.6.0 // indirect 38 | github.com/spf13/pflag v1.0.5 // indirect 39 | golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect 40 | golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect 41 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect 42 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect 43 | golang.org/x/text v0.3.8 // indirect 44 | golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect 45 | gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect 46 | google.golang.org/appengine v1.6.7 // indirect 47 | google.golang.org/protobuf v1.27.1 // indirect 48 | gopkg.in/inf.v0 v0.9.1 // indirect 49 | gopkg.in/yaml.v2 v2.4.0 // indirect 50 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect 51 | k8s.io/apiextensions-apiserver v0.23.5 // indirect 52 | k8s.io/component-base v0.23.5 // indirect 53 | k8s.io/klog/v2 v2.30.0 // indirect 54 | k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect 55 | k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect 56 | sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect 57 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect 58 | sigs.k8s.io/yaml v1.3.0 // indirect 59 | ) 60 | -------------------------------------------------------------------------------- /cmd/destroy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package cmd 16 | 17 | import ( 18 | "context" 19 | "fmt" 20 | 21 | "github.com/spf13/cobra" 22 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 23 | 24 | "github.com/tetratelabs/istio-cost-analyzer/pkg" 25 | ) 26 | 27 | var destroyOperator bool 28 | 29 | var destroyCmd = &cobra.Command{ 30 | Use: "destroy", 31 | Short: "Destroy the webhook object in kubernetes and delete the server container.", 32 | Long: "Destroying the webhook object in kubernetes and deleting the server container makes it so you don't have to manually change all the configuration", 33 | RunE: func(cmd *cobra.Command, args []string) error { 34 | kubeClient := pkg.NewAnalyzerKube(kubeconfig) 35 | // todo make config names package-wide constants 36 | // todo more visibility into errors 37 | if err := kubeClient.Client().AppsV1().Deployments(analyzerNamespace).Delete(context.TODO(), "cost-analyzer-mutating-webhook", metav1.DeleteOptions{}); err != nil { 38 | fmt.Println(err) 39 | } 40 | if err := kubeClient.Client().CoreV1().Services(analyzerNamespace).Delete(context.TODO(), "cost-analyzer-mutating-webhook", metav1.DeleteOptions{}); err != nil { 41 | fmt.Println(err) 42 | } 43 | if err := kubeClient.Client().AdmissionregistrationV1().MutatingWebhookConfigurations().Delete(context.TODO(), "cost-analyzer-mutating-webhook-configuration", metav1.DeleteOptions{}); err != nil { 44 | fmt.Println(err) 45 | } 46 | if err := kubeClient.Client().RbacV1().ClusterRoleBindings().Delete(context.TODO(), "cost-analyzer-role-binding", metav1.DeleteOptions{}); err != nil { 47 | fmt.Println(err) 48 | } 49 | if err := kubeClient.Client().RbacV1().ClusterRoles().Delete(context.TODO(), "cost-analyzer-service-role", metav1.DeleteOptions{}); err != nil { 50 | fmt.Println(err) 51 | } 52 | if err := kubeClient.Client().CoreV1().ServiceAccounts(analyzerNamespace).Delete(context.TODO(), "cost-analyzer-sa", metav1.DeleteOptions{}); err != nil { 53 | fmt.Println(err) 54 | } 55 | if destroyOperator { 56 | if operatorName == "" { 57 | var err error 58 | operatorName, err = kubeClient.GetDefaultOperator(operatorNamespace) 59 | if err != nil { 60 | fmt.Printf("not destroying operator: %v", err) 61 | return nil 62 | } 63 | } 64 | if err := kubeClient.DeleteOperatorConfig(operatorName, operatorNamespace); err != nil { 65 | fmt.Println(err) 66 | } 67 | } 68 | return nil 69 | }, 70 | } 71 | -------------------------------------------------------------------------------- /pkg/cost.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "fmt" 19 | "io" 20 | "k8s.io/apimachinery/pkg/util/json" 21 | "math" 22 | "net/http" 23 | "net/url" 24 | "os" 25 | ) 26 | 27 | type CostAnalysis struct { 28 | priceSheetPath string 29 | pricing Pricing 30 | } 31 | 32 | type Pricing map[string]map[string]float64 33 | 34 | func NewCostAnalysis(priceSheetLocation string) (*CostAnalysis, error) { 35 | pricing := Pricing{} 36 | var data []byte 37 | var err error 38 | if isValidUrl(priceSheetLocation) { 39 | resp, err := http.Get(priceSheetLocation) 40 | if err != nil { 41 | fmt.Println(err) 42 | return nil, err 43 | } 44 | defer resp.Body.Close() 45 | data, err = io.ReadAll(resp.Body) 46 | if err != nil { 47 | fmt.Println(err) 48 | return nil, err 49 | } 50 | } else { 51 | data, err = os.ReadFile(priceSheetLocation) 52 | if err != nil { 53 | fmt.Printf("unable to read file %v: %v", priceSheetLocation, err) 54 | return nil, err 55 | } 56 | } 57 | err = json.Unmarshal(data, &pricing) 58 | if err != nil { 59 | fmt.Printf("unable to unmarshal json into object: %v", err) 60 | return nil, err 61 | } 62 | return &CostAnalysis{ 63 | priceSheetPath: priceSheetLocation, 64 | pricing: pricing, 65 | }, nil 66 | } 67 | 68 | // CalculateEgress calculates the total egress costs based on the pricing structure 69 | // in the CostAnalysis object. It stores the individual call prices in the calls object, 70 | // along with returning a total cost as a float64. If an entry in calls doesn't correspond to 71 | // the actual pricing structure, the function just skips that entry, instead of returning an error. 72 | func (c *CostAnalysis) CalculateEgress(calls []*Call) (float64, error) { 73 | totalCost := 0.00 74 | fmt.Printf("calculating egress costs for %v call links\n", len(calls)) 75 | for i, v := range calls { 76 | rate, ok := c.pricing[v.From][v.To] 77 | if !ok { 78 | fmt.Printf("unable to find rate for link between %v and %v, skipping...\n", v.From, v.To) 79 | continue 80 | } 81 | // 1 byte = 10^-9 gb 82 | cost := rate * (float64(v.CallSize) * math.Pow(10, -9)) 83 | calls[i].CallCost = cost 84 | totalCost += cost 85 | } 86 | return totalCost, nil 87 | } 88 | 89 | func isValidUrl(toTest string) bool { 90 | _, err := url.ParseRequestURI(toTest) 91 | if err != nil { 92 | return false 93 | } 94 | 95 | u, err := url.Parse(toTest) 96 | if err != nil || u.Scheme == "" || u.Host == "" { 97 | return false 98 | } 99 | 100 | return true 101 | } 102 | -------------------------------------------------------------------------------- /pricing/aws/pull_aws_rate_prices.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "io" 8 | "net/http" 9 | "os" 10 | "reflect" 11 | "strconv" 12 | "strings" 13 | ) 14 | 15 | const awsUrl = "https://b0.p.awsstatic.com/pricing/2.0/meteredUnitMaps/datatransfer/USD/current/datatransfer.json?timestamp=1649448986885" 16 | 17 | /* 18 | Doesn't work for 100% for regions, probably fine for now. 19 | 20 | Use at your own risk. 21 | */ 22 | 23 | var out string 24 | 25 | func init() { 26 | flag.StringVar(&out, "out", "aws_pricing.json", "where to output pricing data") 27 | } 28 | 29 | func main() { 30 | resp, err := http.Get(awsUrl) 31 | if err != nil { 32 | fmt.Println(err) 33 | return 34 | } 35 | defer resp.Body.Close() 36 | body, err := io.ReadAll(resp.Body) 37 | if err != nil { 38 | fmt.Println(err) 39 | return 40 | } 41 | rates := map[string]interface{}{} 42 | if err := json.Unmarshal(body, &rates); err != nil { 43 | fmt.Println(err) 44 | return 45 | } 46 | regionsRefKeys := reflect.ValueOf(rates["regions"].(map[string]interface{})).MapKeys() 47 | regions := []string{} 48 | for _, v := range regionsRefKeys { 49 | regions = append(regions, v.Interface().(string)) 50 | } 51 | ri := rates["sets"].(map[string]interface{})["DataTransfer InterRegion Outbound"].([]interface{}) 52 | interRegionOutbound := []string{} 53 | for _, v := range ri { 54 | interRegionOutbound = append(interRegionOutbound, v.(string)) 55 | } 56 | regionCodes := map[string]string{} 57 | regCodes, err := os.ReadFile("aws_regions.json") 58 | if err != nil { 59 | fmt.Println(err) 60 | return 61 | } 62 | err = json.Unmarshal(regCodes, ®ionCodes) 63 | if err != nil { 64 | fmt.Println(err) 65 | return 66 | } 67 | awsRegNames := []string{} 68 | for c := range regionCodes { 69 | awsRegNames = append(awsRegNames, c) 70 | } 71 | outRates := map[string]map[string]float64{} 72 | for _, reg := range regions { 73 | for _, outB := range interRegionOutbound { 74 | costInfo, ok := rates["regions"].(map[string]interface{})[reg].(map[string]interface{})[outB] 75 | if !ok { 76 | continue 77 | } 78 | rateStr, ok := costInfo.(map[string]interface{})["price"].(string) 79 | if !ok { 80 | fmt.Printf("No price field for region %v to %v", reg, outB) 81 | continue 82 | } 83 | rate, err := strconv.ParseFloat(rateStr, 64) 84 | if err != nil { 85 | fmt.Printf("couldnt convert rate: %v", err) 86 | } 87 | outB = strings.Replace(outB, "DataTransfer InterRegion Outbound to ", "", 1) 88 | matchedReg := strings.ReplaceAll(reg, "(", "") 89 | matchedReg = strings.ReplaceAll(matchedReg, ")", "") 90 | from := MostSimilar(matchedReg, awsRegNames) 91 | to := MostSimilar(outB, awsRegNames) 92 | if _, ok := outRates[regionCodes[from]]; !ok { 93 | outRates[regionCodes[from]] = map[string]float64{} 94 | } 95 | outRates[regionCodes[from]][regionCodes[to]] = rate 96 | } 97 | } 98 | output, err := json.MarshalIndent(outRates, "", " ") 99 | if err != nil { 100 | fmt.Println(err) 101 | return 102 | } 103 | os.Remove(out) 104 | f, err := os.Create(out) 105 | if err != nil { 106 | fmt.Println(err) 107 | return 108 | } 109 | fmt.Printf("outputting data to %v\n", out) 110 | _, _ = f.Write(output) 111 | } 112 | 113 | func MostSimilar(want string, cont []string) string { 114 | maxScore := -1 115 | maxCont := "" 116 | for _, c := range cont { 117 | partsC := strings.Split(c, " ") 118 | partsW := strings.Split(want, " ") 119 | score := 0 120 | for _, w := range partsW { 121 | for _, pc := range partsC { 122 | if w == pc { 123 | score++ 124 | } 125 | } 126 | } 127 | if score > maxScore { 128 | maxScore = score 129 | maxCont = c 130 | } 131 | } 132 | return maxCont 133 | } 134 | -------------------------------------------------------------------------------- /pricing/gcp/gcp_rate_converter.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "flag" 6 | "fmt" 7 | "os" 8 | "strconv" 9 | "strings" 10 | ) 11 | 12 | /* 13 | Use at your own risk. 14 | */ 15 | 16 | var ( 17 | outputFile string 18 | inputFile string 19 | ) 20 | 21 | type PricingGCP struct { 22 | InterZone map[string]interface{} `json:"inter-zone-intra-region"` 23 | InterRegion map[string]interface{} `json:"inter-region-intra-continent"` 24 | InterContinent map[string]interface{} `json:"inter-continent"` 25 | } 26 | 27 | func init() { 28 | flag.StringVar(&outputFile, "out", "default_pricing.json", "file to output transformed data") 29 | flag.StringVar(&inputFile, "in", "pricing.json", "input data") 30 | flag.Parse() 31 | } 32 | 33 | func main() { 34 | gcpRegions := map[string]string{ 35 | `asia-east1`: `abc`, 36 | `asia-east2`: `abc`, 37 | `asia-northeast1`: `abc`, 38 | `asia-northeast2`: `abc`, 39 | `asia-northeast3`: `abc`, 40 | `asia-south1`: `abc`, 41 | `asia-southeast1`: `abc`, 42 | `australia-southeast1`: `abc`, 43 | `europe-north1`: `abc`, 44 | `europe-west1`: `bcd`, 45 | `europe-west2`: `abc`, 46 | `europe-west3`: `abc`, 47 | `europe-west4`: `abc`, 48 | `europe-west6`: `abc`, 49 | `northamerica-northeast1`: `abc`, 50 | `southamerica-east1`: `abc`, 51 | `us-central1`: `abcf`, 52 | `us-east1`: `bcd`, 53 | `us-east4`: `abc`, 54 | `us-west1`: `abc`, 55 | `us-west2`: `abc`, 56 | `us-west3`: `abc`, 57 | } 58 | // if uc-central1, also zone f 59 | structuredPricing := PricingGCP{} 60 | data, err := os.ReadFile(inputFile) 61 | if err != nil { 62 | fmt.Printf("unable to read file %v: %v", inputFile, err) 63 | return 64 | } 65 | err = json.Unmarshal(data, &structuredPricing) 66 | if err != nil { 67 | fmt.Printf("unable to unmarshal json into object: %v", err) 68 | return 69 | } 70 | flatPricing := map[string]map[string]float64{} 71 | localities := make([]string, 0) 72 | for k, v := range gcpRegions { 73 | zones := []rune(v) 74 | // nolint 75 | for _, z := range zones { 76 | locality := k + "-" + string(z) 77 | localities = append(localities, locality) 78 | } 79 | } 80 | for _, v := range localities { 81 | flatPricing[v] = make(map[string]float64) 82 | } 83 | for _, from := range localities { 84 | for _, to := range localities { 85 | rateStr := "" 86 | if GetContinent(from) == GetContinent(to) { 87 | if GetRegion(from) == GetRegion(to) { 88 | if GetZone(from) == GetZone(to) { 89 | flatPricing[from][to] = 0 90 | continue 91 | } else { 92 | drI := structuredPricing.InterZone[GetContinent(to)] 93 | rateStr, _ = drI.(string) 94 | } 95 | } else { 96 | drI := structuredPricing.InterRegion[GetContinent(to)] 97 | rateStr, _ = drI.(string) 98 | } 99 | } else { 100 | drI := structuredPricing.InterContinent[GetContinent(to)] 101 | rateStr, _ = drI.(string) 102 | } 103 | rate, err := strconv.ParseFloat(rateStr, 64) 104 | if err != nil { 105 | fmt.Printf("cannot parse rate:%v\n", err) 106 | } 107 | flatPricing[from][to] = rate 108 | } 109 | } 110 | jsonStr, err := json.MarshalIndent(flatPricing, "", " ") 111 | if err != nil { 112 | fmt.Println(err) 113 | } 114 | _ = os.Remove(outputFile) 115 | f, err := os.Create(outputFile) 116 | if err != nil { 117 | fmt.Println(err) 118 | } 119 | defer f.Close() 120 | _, err = f.Write(jsonStr) 121 | if err != nil { 122 | fmt.Println(err) 123 | } 124 | } 125 | 126 | func GetContinent(region string) string { 127 | return strings.Split(region, "-")[0] 128 | } 129 | 130 | func GetRegion(region string) string { 131 | return strings.Split(region, "-")[1] 132 | } 133 | 134 | func GetZone(region string) string { 135 | return strings.Split(region, "-")[2] 136 | } 137 | -------------------------------------------------------------------------------- /.github/workflows/commit.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Tetrate 2 | # Licensed under the Apache License, Version 2.0 (the "License") 3 | 4 | name: "commit" 5 | 6 | on: 7 | push: 8 | branches: 9 | - master 10 | paths-ignore: 11 | - "**/*.md" 12 | - "**/*.png" 13 | pull_request: 14 | branches: 15 | - master 16 | paths-ignore: 17 | - "**/*.md" 18 | - "**/*.png" 19 | 20 | # Allows triggering the workflow manually in github actions page. 21 | workflow_dispatch: 22 | 23 | defaults: 24 | run: # use bash for all operating systems unless overridden 25 | shell: bash 26 | 27 | jobs: 28 | check: 29 | name: check 30 | runs-on: ubuntu-20.04 31 | timeout-minutes: 90 # instead of 360 by default. 32 | strategy: 33 | fail-fast: false # don't fail fast as sometimes failures are operating system specific 34 | steps: 35 | - name: Cancel when duplicated 36 | uses: styfle/cancel-workflow-action@0.9.1 37 | with: 38 | access_token: ${{ github.token }} 39 | 40 | - name: Checkout 41 | uses: actions/checkout@v2 # shallow checkout. 42 | 43 | - name: Setup Go 44 | uses: actions/setup-go@v2 45 | with: 46 | go-version: "1.17.x" 47 | 48 | - name: Download cache for Tools 49 | uses: actions/cache@v2 50 | with: 51 | path: ./.cache/tools 52 | # Downloading cached tools needs to use an exact key, since we 53 | # currently don't do versioning for each cached binary. 54 | key: ${{ runner.os }}-check-tools-${{ hashFiles('Tools.mk') }} 55 | 56 | - name: Download cache for Go 57 | uses: actions/cache@v2 58 | with: 59 | path: ~/go/pkg/mod 60 | # When we update Tools.mk, there is a possibility we download a new Go dependencies. 61 | key: ${{ runner.os }}-check-go-${{ hashFiles('go.mod', 'go.sum', 'Tools.mk') }} 62 | restore-keys: ${{ runner.os }}-check-go 63 | 64 | - name: Get Linter cache key 65 | run: | 66 | echo "::set-output name=name::$(/bin/date -u "+%Y%m%d")" 67 | id: get-linter-cache-key 68 | # We cache golangci-lint run per day. 69 | - name: Download cache for Linter 70 | uses: actions/cache@v2 71 | with: 72 | path: ./.cache/golangci-lint 73 | key: ${{ runner.os }}-golangci-lint-${{ hashFiles('go.mod') }}-${{ steps.get-linter-cache-key.outputs.name }} 74 | restore-keys: ${{ runner.os }}-golangci-lint- 75 | 76 | - name: Check 77 | run: make check # `make check` does all the necessary checks. 78 | 79 | test: 80 | needs: check 81 | name: test 82 | runs-on: ubuntu-20.04 83 | timeout-minutes: 90 # instead of 360 by default. 84 | strategy: 85 | fail-fast: false # don't fail fast as sometimes failures are operating system specific 86 | 87 | steps: 88 | - name: Cancel when duplicated 89 | uses: styfle/cancel-workflow-action@0.4.1 90 | with: 91 | access_token: ${{ github.token }} 92 | 93 | - name: Checkout 94 | uses: actions/checkout@v2 # shallow checkout. 95 | 96 | - name: Setup Go 97 | uses: actions/setup-go@v2 98 | with: 99 | go-version: "1.17.x" 100 | 101 | - name: Download cache for Tools 102 | uses: actions/cache@v2 103 | with: 104 | path: ./.cache/tools 105 | # Downloading cached tools needs to use an exact key, since we 106 | # currently don't do versioning for each cached binary. 107 | key: ${{ runner.os }}-tools-${{ hashFiles('Tools.mk') }} 108 | 109 | - name: Download cache for Go 110 | uses: actions/cache@v2 111 | with: 112 | path: ~/go/pkg/mod 113 | # When we update Tools.mk, there is a possibility we download a new Go dependencies. 114 | key: ${{ runner.os }}-go-${{ hashFiles('go.mod', 'go.sum', 'Tools.mk') }} 115 | restore-keys: ${{ runner.os }}-go 116 | 117 | - name: Test and build 118 | run: make test build 119 | -------------------------------------------------------------------------------- /pkg/call.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "fmt" 19 | "github.com/olekukonko/tablewriter" 20 | "math" 21 | "os" 22 | "sort" 23 | ) 24 | 25 | type Call struct { 26 | From string 27 | FromWorkload string 28 | To string 29 | ToWorkload string 30 | CallCost float64 31 | CallSize uint64 32 | } 33 | 34 | func (c *Call) String() string { 35 | return fmt.Sprintf("%v (%v)->%v (%v) : %v", c.FromWorkload, c.From, c.ToWorkload, c.To, c.CallSize) 36 | } 37 | 38 | func (c *Call) StringCost() string { 39 | return fmt.Sprintf("%v (%v)->%v (%v) : $%v", c.FromWorkload, c.From, c.ToWorkload, c.To, c.CallCost) 40 | } 41 | 42 | func PrintCostTable(calls []*Call, total float64, details bool) { 43 | // print total 44 | fmt.Printf("\nTotal: %s\n\n", transformCost(total)) 45 | if !details { 46 | printMinifiedCostTable(calls) 47 | return 48 | } 49 | // sort by cost 50 | sort.Slice(calls, func(i, j int) bool { 51 | return calls[i].CallCost > calls[j].CallCost 52 | }) 53 | table := tablewriter.NewWriter(os.Stdout) 54 | headers := []string{"Source Service", "Source Locality", "Destination Service", "Destination Locality", "Transferred (MB)", "Cost"} 55 | table.SetHeader(headers) 56 | for _, v := range calls { 57 | values := []string{v.FromWorkload, v.From, v.ToWorkload, v.To, fmt.Sprintf("%f", float64(v.CallSize)/math.Pow(10, 6)), transformCost(v.CallCost)} 58 | table.Append(values) 59 | } 60 | kubernetesify(table) 61 | table.Render() 62 | fmt.Println() 63 | } 64 | 65 | func printMinifiedCostTable(calls []*Call) { 66 | callBySource := make(map[string]Call) 67 | for i, v := range calls { 68 | if srcCall, ok := callBySource[v.FromWorkload]; !ok { 69 | callBySource[v.FromWorkload] = *calls[i] 70 | } else { 71 | srcCall.CallCost += callBySource[v.FromWorkload].CallCost 72 | } 73 | } 74 | callSlice := make([]Call, 0) 75 | for _, v := range callBySource { 76 | callSlice = append(callSlice, v) 77 | } 78 | // order by cost 79 | sort.Slice(callSlice, func(i, j int) bool { 80 | return callSlice[i].CallCost > callSlice[j].CallCost 81 | }) 82 | // print 83 | table := tablewriter.NewWriter(os.Stdout) 84 | headers := []string{"Source Service", "Source Locality", "Cost"} 85 | table.SetHeader(headers) 86 | for _, v := range callSlice { 87 | values := []string{v.FromWorkload, v.From, transformCost(v.CallCost)} 88 | table.Append(values) 89 | } 90 | kubernetesify(table) 91 | table.Render() 92 | fmt.Println() 93 | } 94 | 95 | func transformCost(cost float64) string { 96 | costStr := fmt.Sprintf("$%.2f", cost) 97 | if cost < 0.01 { 98 | costStr = "<$0.01" 99 | } 100 | if cost == 0 { 101 | costStr = "-" 102 | } 103 | return costStr 104 | } 105 | 106 | func kubernetesify(table *tablewriter.Table) { 107 | table.SetAutoWrapText(false) 108 | table.SetAutoFormatHeaders(true) 109 | table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) 110 | table.SetAlignment(tablewriter.ALIGN_LEFT) 111 | table.SetCenterSeparator("") 112 | table.SetColumnSeparator("") 113 | table.SetRowSeparator("") 114 | table.SetHeaderLine(false) 115 | table.SetBorder(false) 116 | table.SetTablePadding("\t") // pad with tabs 117 | table.SetNoWhiteSpace(true) 118 | table.SetBorder(false) 119 | } 120 | 121 | // PodCall represents raw pod data, not containing locality or cost information. 122 | type PodCall struct { 123 | FromPod string 124 | FromNamespace string 125 | FromWorkload string 126 | ToPod string 127 | ToWorkload string 128 | ToNamespace string 129 | CallSize uint64 130 | } 131 | -------------------------------------------------------------------------------- /pkg/cost_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "math" 19 | "reflect" 20 | "testing" 21 | ) 22 | 23 | func TestNewCostAnalysis(t *testing.T) { 24 | tests := []struct { 25 | name string 26 | priceLocation string 27 | expected *CostAnalysis 28 | expectedError bool 29 | }{ 30 | { 31 | name: "blank", 32 | priceLocation: "", 33 | expected: nil, 34 | expectedError: true, 35 | }, 36 | { 37 | name: "nonexistent price path", 38 | priceLocation: "testdata/i_dont_exist.json", 39 | expected: nil, 40 | expectedError: true, 41 | }, 42 | { 43 | name: "malformed json local", 44 | priceLocation: "testdata/im_not_json.json", 45 | expected: nil, 46 | expectedError: true, 47 | }, 48 | { 49 | name: "valid local pricing", 50 | priceLocation: "testdata/valid_pricing.json", 51 | expected: &CostAnalysis{ 52 | priceSheetPath: "testdata/valid_pricing.json", 53 | pricing: Pricing{ 54 | "us-west1-a": { 55 | "us-west1-b": 0.01, 56 | }, 57 | "us-west1-b": { 58 | "us-west1-a": 0.01, 59 | }, 60 | }, 61 | }, 62 | }, 63 | { 64 | name: "nonexistent url", 65 | priceLocation: "https://idontexistforsure.nope/elmo.json", 66 | expected: nil, 67 | expectedError: true, 68 | }, 69 | { 70 | name: "invalid remote pricing", 71 | priceLocation: "https://raw.githubusercontent.com/tetratelabs/istio-cost-analyzer/cost-unit-tests/pkg/testdata/im_not_json.json", 72 | expected: nil, 73 | expectedError: true, 74 | }, 75 | { 76 | name: "valid remote pricing", 77 | priceLocation: "https://raw.githubusercontent.com/tetratelabs/istio-cost-analyzer/cost-unit-tests/pkg/testdata/valid_pricing.json", 78 | expected: &CostAnalysis{ 79 | priceSheetPath: "https://raw.githubusercontent.com/tetratelabs/istio-cost-analyzer/cost-unit-tests/pkg/testdata/valid_pricing.json", 80 | pricing: Pricing{ 81 | "us-west1-a": { 82 | "us-west1-b": 0.01, 83 | }, 84 | "us-west1-b": { 85 | "us-west1-a": 0.01, 86 | }, 87 | }, 88 | }, 89 | expectedError: false, 90 | }, 91 | } 92 | for _, tt := range tests { 93 | t.Run(tt.name, func(t *testing.T) { 94 | if ca, err := NewCostAnalysis(tt.priceLocation); ((err != nil) != tt.expectedError) || !reflect.DeepEqual(ca, tt.expected) { 95 | t.Errorf("expected error existence: %v => (%v), expected CostAnalysis object %v => (%v)", tt.expectedError, err != nil, tt.expected, ca) 96 | } 97 | }) 98 | } 99 | } 100 | 101 | func TestCostAnalysis_CalculateEgress(t *testing.T) { 102 | tests := []struct { 103 | name string 104 | callsWithPrice []*Call 105 | expectedTotal float64 106 | expectedError bool 107 | }{ 108 | { 109 | name: "empty calls", 110 | callsWithPrice: make([]*Call, 0), 111 | expectedTotal: 0.00, 112 | expectedError: false, 113 | }, 114 | { 115 | name: "non-existent regions", 116 | callsWithPrice: []*Call{ 117 | { 118 | From: "us-east1-b", 119 | To: "us-west1-b", 120 | CallSize: uint64(math.Pow(10, 9)), 121 | }, 122 | }, 123 | expectedTotal: 0.00, 124 | expectedError: false, 125 | }, 126 | { 127 | name: "legit prices", 128 | callsWithPrice: []*Call{ 129 | { 130 | From: "us-west1-b", 131 | To: "us-east1-b", 132 | CallSize: uint64(math.Pow(10, 9)), 133 | CallCost: 0.9, 134 | }, 135 | { 136 | From: "us-west1-b", 137 | To: "us-west1-c", 138 | CallSize: uint64(math.Pow(10, 9)), 139 | CallCost: 0.5, 140 | }, 141 | }, 142 | expectedTotal: 1.4, 143 | expectedError: false, 144 | }, 145 | } 146 | ca := &CostAnalysis{ 147 | pricing: Pricing{ 148 | "us-west1-b": { 149 | "us-west1-c": 0.5, 150 | "us-east1-b": 0.9, 151 | }, 152 | }, 153 | } 154 | for _, tt := range tests { 155 | t.Run(tt.name, func(t *testing.T) { 156 | strippedCalls := make([]*Call, 0) 157 | for _, v := range tt.callsWithPrice { 158 | stripped := *v 159 | stripped.CallCost = 0.00 160 | strippedCalls = append(strippedCalls, &stripped) 161 | } 162 | total, err := ca.CalculateEgress(strippedCalls) 163 | if total != tt.expectedTotal || (err != nil) != tt.expectedError || 164 | !reflect.DeepEqual(tt.callsWithPrice, strippedCalls) { 165 | t.Errorf("expected err (%v)=>%v, expected total (%v)=>%v, expected pricing (%v)=>%v\n", 166 | tt.expectedError, err != nil, tt.expectedTotal, total, tt.callsWithPrice, strippedCalls) 167 | } 168 | }) 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Istio Cost Analyzer 2 | 3 | The Istio Cost Analyzer is a tool that allows you to analyze the costliest workload links in your cluster. It relies on Kubernetes/Istio and Prometheus to gather 4 | data, and uses publicly-available cloud egress rates to estimate the overall egress costs of your services. 5 | 6 | ## Usage 7 | 8 | To use this on your kubernetes cluster, make sure you have a kubeconfig in your home directory, and make sure Istio is installed on your cluster, with the prometheus addon enabled. You must also have a `HEALTHY` Istio Operator available. 9 | 10 | 11 | ### Installation 12 | 13 | To install the `istio-cost-analyzer` binary: 14 | 15 | ```shell 16 | go install github.com/tetratelabs/istio-cost-analyzer@latest 17 | ``` 18 | 19 | ### Setup 20 | 21 | The setup command does a few things: 22 | - Edits Istio Operator config to add custom prometheus metrics (a `destination_locality` label on an Istio metric). 23 | - Creates a Mutating Webhook that gets called when a new deployment is created. This mutating webhook runs in a pod and has associated RBAC permissions, Services, etc. 24 | - Labels existing pods & deployments in said `--targetNamespace`. 25 | 26 | You can either run the following command and have a webhook handle everything all existing Deployments and all Deployments created in the future: 27 | 28 | ``` 29 | istio-cost-analyzer setup 30 | ``` 31 | 32 | | Flag | Description | Default Value | 33 | |:------------------|:---------------------------------------------------------------------------------------------------------------------:|------------------------:| 34 | | targetNamespace | Namespace which the cost analyzer will watch/analyze | `default` | 35 | | analyzeAll (`-a`) | Adding this flag will cause the cost analyzer to analyze all namespaces. Don't set this if you set `targetNamespace`. | `false` | 36 | | cloud | Cloud on which your cluster is running (node info varies cloud to cloud -- inferred from Node info) | Inferred from Node info | 37 | | analyzerNamespace | Namespace in which cost analyzer config will exist (you usually don't need to set this) | `istio-system` | 38 | 39 | 40 | ## Running 41 | 42 | Run: 43 | 44 | ``` 45 | istio-cost-analyzer analyze 46 | ``` 47 | 48 | | Flag | Description | Default Value | 49 | |:--------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------:| 50 | | cloud | Cloud on which your cluster is running (node info varies cloud to cloud). Options are `gcp` or `aws`. If you are on GCP or AWS, you don't need to set this as it is inferred. | Inferred from Node info | 51 | | prometheusNamespace | Namespace in which the prometheus pod exists (you usually don't need to set this) | `istio-system` | 52 | | pricePath | For non-standard aws/gcp rates (on-prem, negotiated rates). If you set this, you don't need to set `cloud`. See `/pricing` (you usually don't need to set this) | None | 53 | | details | Extended table view that shows both destination and source workload/locality, instead of just source. | `false` | 54 | | start | RFC3999 UTC timestamp that indicates from when to start analyzing data. | 0 (beginning) | 55 | | end | RFC3999 UTC timestamp that indicates to when to stop analyzing data. | `time.Now()` | 56 | 57 | 58 | The output should look like (without `--details`): 59 | 60 | ``` 61 | Total: <$0.01 62 | 63 | SOURCE WORKLOAD SOURCE LOCALITY COST 64 | productpage-v1 us-west1-b <$0.01 65 | reviews-v2 us-west1-b - 66 | reviews-v3 us-west1-b - 67 | ``` 68 | With `--details`: 69 | 70 | ``` 71 | Total: <$0.01 72 | 73 | SOURCE WORKLOAD SOURCE LOCALITY DESTINATION WORKLOAD DESTINATION LOCALITY TRANSFERRED (MB) COST 74 | productpage-v1 us-west1-b details-v1 us-west1-c 0.173250 <$0.01 75 | productpage-v1 us-west1-b reviews-v1 us-west1-b 0.058500 - 76 | productpage-v1 us-west1-b reviews-v2 us-west1-b 0.056250 - 77 | productpage-v1 us-west1-b reviews-v3 us-west1-b 0.058500 - 78 | reviews-v2 us-west1-b ratings-v1 us-west1-b 0.056150 - 79 | reviews-v3 us-west1-b ratings-v1 us-west1-b 0.058400 - 80 | ``` 81 | 82 | ### Cleanup 83 | 84 | If you want to restart installation of the tool or don't want it in your cluster anymore, you can run: 85 | 86 | ``` 87 | istio-cost-analyzer destroy 88 | ``` 89 | 90 | You must set the `--analyzerNamespace` flag if you set it in the `setup` command. 91 | 92 | You must also edit your Istio Operator config to remove the custom prometheus metrics. (you can use `-o` to do that here, but it's unstable) 93 | 94 | 95 | 96 | 97 | - add for latency: -------------------------------------------------------------------------------- /mutating-webhook/cmd/mutating-webhook/testdata/admission-webhook.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "AdmissionReview", 3 | "apiVersion": "admission.k8s.io/v1beta1", 4 | "request": { 5 | "uid": "dffc1f0f-0c0b-4d15-892f-71524ecfd06c", 6 | "kind": { 7 | "group": "", 8 | "version": "v1", 9 | "kind": "Pod" 10 | }, 11 | "resource": { 12 | "group": "", 13 | "version": "v1", 14 | "resource": "pods" 15 | }, 16 | "requestKind": { 17 | "group": "", 18 | "version": "v1", 19 | "kind": "Pod" 20 | }, 21 | "requestResource": { 22 | "group": "", 23 | "version": "v1", 24 | "resource": "pods" 25 | }, 26 | "name": "demo-pod", 27 | "namespace": "default", 28 | "operation": "CREATE", 29 | "userInfo": { 30 | "username": "kubernetes-admin", 31 | "groups": [ 32 | "system:masters", 33 | "system:authenticated" 34 | ] 35 | }, 36 | "object": { 37 | "kind": "Pod", 38 | "apiVersion": "v1", 39 | "metadata": { 40 | "name": "demo-pod", 41 | "namespace": "default", 42 | "creationTimestamp": null, 43 | "labels": { 44 | "example-webhook-enabled": "true" 45 | }, 46 | "annotations": { 47 | "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Pod\",\"metadata\":{\"annotations\":{},\"labels\":{\"example-webhook-enabled\":\"true\"},\"name\":\"demo-pod\",\"namespace\":\"default\"},\"spec\":{\"containers\":[{\"image\":\"nginx\",\"name\":\"nginx\"}]}}\n" 48 | }, 49 | "managedFields": [ 50 | { 51 | "manager": "kubectl.exe", 52 | "operation": "Update", 53 | "apiVersion": "v1", 54 | "time": "2021-04-14T07:47:56Z", 55 | "fieldsType": "FieldsV1", 56 | "fieldsV1": { 57 | "f:metadata": { 58 | "f:annotations": { 59 | ".": {}, 60 | "f:kubectl.kubernetes.io/last-applied-configuration": {} 61 | }, 62 | "f:labels": { 63 | ".": {}, 64 | "f:example-webhook-enabled": {} 65 | } 66 | }, 67 | "f:spec": { 68 | "f:containers": { 69 | "k:{\"name\":\"nginx\"}": { 70 | ".": {}, 71 | "f:image": {}, 72 | "f:imagePullPolicy": {}, 73 | "f:name": {}, 74 | "f:resources": {}, 75 | "f:terminationMessagePath": {}, 76 | "f:terminationMessagePolicy": {} 77 | } 78 | }, 79 | "f:dnsPolicy": {}, 80 | "f:enableServiceLinks": {}, 81 | "f:restartPolicy": {}, 82 | "f:schedulerName": {}, 83 | "f:securityContext": {}, 84 | "f:terminationGracePeriodSeconds": {} 85 | } 86 | } 87 | } 88 | ] 89 | }, 90 | "spec": { 91 | "volumes": [ 92 | { 93 | "name": "default-token-4fzpv", 94 | "secret": { 95 | "secretName": "default-token-4fzpv" 96 | } 97 | } 98 | ], 99 | "containers": [ 100 | { 101 | "name": "nginx", 102 | "image": "nginx", 103 | "resources": {}, 104 | "volumeMounts": [ 105 | { 106 | "name": "default-token-4fzpv", 107 | "readOnly": true, 108 | "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" 109 | } 110 | ], 111 | "terminationMessagePath": "/dev/termination-log", 112 | "terminationMessagePolicy": "File", 113 | "imagePullPolicy": "Always" 114 | } 115 | ], 116 | "restartPolicy": "Always", 117 | "terminationGracePeriodSeconds": 30, 118 | "dnsPolicy": "ClusterFirst", 119 | "serviceAccountName": "default", 120 | "serviceAccount": "default", 121 | "securityContext": {}, 122 | "schedulerName": "default-scheduler", 123 | "tolerations": [ 124 | { 125 | "key": "node.kubernetes.io/not-ready", 126 | "operator": "Exists", 127 | "effect": "NoExecute", 128 | "tolerationSeconds": 300 129 | }, 130 | { 131 | "key": "node.kubernetes.io/unreachable", 132 | "operator": "Exists", 133 | "effect": "NoExecute", 134 | "tolerationSeconds": 300 135 | } 136 | ], 137 | "priority": 0, 138 | "enableServiceLinks": true, 139 | "preemptionPolicy": "PreemptLowerPriority" 140 | }, 141 | "status": {} 142 | }, 143 | "oldObject": null, 144 | "dryRun": false, 145 | "options": { 146 | "kind": "CreateOptions", 147 | "apiVersion": "meta.k8s.io/v1" 148 | } 149 | } 150 | } -------------------------------------------------------------------------------- /mutating-webhook/cmd/mutating-webhook-ca/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | cryptorand "crypto/rand" 7 | "crypto/rsa" 8 | "crypto/x509" 9 | "crypto/x509/pkix" 10 | "encoding/pem" 11 | "flag" 12 | "log" 13 | "math/big" 14 | "os" 15 | "path" 16 | "strings" 17 | "time" 18 | 19 | admissionregistrationv1 "k8s.io/api/admissionregistration/v1" 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/client-go/kubernetes" 22 | ctrl "sigs.k8s.io/controller-runtime" 23 | ) 24 | 25 | func main() { 26 | outputDir := flag.String("output-dir", "", "The output directory to write the generated certificate files to.") 27 | flag.Parse() 28 | var ( 29 | webhookNamespace, _ = os.LookupEnv("WEBHOOK_NAMESPACE") 30 | mutationCfgName, _ = os.LookupEnv("MUTATE_CONFIG") 31 | webhookService, _ = os.LookupEnv("WEBHOOK_SERVICE") 32 | ) 33 | log.Printf("webhookNamespace: %s, mutationCfgName: %s", webhookNamespace, mutationCfgName) 34 | if webhookNamespace == "" { 35 | webhookNamespace = "istio-system" 36 | } 37 | config := ctrl.GetConfigOrDie() 38 | kubeClient, err := kubernetes.NewForConfig(config) 39 | if err != nil { 40 | panic("failed to set go -client") 41 | } 42 | org := "tetrate.io" 43 | dnsNames := []string{"cost-analyzer-mutating-webhook", 44 | "cost-analyzer-mutating-webhook." + webhookNamespace, "cost-analyzer-mutating-webhook." + webhookNamespace + ".svc"} 45 | commonName := "cost-analyzer-mutating-webhook." + webhookNamespace + ".svc" 46 | caPEM, certPEM, certKeyPEM, err := generateCert([]string{org}, dnsNames, commonName) 47 | if err != nil { 48 | log.Fatalf("unable to generate cert: %v", err) 49 | } 50 | log.Println(*outputDir) 51 | err = os.MkdirAll(*outputDir, 0666) 52 | if err != nil { 53 | log.Panic(err) 54 | } 55 | err = WriteFile(path.Join(*outputDir, "tls.crt"), certPEM) 56 | if err != nil { 57 | log.Fatal(err) 58 | } 59 | err = WriteFile(path.Join(*outputDir, "tls.key"), certKeyPEM) 60 | if err != nil { 61 | log.Fatal(err) 62 | } 63 | path := "/mutate" 64 | fail := admissionregistrationv1.Fail 65 | sf := admissionregistrationv1.SideEffectClassNone 66 | mutateconfig := &admissionregistrationv1.MutatingWebhookConfiguration{ 67 | ObjectMeta: metav1.ObjectMeta{ 68 | Name: mutationCfgName, 69 | }, 70 | Webhooks: []admissionregistrationv1.MutatingWebhook{{ 71 | Name: "mutating-webhook.istio-cost-analyzer.io", 72 | ClientConfig: admissionregistrationv1.WebhookClientConfig{ 73 | CABundle: caPEM.Bytes(), // CA bundle created earlier 74 | Service: &admissionregistrationv1.ServiceReference{ 75 | Name: webhookService, 76 | Namespace: webhookNamespace, 77 | Path: &path, 78 | }, 79 | }, 80 | Rules: []admissionregistrationv1.RuleWithOperations{{Operations: []admissionregistrationv1.OperationType{ 81 | admissionregistrationv1.Create, admissionregistrationv1.Connect}, 82 | Rule: admissionregistrationv1.Rule{ 83 | APIGroups: []string{"apps"}, 84 | APIVersions: []string{"v1"}, 85 | Resources: []string{"deployments"}, 86 | }, 87 | }}, 88 | FailurePolicy: &fail, 89 | SideEffects: &sf, 90 | AdmissionReviewVersions: []string{"v1"}, 91 | NamespaceSelector: &metav1.LabelSelector{ 92 | MatchLabels: map[string]string{ 93 | "cost-analyzer-analysis-enabled": "true", 94 | }, 95 | }, 96 | }}, 97 | } 98 | 99 | if _, err := kubeClient.AdmissionregistrationV1().MutatingWebhookConfigurations().Create(context.Background(), mutateconfig, metav1.CreateOptions{}); err != nil { 100 | if !strings.Contains(err.Error(), "already exists") { 101 | panic(err) 102 | } 103 | } 104 | } 105 | 106 | // generateCert generate a self-signed CA for given organization 107 | // and sign certificate with the CA for given common name and dns names 108 | // it resurns the CA, certificate and private key in PEM format 109 | func generateCert(orgs, dnsNames []string, commonName string) (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error) { 110 | // init CA config 111 | ca := &x509.Certificate{ 112 | SerialNumber: big.NewInt(2022), 113 | Subject: pkix.Name{Organization: orgs}, 114 | NotBefore: time.Now(), 115 | NotAfter: time.Now().AddDate(1, 0, 0), // expired in 1 year 116 | IsCA: true, 117 | ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, 118 | KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, 119 | BasicConstraintsValid: true, 120 | } 121 | 122 | // generate private key for CA 123 | caPrivateKey, err := rsa.GenerateKey(cryptorand.Reader, 4096) 124 | if err != nil { 125 | return nil, nil, nil, err 126 | } 127 | 128 | // create the CA certificate 129 | caBytes, err := x509.CreateCertificate(cryptorand.Reader, ca, ca, &caPrivateKey.PublicKey, caPrivateKey) 130 | if err != nil { 131 | return nil, nil, nil, err 132 | } 133 | 134 | // CA certificate with PEM encoded 135 | caPEM := new(bytes.Buffer) 136 | _ = pem.Encode(caPEM, &pem.Block{ 137 | Type: "CERTIFICATE", 138 | Bytes: caBytes, 139 | }) 140 | 141 | // new certificate config 142 | newCert := &x509.Certificate{ 143 | DNSNames: dnsNames, 144 | SerialNumber: big.NewInt(1024), 145 | Subject: pkix.Name{ 146 | CommonName: commonName, 147 | Organization: orgs, 148 | }, 149 | NotBefore: time.Now(), 150 | NotAfter: time.Now().AddDate(1, 0, 0), // expired in 1 year 151 | ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, 152 | KeyUsage: x509.KeyUsageDigitalSignature, 153 | } 154 | 155 | // generate new private key 156 | newPrivateKey, err := rsa.GenerateKey(cryptorand.Reader, 4096) 157 | if err != nil { 158 | return nil, nil, nil, err 159 | } 160 | 161 | // sign the new certificate 162 | newCertBytes, err := x509.CreateCertificate(cryptorand.Reader, newCert, ca, &newPrivateKey.PublicKey, caPrivateKey) 163 | if err != nil { 164 | return nil, nil, nil, err 165 | } 166 | 167 | // new certificate with PEM encoded 168 | newCertPEM := new(bytes.Buffer) 169 | _ = pem.Encode(newCertPEM, &pem.Block{ 170 | Type: "CERTIFICATE", 171 | Bytes: newCertBytes, 172 | }) 173 | 174 | // new private key with PEM encoded 175 | newPrivateKeyPEM := new(bytes.Buffer) 176 | _ = pem.Encode(newPrivateKeyPEM, &pem.Block{ 177 | Type: "RSA PRIVATE KEY", 178 | Bytes: x509.MarshalPKCS1PrivateKey(newPrivateKey), 179 | }) 180 | 181 | return caPEM, newCertPEM, newPrivateKeyPEM, nil 182 | } 183 | 184 | // WriteFile writes data in the file at the given path 185 | func WriteFile(filepath string, sCert *bytes.Buffer) error { 186 | f, err := os.Create(filepath) 187 | if err != nil { 188 | return err 189 | } 190 | defer f.Close() 191 | 192 | _, err = f.Write(sCert.Bytes()) 193 | if err != nil { 194 | return err 195 | } 196 | return nil 197 | } 198 | -------------------------------------------------------------------------------- /cmd/analyze.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package cmd 16 | 17 | import ( 18 | "errors" 19 | "fmt" 20 | "os" 21 | "path/filepath" 22 | "strings" 23 | "time" 24 | 25 | "github.com/spf13/cobra" 26 | _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" 27 | "k8s.io/client-go/util/homedir" 28 | 29 | "github.com/tetratelabs/istio-cost-analyzer/pkg" 30 | ) 31 | 32 | const prometheusEndpoint = "http://localhost:9990" 33 | 34 | var ( 35 | cloud string 36 | pricePath string 37 | queryBefore string 38 | start string 39 | end string 40 | details bool 41 | promNs string 42 | analyzerNamespace string 43 | targetNamespace string 44 | analyzeAll bool 45 | operatorName string 46 | operatorNamespace string 47 | kubeconfig string 48 | ) 49 | 50 | // todo these should change to tetrate-hosted s3 files, with which we can send over cluster information 51 | // to track usage patterns. 52 | const ( 53 | gcpPricingLocation = "https://raw.githubusercontent.com/tetratelabs/istio-cost-analyzer/master/pricing/gcp/gcp_pricing.json" 54 | awsPricingLocation = "https://raw.githubusercontent.com/tetratelabs/istio-cost-analyzer/master/pricing/aws/aws_pricing.json" 55 | ) 56 | 57 | var analyzeCmd = &cobra.Command{ 58 | Use: "analyze", 59 | Short: "List all the service links in the mesh", 60 | Long: ``, 61 | RunE: func(cmd *cobra.Command, args []string) error { 62 | kubeClient := pkg.NewAnalyzerKube(kubeconfig) 63 | // if a custom price path isn't provided, use the default price path for the cloud 64 | // the cluster is on. 65 | if pricePath == "" { 66 | if cloud == "" { 67 | cloud = string(kubeClient.InferCloud()) 68 | } 69 | cloud = strings.ToUpper(cloud) 70 | if pkg.Cloud(cloud).IsGCP() { 71 | pricePath = gcpPricingLocation 72 | } else if pkg.Cloud(cloud).IsAWS() { 73 | pricePath = awsPricingLocation 74 | } else { 75 | // we don't have a price path or cloud, so fail 76 | fmt.Println("when no price path is provided, the only supported clouds are gcp and aws. couldn't infer cloud info.") 77 | return errors.New("provide different cloud") 78 | } 79 | fmt.Printf("found cloud: %s\n", cloud) 80 | } 81 | fmt.Printf("using pricing file: %s\n", pricePath) 82 | analyzerProm, err := pkg.NewAnalyzerProm(prometheusEndpoint, cloud) 83 | if err != nil { 84 | return err 85 | } 86 | // initialize analyzer 87 | cost, err := pkg.NewCostAnalysis(pricePath) 88 | if err != nil { 89 | return err 90 | } 91 | // port-forward prometheus asynchronously and wait for it to be ready 92 | go analyzerProm.PortForwardProm(promNs) 93 | if err := analyzerProm.WaitForProm(); err != nil { 94 | return err 95 | } 96 | var endTime time.Time 97 | var startTime *time.Time 98 | if end == "" { 99 | endTime = time.Now() 100 | } else { 101 | endTime, err = time.Parse(time.RFC3339, end) 102 | if err != nil { 103 | return err 104 | } 105 | } 106 | st, err := time.Parse(time.RFC3339, start) 107 | if start == "" { 108 | startTime = nil 109 | } else { 110 | if err != nil { 111 | return err 112 | } 113 | startTime = &st 114 | } 115 | // query prometheus for raw pod calls 116 | localityCalls, err := analyzerProm.GetCalls(startTime, &endTime) 117 | if err != nil { 118 | return err 119 | } 120 | // transform raw pod calls to locality information 121 | localityCalls, err = kubeClient.CollapseLocalityCalls(localityCalls) 122 | if err != nil { 123 | return err 124 | } 125 | // calculate egress given locality information 126 | totalCost, err := cost.CalculateEgress(localityCalls) 127 | if err != nil { 128 | return err 129 | } 130 | pkg.PrintCostTable(localityCalls, totalCost, details) 131 | return nil 132 | }, 133 | } 134 | 135 | func init() { 136 | defaultKube := "" 137 | if os.Getenv("KUBECONFIG") == "" { 138 | home := homedir.HomeDir() 139 | defaultKube = filepath.Join(home, ".kube", "config") 140 | } else { 141 | defaultKube = os.Getenv("KUBECONFIG") 142 | } 143 | // setup/destroy need this 144 | rootCmd.PersistentFlags().StringVar(&operatorName, "operatorName", "", "name of your istio operator. If not set, cost tool will use the first operator found in the istio-system namespace") 145 | rootCmd.PersistentFlags().StringVar(&operatorNamespace, "operatorNamespace", "istio-system", "namespace of your istio operator") 146 | 147 | analyzeCmd.PersistentFlags().StringVar(&pricePath, "pricePath", "", "if custom egress rates are provided, dapani will use the rates in this file.") 148 | analyzeCmd.PersistentFlags().StringVar(&queryBefore, "queryBefore", "0s", "if provided a time duration (go format), dapani will only use data from that much time ago and before.") 149 | analyzeCmd.PersistentFlags().BoolVar(&details, "details", false, "if true, tool will provide a more detailed view of egress costs, including both destination and source") 150 | analyzeCmd.PersistentFlags().StringVar(&promNs, "prometheusNamespace", "istio-system", "promNs that the prometheus pod lives in, if different from analyzerNamespace") 151 | analyzeCmd.PersistentFlags().StringVar(&start, "start", "", "if provided, the cost analyzer will analyze costs from this time onwards") 152 | analyzeCmd.PersistentFlags().StringVar(&end, "end", "", "if provided, the cost analyzer will analyze costs up to this time") 153 | 154 | rootCmd.PersistentFlags().StringVar(&cloud, "cloud", "", "aws/gcp/azure are provided by default. if nothing is set, cloud info is inferred.") 155 | rootCmd.PersistentFlags().StringVar(&analyzerNamespace, "analyzerNamespace", "istio-system", "namespace that the cost analyzer and associated resources lives in") 156 | webhookSetupCmd.PersistentFlags().StringVar(&targetNamespace, "targetNamespace", "default", "namespace that the cost analyzer will analyze") 157 | rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", defaultKube, "path to kubeconfig file") 158 | 159 | destroyCmd.PersistentFlags().BoolVarP(&destroyOperator, "destroyOperator", "o", false, "if true, cost analyzer will destroy the istio operator config that it created") 160 | webhookSetupCmd.PersistentFlags().BoolVarP(&analyzeAll, "analyzeAll", "a", false, "if true, cost analyzer will analyze all namespaces in the cluster") 161 | 162 | rootCmd.AddCommand(analyzeCmd) 163 | rootCmd.AddCommand(webhookSetupCmd) 164 | rootCmd.AddCommand(destroyCmd) 165 | } 166 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Tetrate 2 | # Licensed under the Apache License, Version 2.0 (the "License") 3 | 4 | include Tools.mk 5 | 6 | name := istio-cost-analyzer 7 | 8 | # VERSION is used in release artifacts names. This should be in .. (without v 9 | # prefix). When generating actual release assets this can be resolved using "git describe --tags --long". 10 | VERSION ?= dev 11 | 12 | # Root dir returns absolute path of current directory. It has a trailing "/". 13 | root_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) 14 | 15 | # Currently we resolve it using which. But more sophisticated approach is to use infer GOROOT. 16 | go := $(shell which go) 17 | goarch := $(shell $(go) env GOARCH) 18 | goexe := $(shell $(go) env GOEXE) 19 | goos := $(shell $(go) env GOOS) 20 | 21 | # Local cache directory. 22 | CACHE_DIR ?= $(root_dir).cache 23 | 24 | all_go_sources := $(wildcard cmd/*.go pkg/*/*.go) 25 | main_go_sources := $(wildcard $(filter-out %_test.go,$(all_go_sources))) 26 | 27 | # Go tools directory holds the binaries of Go-based tools. 28 | go_tools_dir := $(CACHE_DIR)/tools/go 29 | 30 | export PATH := $(go_tools_dir):$(PATH) 31 | 32 | current_binary_path := build/$(name)_$(goos)_$(goarch) 33 | current_binary := $(current_binary_path)/$(name)$(goexe) 34 | 35 | linux_platforms := linux_amd64 linux_arm64 36 | non_windows_platforms := darwin_amd64 darwin_arm64 $(linux_platforms) 37 | windows_platforms := windows_amd64 38 | 39 | archives := $(non_windows_platforms:%=dist/$(name)_$(VERSION)_%.tar.gz) $(windows_platforms:%=dist/$(name)_$(VERSION)_%.zip) 40 | checksums := dist/$(name)_$(VERSION)_checksums.txt 41 | 42 | # Go-based tools. 43 | addlicense := $(go_tools_dir)/addlicense 44 | goimports := $(go_tools_dir)/goimports 45 | golangci-lint := $(go_tools_dir)/golangci-lint 46 | 47 | # This is adopted from https://github.com/tetratelabs/func-e/blob/3df66c9593e827d67b330b7355d577f91cdcb722/Makefile#L60-L76. 48 | # ANSI escape codes. f_ means foreground, b_ background. 49 | # See https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters. 50 | f_black := $(shell printf "\33[30m") 51 | b_black := $(shell printf "\33[40m") 52 | f_white := $(shell printf "\33[97m") 53 | f_gray := $(shell printf "\33[37m") 54 | f_dark_gray := $(shell printf "\33[90m") 55 | f_bright_cyan := $(shell printf "\33[96m") 56 | b_bright_cyan := $(shell printf "\33[106m") 57 | ansi_reset := $(shell printf "\33[0m") 58 | ansi_$(name) := $(b_black)$(f_black)$(b_bright_cyan)$(name)$(ansi_reset) 59 | ansi_format_dark := $(f_gray)$(f_bright_cyan)%-10s$(ansi_reset) $(f_dark_gray)%s$(ansi_reset)\n 60 | ansi_format_bright := $(f_white)$(f_bright_cyan)%-10s$(ansi_reset) $(f_black)$(b_bright_cyan)%s$(ansi_reset)\n 61 | 62 | # This formats help statements in ANSI colors. To hide a target from help, don't comment it with a trailing '##'. 63 | help: ## Describe how to use each target 64 | @printf "$(ansi_$(name))$(f_white)\n" 65 | @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "$(ansi_format_dark)", $$1, $$2}' $(MAKEFILE_LIST) 66 | 67 | .PHONY: test 68 | test: ## Run all unit tests 69 | @$(go) test ./... 70 | 71 | .PHONY: build 72 | build: $(current_binary) 73 | # @echo "uy"## Build the binary 74 | 75 | # This generates the assets that attach to a release. 76 | dist: $(archives) $(checksums) ## Generate release assets 77 | 78 | license_files := cmd pkg 79 | license: $(addlicense) ## Add license to files 80 | @$(addlicense) -c "Tetrate" $(license_files) 1>/dev/null 2>&1 81 | 82 | # Override lint cache directory so we can cache it on CI. Reference: https://golangci-lint.run/usage/configuration/#cache. 83 | # TODO(dio): we need to have .golangci.yml so we can control how linter lints our code. 84 | export GOLANGCI_LINT_CACHE=$(CACHE_DIR)/golangci-lint 85 | lint: $(all_go_sources) $(golangci-lint) ## Lint all Go sources 86 | @printf "$(ansi_format_dark)" $@ "linting files" 87 | @$(golangci-lint) run --timeout 5m 88 | @printf "$(ansi_format_bright)" $@ "ok" 89 | 90 | format: go.mod $(all_go_sources) $(goimports) ## Format all Go sources 91 | @printf "$(ansi_format_dark)" $@ "formatting files" 92 | @$(go) mod tidy 93 | @$(go)fmt -s -w $(all_go_sources) 94 | # Workaround inconsistent goimports grouping with awk until golang/go#20818 or incu6us/goimports-reviser#50 95 | @for f in $(all_go_sources); do \ 96 | awk '/^import \($$/,/^\)$$/{if($$0=="")next}{print}' $$f > /tmp/fmt; \ 97 | mv /tmp/fmt $$f; \ 98 | done 99 | @$(goimports) -local $$(sed -ne 's/^module //gp' go.mod) -w $(all_go_sources) 100 | @printf "$(ansi_format_bright)" $@ "ok" 101 | 102 | check: ## Verify contents of last commit 103 | @$(MAKE) format 104 | @$(MAKE) lint 105 | @$(MAKE) license 106 | @if [ ! -z "`git status -s`" ]; then \ 107 | echo "The following differences will fail CI until committed:"; \ 108 | git diff --exit-code; \ 109 | fi 110 | 111 | clean: ## Ensure a clean build 112 | @printf "$(ansi_format_dark)" $@ "deleting temporary files" 113 | @rm -rf coverage.txt 114 | @rm -rf build 115 | @rm -rf dist 116 | @$(go) clean -testcache 117 | @printf "$(ansi_format_bright)" $@ "ok" 118 | 119 | build/$(name)_%/$(name): $(main_go_sources) 120 | $(call go-build,$@,$<) 121 | 122 | build/$(name)_%/$(name).exe: $(main_go_sources) 123 | $(call go-build,$@,$<) 124 | 125 | dist/$(name)_$(VERSION)_%.tar.gz: build/$(name)_%/$(name) 126 | @printf "$(ansi_format_dark)" tar.gz "tarring $@" 127 | @mkdir -p $(@D) 128 | @tar -C $( $@ 143 | @printf "$(ansi_format_bright)" sha256sum "ok" 144 | 145 | go_link := -X main.version=$(VERSION) -X main.commit=$(shell git rev-parse --short HEAD) -X main.date=$(shell date '+%Y-%m-%d') 146 | go-arch = $(if $(findstring amd64,$1),amd64,arm64) 147 | go-os = $(if $(findstring .exe,$1),windows,$(if $(findstring linux,$1),linux,darwin)) 148 | define go-build 149 | @printf "$(ansi_format_dark)" build "building $1" 150 | @CGO_ENABLED=0 GOOS=$(call go-os,$1) GOARCH=$(call go-arch,$1) $(go) build \ 151 | # -ldflags "-s -w $(go_link)" \ 152 | -o $1 $2 153 | @printf "$(ansi_format_bright)" build "ok" 154 | endef 155 | 156 | # Catch all rules for Go-based tools. 157 | $(go_tools_dir)/%: 158 | @printf "$(ansi_format_dark)" tools "installing $($(notdir $@)@v)..." 159 | @GOBIN=$(go_tools_dir) go install $($(notdir $@)@v) 160 | @printf "$(ansi_format_bright)" tools "ok" 161 | -------------------------------------------------------------------------------- /pkg/prom.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "context" 19 | "fmt" 20 | "github.com/prometheus/client_golang/api" 21 | v1 "github.com/prometheus/client_golang/api/prometheus/v1" 22 | "github.com/prometheus/common/model" 23 | "net/http" 24 | "os/exec" 25 | "regexp" 26 | "strings" 27 | "time" 28 | ) 29 | 30 | // CostAnalyzerProm holds the prometheus routines necessary to collect 31 | // service<->service traffic data. 32 | type CostAnalyzerProm struct { 33 | promEndpoint string 34 | errChan chan error 35 | client api.Client 36 | localityMatch string 37 | attemptsForwarding int 38 | // attemptsThreshold is the number of retry attempts we will make to port-forward 39 | attemptsThreshold int 40 | } 41 | 42 | // NewAnalyzerProm creates a prometheus client given the endpoint, 43 | // and errors out if the endpoint is invalid. 44 | func NewAnalyzerProm(promEndpoint, cloud string) (*CostAnalyzerProm, error) { 45 | client, err := api.NewClient(api.Config{ 46 | Address: promEndpoint, 47 | }) 48 | if err != nil { 49 | fmt.Printf("cannot initialize prom lib: %v", err) 50 | return nil, err 51 | } 52 | // assume gcp 53 | regex := "^[a-z]+-[a-z]+\\d-[a-z]$" 54 | if Cloud(cloud).IsAWS() { 55 | regex = "^[a-z]+-[a-z]+-\\d$" 56 | } 57 | return &CostAnalyzerProm{ 58 | promEndpoint: promEndpoint, 59 | errChan: make(chan error), 60 | client: client, 61 | localityMatch: regex, 62 | attemptsForwarding: 0, 63 | attemptsThreshold: 1, 64 | }, nil 65 | } 66 | 67 | // PortForwardProm will execute a kubectl port-forward command, forwarding the inbuild prometheus 68 | // deployment to port 9090 on localhost. This is executed asynchronously, and if there is an error, 69 | // it is sent into d.errChan. 70 | func (d *CostAnalyzerProm) PortForwardProm(promNamespace string) { 71 | cmd := exec.Command("kubectl", "-n", promNamespace, "port-forward", "deployment/prometheus", "9990:9090") 72 | o, err := cmd.CombinedOutput() 73 | if err != nil { 74 | if strings.Contains(string(o), "address already in use") && d.attemptsForwarding < d.attemptsThreshold { 75 | fmt.Printf("port-forward failed once, trying again...\n") 76 | d.attemptsForwarding++ 77 | d.PortForwardProm(promNamespace) 78 | } else { 79 | fmt.Printf("cannot port-forward to prometheus: %v %v", err, string(o)) 80 | d.errChan <- err 81 | return 82 | } 83 | } 84 | } 85 | 86 | // WaitForProm just pings the prometheus endpoint until it gets a code within [200, 300). 87 | // It selects for that event and an error coming in from d.errChan. 88 | func (d *CostAnalyzerProm) WaitForProm() error { 89 | ticker := time.NewTicker(500 * time.Millisecond) 90 | fmt.Println("Waiting for prometheus to be ready...") 91 | for { 92 | select { 93 | case <-ticker.C: 94 | r, e := http.Get(d.promEndpoint) 95 | if e == nil { 96 | fmt.Printf("Prometheus is ready! (Code: %v)\n", r.StatusCode) 97 | ticker.Stop() 98 | return nil 99 | } 100 | case e := <-d.errChan: 101 | return e 102 | } 103 | } 104 | } 105 | 106 | // GetCalls queries the prometheus API for istio_request_bytes_sum, given a time range. 107 | // returns an array of Calls, which contain locality and workload information. 108 | // todo take an actual timerange, and not the hacky "since" parameter. 109 | func (d *CostAnalyzerProm) GetCalls(start, end *time.Time) ([]*Call, error) { 110 | promApi := v1.NewAPI(d.client) 111 | calls := make([]*Call, 0) 112 | query := "istio_request_bytes_sum{destination_locality!=\"\", destination_locality!=\"unknown\"}" 113 | var result model.Value 114 | var warn v1.Warnings 115 | var err error 116 | if start == nil { 117 | fmt.Printf("EFN") 118 | result, warn, err = promApi.Query(context.Background(), query, *end) 119 | v := result.(model.Vector) 120 | for i := 0; i < len(v); i++ { 121 | // check if the locality is valid with regexp, if not, throw it out 122 | // we do this because anyone can set labels on pods, and we don't want to 123 | // count those. 124 | if !d.validateLocality(string(v[i].Metric["destination_locality"])) { 125 | fmt.Printf("skipping invalid destination locality: %v\n", v[i].Metric["destination_locality"]) 126 | continue 127 | } 128 | if !d.validateLocality(string(v[i].Metric["locality"])) { 129 | fmt.Printf("skipping invalid source locality: %v\n", v[i].Metric["locality"]) 130 | continue 131 | } 132 | calls = append(calls, &Call{ 133 | From: string(v[i].Metric["destination_locality"]), 134 | To: string(v[i].Metric["locality"]), 135 | ToWorkload: string(v[i].Metric["destination_workload"]), 136 | FromWorkload: string(v[i].Metric["source_workload"]), 137 | CallSize: uint64(v[i].Value), 138 | }) 139 | } 140 | } else { 141 | // query across timerange 142 | startResult, _, err := promApi.Query(context.Background(), query, *start) 143 | if err != nil { 144 | return nil, err 145 | } 146 | endResult, _, err := promApi.Query(context.Background(), query, *end) 147 | if err != nil { 148 | return nil, err 149 | } 150 | startV := startResult.(model.Vector) 151 | endV := endResult.(model.Vector) 152 | for i := 0; i < len(startV); i++ { 153 | if !d.validateLocality(string(startV[i].Metric["destination_locality"])) { 154 | fmt.Printf("skipping invalid destination locality: %v\n", startV[i].Metric["destination_locality"]) 155 | continue 156 | } 157 | if !d.validateLocality(string(startV[i].Metric["locality"])) { 158 | fmt.Printf("skipping invalid source locality: %v\n", startV[i].Metric["locality"]) 159 | continue 160 | } 161 | for j := 0; j < len(endV); j++ { 162 | if !d.validateLocality(string(endV[j].Metric["destination_locality"])) { 163 | fmt.Printf("skipping invalid destination locality: %v\n", endV[j].Metric["destination_locality"]) 164 | continue 165 | } 166 | if !d.validateLocality(string(endV[j].Metric["locality"])) { 167 | fmt.Printf("skipping invalid source locality: %v\n", endV[j].Metric["locality"]) 168 | continue 169 | } 170 | if string(startV[i].Metric["destination_locality"]) == string(endV[j].Metric["destination_locality"]) && 171 | string(startV[i].Metric["locality"]) == string(endV[j].Metric["locality"]) && 172 | string(startV[i].Metric["destination_workload"]) == string(endV[j].Metric["destination_workload"]) && 173 | string(startV[i].Metric["source_workload"]) == string(endV[j].Metric["source_workload"]) { 174 | calls = append(calls, &Call{ 175 | From: string(startV[i].Metric["destination_locality"]), 176 | To: string(startV[i].Metric["locality"]), 177 | ToWorkload: string(startV[i].Metric["destination_workload"]), 178 | FromWorkload: string(startV[i].Metric["source_workload"]), 179 | CallSize: uint64(endV[j].Value) - uint64(startV[i].Value), 180 | }) 181 | } 182 | } 183 | } 184 | } 185 | if err != nil { 186 | fmt.Printf("error querying prom: %v", err) 187 | return nil, err 188 | } 189 | if len(warn) > 0 { 190 | fmt.Printf("Warn: %v", warn) 191 | } 192 | 193 | return calls, nil 194 | } 195 | 196 | func (d *CostAnalyzerProm) validateLocality(locality string) bool { 197 | b, _ := regexp.MatchString(d.localityMatch, locality) 198 | return b 199 | } 200 | -------------------------------------------------------------------------------- /cmd/setup.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package cmd 16 | 17 | import ( 18 | "bytes" 19 | "strings" 20 | 21 | "github.com/spf13/cobra" 22 | v1 "k8s.io/api/apps/v1" 23 | v12 "k8s.io/api/core/v1" 24 | v13 "k8s.io/api/rbac/v1" 25 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 26 | k8Yaml "k8s.io/apimachinery/pkg/util/yaml" 27 | 28 | "github.com/tetratelabs/istio-cost-analyzer/pkg" 29 | ) 30 | 31 | var costAnalyzerSA = &v12.ServiceAccount{ 32 | ObjectMeta: metav1.ObjectMeta{ 33 | Name: "cost-analyzer-sa", 34 | }, 35 | } 36 | 37 | var costAnalyzerClusterRoleBinding = &v13.ClusterRoleBinding{ 38 | ObjectMeta: metav1.ObjectMeta{ 39 | Name: "cost-analyzer-role-binding", 40 | }, 41 | RoleRef: v13.RoleRef{ 42 | APIGroup: "rbac.authorization.k8s.io", 43 | Kind: "ClusterRole", 44 | Name: "cost-analyzer-service-role", 45 | }, 46 | Subjects: []v13.Subject{ 47 | { 48 | Kind: "ServiceAccount", 49 | Name: "cost-analyzer-sa", 50 | Namespace: analyzerNamespace, 51 | }, 52 | }, 53 | } 54 | 55 | var costAnalyzerClusterRole = &v13.ClusterRole{ 56 | ObjectMeta: metav1.ObjectMeta{ 57 | Name: "cost-analyzer-service-role", 58 | }, 59 | Rules: []v13.PolicyRule{ 60 | { 61 | APIGroups: []string{"", "admissionregistration.k8s.io", "apps"}, 62 | Resources: []string{"mutatingwebhookconfigurations", "pods", "nodes", "deployments"}, 63 | Verbs: []string{"get", "create", "patch", "list", "update"}, 64 | }, 65 | }, 66 | } 67 | 68 | var webhookSetupCmd = &cobra.Command{ 69 | Use: "setup", 70 | Short: "Create the webhook object in kubernetes and deploy the server container.", 71 | Long: "Setting up a webhook to receive config changes makes it so you don't have to manually change all the configuration", 72 | RunE: func(cmd *cobra.Command, args []string) error { 73 | kubeClient := pkg.NewAnalyzerKube(kubeconfig) 74 | //ic := kubeClient.IstioClient() 75 | var err error 76 | webhookDeployment := ` 77 | kind: Deployment 78 | apiVersion: apps/v1 79 | metadata: 80 | name: cost-analyzer-mutating-webhook 81 | spec: 82 | replicas: 1 83 | selector: 84 | matchLabels: 85 | app: cost-analyzer-mutating-webhook 86 | template: 87 | metadata: 88 | labels: 89 | app: cost-analyzer-mutating-webhook 90 | spec: 91 | initContainers: 92 | - name: cost-analyzer-mutating-webhook-ca 93 | image: adiprerepa/cost-analyzer-mutating-webhook-ca:latest 94 | imagePullPolicy: Always 95 | volumeMounts: 96 | - mountPath: /etc/webhook/certs 97 | name: certs 98 | env: 99 | - name: MUTATE_CONFIG 100 | value: cost-analyzer-mutating-webhook-configuration 101 | - name: WEBHOOK_SERVICE 102 | value: cost-analyzer-mutating-webhook 103 | containers: 104 | - name: cost-analyzer-mutating-webhook 105 | image: adiprerepa/cost-analyzer-mutating-webhook:latest 106 | imagePullPolicy: Always 107 | ports: 108 | - containerPort: 443 109 | volumeMounts: 110 | - name: certs 111 | mountPath: /etc/webhook/certs 112 | resources: 113 | requests: 114 | memory: "64Mi" 115 | cpu: "250m" 116 | limits: 117 | memory: "128Mi" 118 | cpu: "500m" 119 | volumes: 120 | - name: certs 121 | emptyDir: {} 122 | serviceAccountName: cost-analyzer-sa 123 | ` 124 | webhookService := ` 125 | kind: Service 126 | apiVersion: v1 127 | metadata: 128 | name: cost-analyzer-mutating-webhook 129 | spec: 130 | selector: 131 | app: cost-analyzer-mutating-webhook 132 | ports: 133 | - port: 443 134 | protocol: TCP 135 | targetPort: 443 136 | ` 137 | var sa *v12.ServiceAccount 138 | var cr *v13.ClusterRole 139 | var crb *v13.ClusterRoleBinding 140 | var status bool 141 | cmd.Println("creating webhook deployment/service and role/binding...") 142 | if sa, err, status = kubeClient.CreateServiceAccount(costAnalyzerSA, analyzerNamespace); err != nil { 143 | cmd.PrintErrf("unable to create service account: %v", err) 144 | return err 145 | } else { 146 | if status { 147 | cmd.Printf("service account %v already exists\n", costAnalyzerSA.Name) 148 | } else { 149 | cmd.Printf("service account %v created\n", sa.Name) 150 | } 151 | } 152 | if cr, err, status = kubeClient.CreateClusterRole(costAnalyzerClusterRole); err != nil { 153 | cmd.PrintErrf("unable to create cluster role: %v", err) 154 | return err 155 | } else { 156 | if status { 157 | cmd.Printf("cluster role %v already exists\n", costAnalyzerClusterRole.Name) 158 | } else { 159 | cmd.Printf("cluster role %v created\n", cr.Name) 160 | } 161 | } 162 | // todo dont do this now and actually properly structure the stuff 163 | costAnalyzerClusterRoleBinding.Subjects[0].Namespace = analyzerNamespace 164 | if crb, err, status = kubeClient.CreateClusterRoleBinding(costAnalyzerClusterRoleBinding); err != nil { 165 | cmd.PrintErrf("unable to create cluster role binding: %v", err) 166 | return err 167 | } else { 168 | if status { 169 | cmd.Printf("cluster role binding %v already exists\n", costAnalyzerClusterRoleBinding.Name) 170 | } else { 171 | cmd.Printf("cluster role binding %v created\n", crb.Name) 172 | } 173 | } 174 | depl := &v1.Deployment{} 175 | decoder := k8Yaml.NewYAMLOrJSONDecoder(bytes.NewReader([]byte(webhookDeployment)), 1000) 176 | if err = decoder.Decode(&depl); err != nil { 177 | cmd.PrintErrf("unable to decode deployment: %v", err) 178 | return err 179 | } 180 | if analyzeAll { 181 | targetNamespace = "" 182 | } 183 | depl.Spec.Template.Spec.Containers[0].Env = []v12.EnvVar{{ 184 | Name: "CLOUD", 185 | Value: cloud, 186 | }, { 187 | Name: "NAMESPACE", 188 | Value: targetNamespace, 189 | }} 190 | depl.Spec.Template.Spec.InitContainers[0].Env = append(depl.Spec.Template.Spec.InitContainers[0].Env, v12.EnvVar{ 191 | Name: "WEBHOOK_NAMESPACE", 192 | Value: analyzerNamespace, 193 | }) 194 | serv := &v12.Service{} 195 | decoder = k8Yaml.NewYAMLOrJSONDecoder(bytes.NewReader([]byte(webhookService)), 1000) 196 | if err = decoder.Decode(&serv); err != nil { 197 | cmd.PrintErrf("unable to decode service: %v", err) 198 | return err 199 | } 200 | if serv, err, status = kubeClient.CreateService(serv, analyzerNamespace); err != nil { 201 | cmd.PrintErrf("unable to create service: %v", err) 202 | return err 203 | } else { 204 | if status { 205 | cmd.Printf("service %v already exists\n", serv.Name) 206 | } else { 207 | cmd.Printf("service %v created\n", serv.Name) 208 | } 209 | } 210 | if depl, err, status = kubeClient.CreateDeployment(depl, analyzerNamespace); err != nil { 211 | cmd.PrintErrf("unable to create deployment: %v", err) 212 | return err 213 | } else { 214 | if status { 215 | cmd.Printf("deployment %v already exists\n", depl.Name) 216 | } else { 217 | cmd.Printf("deployment %v created\n", depl.Name) 218 | } 219 | } 220 | 221 | // label namespaces with cost-analyzer-analysis-enabled=true 222 | namespaces := strings.Split(targetNamespace, ",") 223 | for _, namespace := range namespaces { 224 | if err = kubeClient.LabelNamespace(namespace, "cost-analyzer-analysis-enabled", "true"); err != nil { 225 | cmd.PrintErrf("unable to label namespace %v: %v", namespace, err) 226 | return err 227 | } 228 | } 229 | 230 | // istio operator setup 231 | if operatorName == "" { 232 | // first healthy operator 233 | operatorName, err = kubeClient.GetDefaultOperator(operatorNamespace) 234 | if err != nil { 235 | cmd.PrintErrf("unable to get default operator: %v", err) 236 | return err 237 | } 238 | } 239 | err = kubeClient.EditIstioOperator(operatorName, operatorNamespace) 240 | if err != nil { 241 | cmd.PrintErrf("unable to edit Istio Operator: %v", err) 242 | return err 243 | } 244 | return nil 245 | }, 246 | } 247 | -------------------------------------------------------------------------------- /mutating-webhook/cmd/mutating-webhook/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "crypto/tls" 6 | "encoding/json" 7 | "flag" 8 | "fmt" 9 | "io/ioutil" 10 | v1 "k8s.io/api/apps/v1" 11 | runtime2 "k8s.io/apimachinery/pkg/util/runtime" 12 | "k8s.io/client-go/informers" 13 | "k8s.io/client-go/kubernetes" 14 | "k8s.io/client-go/rest" 15 | "k8s.io/client-go/tools/cache" 16 | "log" 17 | "net/http" 18 | "os" 19 | "strings" 20 | 21 | admissionv1 "k8s.io/api/admission/v1" 22 | corev1 "k8s.io/api/core/v1" 23 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 24 | "k8s.io/apimachinery/pkg/runtime" 25 | "k8s.io/apimachinery/pkg/runtime/serializer" 26 | ) 27 | 28 | var ( 29 | codecs = serializer.NewCodecFactory(runtime.NewScheme()) 30 | logger = log.New(os.Stdout, "", log.LstdFlags) 31 | clientset *kubernetes.Clientset 32 | cloud = os.Getenv("CLOUD") 33 | //namespace = os.Getenv("NAMESPACE") 34 | namespaces = strings.Split(os.Getenv("NAMESPACE"), ",") 35 | ) 36 | 37 | func main() { 38 | // assume defaults 39 | if cloud == "" { 40 | cloud = "gcp" 41 | } 42 | tlsCert := flag.String("tls-cert", "", "Certificate for TLS") 43 | tlsKey := flag.String("tls-key", "", "Private key file for TLS") 44 | port := flag.Int("port", 443, "Port to listen on for HTTPS traffic") 45 | flag.Parse() 46 | // creates the in-cluster config 47 | config, err := rest.InClusterConfig() 48 | if err != nil { 49 | panic(err.Error()) 50 | } 51 | // creates the clientset 52 | clientset, err = kubernetes.NewForConfig(config) 53 | if err != nil { 54 | panic(err.Error()) 55 | } 56 | stopCh := make(chan struct{}) 57 | //concurrently watch for pod creation and label the pod with the node locality 58 | go watchAndLabelPods(stopCh) 59 | //annotate existing deployments with stats tags 60 | if err = annotateExistingDeployments(); err != nil { 61 | log.Fatal(err) 62 | } 63 | 64 | if err = runWebhookServer(*tlsCert, *tlsKey, *port); err != nil { 65 | log.Fatal(err) 66 | } 67 | } 68 | 69 | // annotateExistingDeployments annotates existing deployments with stats tags. 70 | func annotateExistingDeployments() error { 71 | log.Println("fetching deployments...") 72 | for _, ns := range namespaces { 73 | depl, err := clientset.AppsV1().Deployments(ns).List(context.TODO(), metav1.ListOptions{}) 74 | if err != nil { 75 | return err 76 | } 77 | log.Printf("annotating %v deployments in %v\n", len(depl.Items), ns) 78 | for _, d := range depl.Items { 79 | if d.Spec.Template.Annotations == nil { 80 | d.Spec.Template.Annotations = make(map[string]string) 81 | } 82 | if v, ok := d.Spec.Template.Annotations["sidecar.istio.io/extraStatTags"]; ok && v == "destination_locality" { 83 | log.Printf("skipping deployment %v/%v\n", d.Name, d.Namespace) 84 | continue 85 | } 86 | log.Printf("annotating deployment %v/%v\n", d.Name, d.Namespace) 87 | d.Spec.Template.Annotations["sidecar.istio.io/extraStatTags"] = "destination_locality" 88 | _, err = clientset.AppsV1().Deployments(ns).Update(context.TODO(), &d, metav1.UpdateOptions{}) 89 | if err != nil { 90 | logger.Printf("error in updating deployment, skipping...: %v\n", err) 91 | } 92 | } 93 | } 94 | return nil 95 | } 96 | 97 | func addPodEventHandler(obj interface{}) { 98 | pod := obj.(*corev1.Pod) 99 | log.Printf("updating pod %v\n", pod.Name) 100 | // Get the node locality 101 | locality, err := getNodeLocality(pod.Spec.NodeName, cloud) 102 | if err != nil { 103 | log.Printf("error in getting node locality: %v\n", err) 104 | return 105 | } 106 | // Label the pod with the node locality 107 | pod.ObjectMeta.Labels["locality"] = locality 108 | // annotate the pod with destination_locality tag 109 | if pod.Annotations == nil { 110 | pod.Annotations = make(map[string]string) 111 | } 112 | pod.Annotations["sidecar.istio.io/extraStatTags"] = "destination_locality" 113 | // Update the pod 114 | _, err = clientset.CoreV1().Pods(pod.Namespace).Update(context.TODO(), pod, metav1.UpdateOptions{}) 115 | if err != nil { 116 | log.Printf("error in updating pod: %v\n", err) 117 | return 118 | } 119 | log.Printf("Pod %v updated\n", pod.Name) 120 | } 121 | 122 | // watchAndLabelPod watches for pod creation and labels the pod with the node locality. 123 | func watchAndLabelPods(stopCh <-chan struct{}) { 124 | log.Printf("labeling pods in namespaces %v...", namespaces) 125 | informerIndex := map[string]cache.SharedInformer{} 126 | if len(namespaces) == 0 { 127 | informerIndex["_"] = informers.NewSharedInformerFactory(clientset, 0).Core().V1().Pods().Informer() 128 | } 129 | for _, ns := range namespaces { 130 | factory := informers.NewSharedInformerFactoryWithOptions(clientset, 0, informers.WithNamespace(ns)) 131 | informerIndex[ns] = factory.Core().V1().Pods().Informer() 132 | } 133 | for _, informer := range informerIndex { 134 | informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ 135 | AddFunc: addPodEventHandler, 136 | }) 137 | informer.Run(stopCh) 138 | } 139 | defer runtime2.HandleCrash() 140 | } 141 | 142 | var deserializer = codecs.UniversalDeserializer() 143 | 144 | func mutatePod(w http.ResponseWriter, r *http.Request) { 145 | if r.Header.Get("Content-Type") != "application/json" { 146 | http.Error(w, "invalid content type, want `application/json`", http.StatusBadRequest) 147 | return 148 | } 149 | 150 | body, err := readBody(r) 151 | if err != nil { 152 | logger.Printf("reading body: %v", err) 153 | http.Error(w, "failed to read request body", http.StatusInternalServerError) 154 | return 155 | } 156 | 157 | // Decode the request body into 158 | admissionReviewRequest := &admissionv1.AdmissionReview{} 159 | if _, _, err := deserializer.Decode(body, nil, admissionReviewRequest); err != nil { 160 | logger.Printf("decoding body: %v", err) 161 | http.Error(w, "failed to read request body", http.StatusInternalServerError) 162 | return 163 | } 164 | logger.Printf("got for %v", admissionReviewRequest.Request.Resource.Resource) 165 | 166 | // Do server-side validation that we are only dealing with a pod resource. This 167 | // should also be part of the MutatingWebhookConfiguration in the cluster, but 168 | // we should verify here before continuing. 169 | //podResource := metav1.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} 170 | //deploymentResource := metav1.GroupVersionResource{Group: "", Version: "v1", Resource: "deployments"} 171 | resourceType := admissionReviewRequest.Request.Resource 172 | if resourceType.Resource != "deployments" && resourceType.Resource != "pods" { 173 | logger.Printf("unexpected resource of type %q, expected a pod/deployment", admissionReviewRequest.Request.Resource.Resource) 174 | http.Error(w, "unexpected resource", http.StatusBadRequest) 175 | return 176 | } 177 | 178 | // Decode AdmissionReview to pod or deployment. 179 | raw := admissionReviewRequest.Request.Object.Raw 180 | var admissionReviewResponse admissionv1.AdmissionReview 181 | admissionResponse := &admissionv1.AdmissionResponse{ 182 | Allowed: true, 183 | } 184 | var patch string 185 | // todo this should probably be deleted at some point 186 | if resourceType.Resource == "pods" { 187 | pod := corev1.Pod{} 188 | if _, _, err := deserializer.Decode(raw, nil, &pod); err != nil { 189 | logger.Printf("decoding raw pod: %v", err) 190 | http.Error(w, "failed to decode pod", http.StatusInternalServerError) 191 | return 192 | } 193 | // todo custom configure cloud 194 | podLocality, err := getNodeLocality(pod.Spec.NodeName, "gcp") 195 | if err != nil { 196 | logger.Printf("unable to get locality from node info for pod %v, skipping patching locality\n", pod.Name) 197 | } 198 | log.Printf("editing pod %v for locality %v", pod.Name, podLocality) 199 | patch = fmt.Sprintf(`[ 200 | {"op":"add", 201 | "path":"/metadata/labels/locality","value": "%v"} 202 | ]`, podLocality) 203 | } else { 204 | // handle deployments 205 | deployment := v1.Deployment{} 206 | if _, _, err := deserializer.Decode(raw, nil, &deployment); err != nil { 207 | logger.Printf("decoding raw deployment: %v", err) 208 | http.Error(w, "failed to decode deployment", http.StatusInternalServerError) 209 | } 210 | log.Printf("editing deployment %v, adding destination_pod...", deployment.Name) 211 | // we need to add the metadata/annotations key if it doesn't exist. 212 | annotationPatch := "" 213 | if len(deployment.Spec.Template.Annotations) == 0 { 214 | annotationPatch = `{"op":"add","path":"/spec/template/metadata/annotations","value":{}},` 215 | } 216 | log.Printf("annotationPatch: %v", annotationPatch) 217 | patch = fmt.Sprintf(`[%v 218 | {"op":"add", 219 | "path":"/spec/template/metadata/annotations/sidecar.istio.io~1extraStatTags","value": "destination_locality"}]`, annotationPatch) 220 | } 221 | 222 | // Construct response 223 | patchType := admissionv1.PatchTypeJSONPatch 224 | admissionResponse.PatchType = &patchType 225 | admissionResponse.Patch = []byte(patch) 226 | 227 | admissionReviewResponse.Response = admissionResponse 228 | admissionReviewResponse.SetGroupVersionKind(admissionReviewRequest.GroupVersionKind()) 229 | admissionReviewResponse.Response.UID = admissionReviewRequest.Request.UID 230 | res, err := json.Marshal(admissionReviewResponse) 231 | if err != nil { 232 | logger.Printf("marshaling response: %v", err) 233 | http.Error(w, "failed to encode response", http.StatusInternalServerError) 234 | return 235 | } 236 | 237 | w.Header().Set("Content-Type", "application/json") 238 | w.Write(res) 239 | } 240 | 241 | func readBody(r *http.Request) ([]byte, error) { 242 | var body []byte 243 | if r.Body != nil { 244 | requestData, err := ioutil.ReadAll(r.Body) 245 | if err != nil { 246 | return nil, err 247 | } 248 | body = requestData 249 | } 250 | return body, nil 251 | } 252 | 253 | // getNodeLocality gets the locality given by topology.kubernetes.io. 254 | func getNodeLocality(name, cloud string) (string, error) { 255 | // if we are on AWS, we want to just get region, because availability zones 256 | // are not supported yet. 257 | if cloud == "aws" { 258 | return getNodeLabel(name, "topology.kubernetes.io/region") 259 | } 260 | return getNodeLabel(name, "topology.kubernetes.io/zone") 261 | } 262 | 263 | // getNodeLabel returns the value of the label on the node with the given name. 264 | func getNodeLabel(name, label string) (string, error) { 265 | node, err := clientset.CoreV1().Nodes().Get(context.TODO(), name, metav1.GetOptions{}) 266 | if err != nil { 267 | fmt.Printf("error in getting node %v: %v\n", name, err) 268 | return "", err 269 | } 270 | return node.Labels[label], nil 271 | } 272 | 273 | func runWebhookServer(certFile, keyFile string, port int) error { 274 | cert, err := tls.LoadX509KeyPair(certFile, keyFile) 275 | if err != nil { 276 | return err 277 | } 278 | 279 | http.HandleFunc("/mutate", mutatePod) 280 | 281 | server := http.Server{ 282 | Addr: fmt.Sprintf(":%d", port), 283 | TLSConfig: &tls.Config{ 284 | Certificates: []tls.Certificate{cert}, 285 | }, 286 | ErrorLog: logger, 287 | } 288 | 289 | return server.ListenAndServeTLS(certFile, keyFile) 290 | } 291 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /pkg/kube.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Tetrate 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkg 16 | 17 | import ( 18 | "context" 19 | "errors" 20 | "fmt" 21 | "istio.io/client-go/pkg/clientset/versioned" 22 | v12 "k8s.io/api/apps/v1" 23 | v1 "k8s.io/api/core/v1" 24 | v13 "k8s.io/api/rbac/v1" 25 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 26 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 27 | "k8s.io/apimachinery/pkg/runtime/schema" 28 | "k8s.io/apimachinery/pkg/types" 29 | "k8s.io/client-go/dynamic" 30 | "k8s.io/client-go/kubernetes" 31 | "k8s.io/client-go/tools/clientcmd" 32 | "strings" 33 | ) 34 | 35 | var iopResource = schema.GroupVersionResource{Group: "install.istio.io", Version: "v1alpha1", Resource: "istiooperators"} 36 | 37 | // KubeClient just wraps the kubernetes API. 38 | // todo should we just do: 39 | // ``` 40 | // type KubeClient kubernetes.ClientSet 41 | // ``` 42 | // if we get no value from just wrapping? 43 | type KubeClient struct { 44 | clientSet *kubernetes.Clientset 45 | dynamic dynamic.Interface 46 | kubeconfig string 47 | } 48 | 49 | type Cloud string 50 | 51 | const ( 52 | AWS Cloud = "AWS" 53 | GCP Cloud = "GCP" 54 | Unknown Cloud = "Unknown" 55 | ) 56 | 57 | func (c Cloud) IsAWS() bool { 58 | return c == AWS 59 | } 60 | 61 | func (c Cloud) IsGCP() bool { 62 | return c == GCP 63 | } 64 | 65 | // NewAnalyzerKube creates a clientset using the kubeconfig found in the home directory. 66 | // todo make kubeconfig a settable parameter in analyzer.go 67 | func NewAnalyzerKube(kubeconfig string) *KubeClient { 68 | // use the current context in kubeconfig 69 | config, err := clientcmd.BuildConfigFromFlags("", kubeconfig) 70 | if err != nil { 71 | panic(err.Error()) 72 | } 73 | 74 | // create the clientset 75 | clientset, err := kubernetes.NewForConfig(config) 76 | if err != nil { 77 | panic(err.Error()) 78 | } 79 | dynamicClient := dynamic.NewForConfigOrDie(config) 80 | return &KubeClient{ 81 | clientSet: clientset, 82 | kubeconfig: kubeconfig, 83 | dynamic: dynamicClient, 84 | } 85 | } 86 | 87 | // CollapseLocalityCalls takes a raw list of type Call and collapses the data 88 | // into a per-link basis (there might be multiple metrics for locality a->b) 89 | // todo maybe do this directly in prom.go and make it O(n) instead of O(2n) 90 | // sort of legacy? 91 | func (k *KubeClient) CollapseLocalityCalls(rawCalls []*Call) ([]*Call, error) { 92 | calls := make([]*Call, 0) 93 | // serviceCallMap's keys are just workload/locality links, without any call size information, 94 | // while the map value is the full, aggregated call value for that link. We do this because there may 95 | // exist multiple pods that cause the same workload/locality link, and we don't want them to duplicate. 96 | serviceCallMap := make(map[Call]*Call) 97 | for i := 0; i < len(rawCalls); i++ { 98 | serviceLocalityKey := Call{ 99 | FromWorkload: rawCalls[i].FromWorkload, 100 | From: rawCalls[i].From, 101 | ToWorkload: rawCalls[i].ToWorkload, 102 | To: rawCalls[i].To, 103 | } 104 | // either create a new entry, or add to an existing one. 105 | if _, ok := serviceCallMap[serviceLocalityKey]; !ok { 106 | serviceCallMap[serviceLocalityKey] = &serviceLocalityKey 107 | serviceLocalityKey.CallSize = rawCalls[i].CallSize 108 | } else { 109 | serviceCallMap[serviceLocalityKey].CallSize += rawCalls[i].CallSize 110 | } 111 | if i%10 == 0 { 112 | for k, v := range serviceCallMap { 113 | fmt.Printf("%v(%v) -> %v(%v): %v | link %v / %v\n", k.From, k.FromWorkload, k.To, k.ToWorkload, v.CallSize, i, len(rawCalls)) 114 | } 115 | } 116 | } 117 | for _, v := range serviceCallMap { 118 | calls = append(calls, v) 119 | } 120 | return calls, nil 121 | } 122 | 123 | // getPodNode gets the node associated with a given pod name in the default namespace. 124 | // nolint 125 | func (k *KubeClient) getPodNode(name, namespace string) (string, error) { 126 | pod, err := k.clientSet.CoreV1().Pods(namespace).Get(context.TODO(), name, metav1.GetOptions{}) 127 | if err != nil { 128 | fmt.Printf("error in getting pod %v: %v\n", name, err) 129 | return "", err 130 | } 131 | return pod.Spec.NodeName, nil 132 | } 133 | 134 | // getNodeLocality gets the locality given by topology.kubernetes.io. 135 | // nolint 136 | func (k *KubeClient) getNodeLocality(name, cloud string) (string, error) { 137 | // if we are on AWS, we want to just get region, because availability zones 138 | // are not supported yet. 139 | if cloud == "aws" { 140 | return k.getNodeLabel(name, "topology.kubernetes.io/region") 141 | } 142 | return k.getNodeLabel(name, "topology.kubernetes.io/zone") 143 | } 144 | 145 | // nolint 146 | func (k *KubeClient) getNodeLabel(name, label string) (string, error) { 147 | node, err := k.clientSet.CoreV1().Nodes().Get(context.TODO(), name, metav1.GetOptions{}) 148 | if err != nil { 149 | fmt.Printf("error in getting node %v: %v\n", name, err) 150 | return "", err 151 | } 152 | return node.Labels[label], nil 153 | } 154 | 155 | func (k *KubeClient) InferCloud() Cloud { 156 | nodes, err := k.clientSet.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{}) 157 | if err != nil { 158 | fmt.Printf("error in getting nodes: %v\n", err) 159 | return "" 160 | } 161 | if len(nodes.Items) == 0 { 162 | return "" 163 | } 164 | node := nodes.Items[0] 165 | if strings.Contains(node.Status.NodeInfo.KubeletVersion, "eks") { 166 | return AWS 167 | } 168 | if strings.HasPrefix(node.Spec.ProviderID, "gce") && strings.Contains(node.Status.NodeInfo.KubeletVersion, "gke") { 169 | return GCP 170 | } 171 | return Unknown 172 | } 173 | 174 | // CreateService creates a service in the given namespace. Returns the service, the error, and 175 | // a boolean representing whether or not the service already exists. 176 | func (k *KubeClient) CreateService(service *v1.Service, ns string) (*v1.Service, error, bool) { 177 | svc, err := k.clientSet.CoreV1().Services(ns).Create(context.TODO(), service, metav1.CreateOptions{}) 178 | if err != nil && strings.Contains(err.Error(), "already exists") { 179 | return service, nil, true 180 | } 181 | return svc, err, false 182 | } 183 | 184 | func (k *KubeClient) CreateDeployment(deployment *v12.Deployment, ns string) (*v12.Deployment, error, bool) { 185 | dep, err := k.clientSet.AppsV1().Deployments(ns).Create(context.TODO(), deployment, metav1.CreateOptions{}) 186 | if err != nil && strings.Contains(err.Error(), "already exists") { 187 | return deployment, nil, true 188 | } 189 | return dep, err, false 190 | } 191 | 192 | func (k *KubeClient) CreateServiceAccount(serviceAccount *v1.ServiceAccount, ns string) (*v1.ServiceAccount, error, bool) { 193 | sa, err := k.clientSet.CoreV1().ServiceAccounts(ns).Create(context.TODO(), serviceAccount, metav1.CreateOptions{}) 194 | if err != nil && strings.Contains(err.Error(), "already exists") { 195 | return serviceAccount, nil, true 196 | } 197 | return sa, err, false 198 | } 199 | 200 | func (k *KubeClient) CreateClusterRoleBinding(clusterRoleBinding *v13.ClusterRoleBinding) (*v13.ClusterRoleBinding, error, bool) { 201 | crb, err := k.clientSet.RbacV1().ClusterRoleBindings().Create(context.TODO(), clusterRoleBinding, metav1.CreateOptions{}) 202 | if err != nil && strings.Contains(err.Error(), "already exists") { 203 | return clusterRoleBinding, nil, true 204 | } 205 | return crb, err, false 206 | } 207 | 208 | func (k *KubeClient) CreateClusterRole(clusterRole *v13.ClusterRole) (*v13.ClusterRole, error, bool) { 209 | cr, err := k.clientSet.RbacV1().ClusterRoles().Create(context.TODO(), clusterRole, metav1.CreateOptions{}) 210 | if err != nil && strings.Contains(err.Error(), "already exists") { 211 | return clusterRole, nil, true 212 | } 213 | return cr, err, false 214 | } 215 | 216 | func (k *KubeClient) LabelNamespace(ns, key, value string) error { 217 | _, err := k.clientSet.CoreV1().Namespaces().Patch(context.TODO(), ns, types.MergePatchType, []byte(fmt.Sprintf(`{"metadata":{"labels":{"%v":"%v"}}}`, key, value)), metav1.PatchOptions{}) 218 | return err 219 | } 220 | 221 | func (k *KubeClient) Client() kubernetes.Interface { 222 | return k.clientSet 223 | } 224 | 225 | func (k *KubeClient) IstioClient() *versioned.Clientset { 226 | config, err := clientcmd.BuildConfigFromFlags("", k.kubeconfig) 227 | if err != nil { 228 | panic(err.Error()) 229 | } 230 | return versioned.NewForConfigOrDie(config) 231 | } 232 | 233 | func (k *KubeClient) GetDefaultOperator(ns string) (string, error) { 234 | rl, err := k.dynamic.Resource(iopResource).Namespace(ns).List(context.TODO(), metav1.ListOptions{}) 235 | if err != nil { 236 | return "", err 237 | } 238 | for _, r := range rl.Items { 239 | if _, ok := r.Object["status"]; ok { 240 | if status, ok := r.Object["status"].(map[string]interface{})["status"]; ok && status != nil && status.(string) == "HEALTHY" { 241 | return r.GetName(), nil 242 | } 243 | } 244 | } 245 | return "", errors.New("no default operator found, please specify a healthy istio operator") 246 | } 247 | 248 | func (k *KubeClient) EditIstioOperator(opName, opNamespace string) error { 249 | res, err := k.dynamic.Resource(iopResource).Namespace(opNamespace).Get(context.TODO(), opName, metav1.GetOptions{}) 250 | res, neededUpdate := normalizeOperator(res) 251 | if err != nil { 252 | return err 253 | } 254 | if !neededUpdate { 255 | return nil 256 | } 257 | _, err = k.dynamic.Resource(iopResource).Namespace(opNamespace).Update(context.TODO(), res, metav1.UpdateOptions{}) 258 | return err 259 | } 260 | 261 | func (k *KubeClient) DeleteOperatorConfig(opName, opNs string) error { 262 | res, err := k.dynamic.Resource(iopResource).Namespace(opNs).Get(context.TODO(), opName, metav1.GetOptions{}) 263 | if err != nil { 264 | return err 265 | } 266 | res = denormalizeOperator(res) 267 | _, err = k.dynamic.Resource(iopResource).Namespace(opNs).Update(context.TODO(), res, metav1.UpdateOptions{}) 268 | return err 269 | } 270 | 271 | // literal trash but it works 272 | func normalizeOperator(res *unstructured.Unstructured) (*unstructured.Unstructured, bool) { 273 | // lord forgive me for I have sinned 274 | // theres probably a better way to figure this out with JSONPatch but i'm lazy 275 | if v := res.Object["spec"].(map[string]interface{})["values"]; v == nil { 276 | res.Object["spec"].(map[string]interface{})["values"] = make(map[string]interface{}) 277 | } 278 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"]; v == nil { 279 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"] = make(map[string]interface{}) 280 | } 281 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"]; v == nil { 282 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"] = make(map[string]interface{}) 283 | } 284 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"]; v == nil { 285 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"] = make(map[string]interface{}) 286 | } 287 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"]; v == nil { 288 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"] = make(map[string]interface{}) 289 | } 290 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"].(map[string]interface{})["outboundSidecar"]; v == nil { 291 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"].(map[string]interface{})["outboundSidecar"] = make(map[string]interface{}) 292 | } 293 | outbound := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"].(map[string]interface{})["outboundSidecar"].(map[string]interface{})["metrics"] 294 | if outbound == nil { 295 | outbound = make([]interface{}, 0) 296 | } 297 | 298 | // check if we already wrote 299 | for _, o := range outbound.([]interface{}) { 300 | if o.(map[string]interface{})["dimensions"] != nil && o.(map[string]interface{})["dimensions"].(map[string]interface{})["destination_locality"] != nil { 301 | return res, false 302 | } 303 | } 304 | 305 | for i, out := range outbound.([]interface{}) { 306 | if out.(map[string]interface{})["name"].(string) == "request_bytes" { 307 | out.(map[string]interface{})["dimensions"].(map[string]interface{})["destination_locality"] = "upstream_peer.labels['locality'].value" 308 | } 309 | outbound.([]interface{})[i] = out 310 | } 311 | 312 | if len(outbound.([]interface{})) == 0 { 313 | outbound = append(outbound.([]interface{}), map[string]interface{}{ 314 | "name": "request_bytes", 315 | "dimensions": map[string]interface{}{ 316 | "destination_locality": "upstream_peer.labels['locality'].value", 317 | }, 318 | }) 319 | } 320 | 321 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"].(map[string]interface{})["outboundSidecar"].(map[string]interface{})["metrics"] = outbound 322 | return res, true 323 | } 324 | 325 | // delete our config 326 | func denormalizeOperator(res *unstructured.Unstructured) *unstructured.Unstructured { 327 | if v := res.Object["spec"].(map[string]interface{})["values"]; v == nil { 328 | return res 329 | } 330 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"]; v == nil { 331 | return res 332 | } 333 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"]; v == nil { 334 | return res 335 | } 336 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"]; v == nil { 337 | return res 338 | } 339 | if v := res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"]; v == nil { 340 | return res 341 | } 342 | res.Object["spec"].(map[string]interface{})["values"].(map[string]interface{})["telemetry"].(map[string]interface{})["v2"].(map[string]interface{})["prometheus"].(map[string]interface{})["configOverride"] = make(map[string]interface{}) 343 | return res 344 | } 345 | -------------------------------------------------------------------------------- /pricing/aws/aws_pricing.json: -------------------------------------------------------------------------------- 1 | { 2 | "af-south-1": { 3 | "ap-east-1": 0.147, 4 | "ap-northeast-1": 0.147, 5 | "ap-northeast-2": 0.147, 6 | "ap-northeast-3": 0.147, 7 | "ap-south-1": 0.147, 8 | "ap-southeast-1": 0.147, 9 | "ap-southeast-2": 0.147, 10 | "ap-southeast-3": 0.147, 11 | "ca-central-1": 0.147, 12 | "eu-central-1": 0.147, 13 | "eu-north-1": 0.147, 14 | "eu-south-1": 0.147, 15 | "eu-west-1": 0.147, 16 | "eu-west-2": 0.147, 17 | "eu-west-3": 0.147, 18 | "me-south-1": 0.147, 19 | "sa-east-1": 0.147, 20 | "us-east-1": 0.147, 21 | "us-east-2": 0.147, 22 | "us-west-1": 0.147, 23 | "us-west-2": 0.147 24 | }, 25 | "ap-east-1": { 26 | "af-south-1": 0.09, 27 | "ap-northeast-1": 0.09, 28 | "ap-northeast-2": 0.09, 29 | "ap-northeast-3": 0.09, 30 | "ap-south-1": 0.09, 31 | "ap-southeast-1": 0.09, 32 | "ap-southeast-2": 0.09, 33 | "ap-southeast-3": 0.09, 34 | "ca-central-1": 0.09, 35 | "eu-central-1": 0.09, 36 | "eu-north-1": 0.09, 37 | "eu-south-1": 0.09, 38 | "eu-west-1": 0.09, 39 | "eu-west-2": 0.09, 40 | "eu-west-3": 0.09, 41 | "me-south-1": 0.09, 42 | "sa-east-1": 0.09, 43 | "us-east-1": 0.09, 44 | "us-east-2": 0.09, 45 | "us-west-1": 0.09, 46 | "us-west-2": 0.09 47 | }, 48 | "ap-northeast-1": { 49 | "af-south-1": 0.09, 50 | "ap-east-1": 0.09, 51 | "ap-northeast-2": 0.09, 52 | "ap-northeast-3": 0.09, 53 | "ap-south-1": 0.09, 54 | "ap-southeast-1": 0.09, 55 | "ap-southeast-2": 0.09, 56 | "ap-southeast-3": 0.09, 57 | "ca-central-1": 0.09, 58 | "eu-central-1": 0.09, 59 | "eu-north-1": 0.09, 60 | "eu-south-1": 0.09, 61 | "eu-west-1": 0.09, 62 | "eu-west-2": 0.09, 63 | "eu-west-3": 0.09, 64 | "me-south-1": 0.09, 65 | "sa-east-1": 0.09, 66 | "us-east-1": 0.09, 67 | "us-east-2": 0.09, 68 | "us-west-1": 0.09, 69 | "us-west-2": 0.09 70 | }, 71 | "ap-northeast-2": { 72 | "af-south-1": 0.08, 73 | "ap-east-1": 0.08, 74 | "ap-northeast-1": 0.08, 75 | "ap-northeast-3": 0.08, 76 | "ap-south-1": 0.08, 77 | "ap-southeast-1": 0.08, 78 | "ap-southeast-2": 0.08, 79 | "ap-southeast-3": 0.08, 80 | "ca-central-1": 0.08, 81 | "eu-central-1": 0.08, 82 | "eu-north-1": 0.08, 83 | "eu-south-1": 0.08, 84 | "eu-west-1": 0.08, 85 | "eu-west-2": 0.08, 86 | "eu-west-3": 0.08, 87 | "me-south-1": 0.08, 88 | "sa-east-1": 0.08, 89 | "us-east-1": 0.08, 90 | "us-east-2": 0.08, 91 | "us-west-1": 0.08, 92 | "us-west-2": 0.08 93 | }, 94 | "ap-northeast-3": { 95 | "af-south-1": 0.09, 96 | "ap-east-1": 0.09, 97 | "ap-northeast-1": 0.09, 98 | "ap-northeast-2": 0.09, 99 | "ap-northeast-3": 0.09, 100 | "ap-south-1": 0.09, 101 | "ap-southeast-1": 0.09, 102 | "ap-southeast-2": 0.09, 103 | "ap-southeast-3": 0.09, 104 | "ca-central-1": 0.09, 105 | "eu-central-1": 0.09, 106 | "eu-north-1": 0.09, 107 | "eu-south-1": 0.09, 108 | "eu-west-1": 0.09, 109 | "eu-west-2": 0.09, 110 | "eu-west-3": 0.09, 111 | "me-south-1": 0.09, 112 | "sa-east-1": 0.09, 113 | "us-east-1": 0.09, 114 | "us-east-2": 0.09, 115 | "us-west-1": 0.09, 116 | "us-west-2": 0.09 117 | }, 118 | "ap-south-1": { 119 | "af-south-1": 0.086, 120 | "ap-east-1": 0.086, 121 | "ap-northeast-1": 0.086, 122 | "ap-northeast-2": 0.086, 123 | "ap-northeast-3": 0.086, 124 | "ap-southeast-1": 0.086, 125 | "ap-southeast-2": 0.086, 126 | "ap-southeast-3": 0.086, 127 | "ca-central-1": 0.086, 128 | "eu-central-1": 0.086, 129 | "eu-north-1": 0.086, 130 | "eu-south-1": 0.086, 131 | "eu-west-1": 0.086, 132 | "eu-west-2": 0.086, 133 | "eu-west-3": 0.086, 134 | "me-south-1": 0.086, 135 | "sa-east-1": 0.086, 136 | "us-east-1": 0.086, 137 | "us-east-2": 0.086, 138 | "us-west-1": 0.086, 139 | "us-west-2": 0.086 140 | }, 141 | "ap-southeast-1": { 142 | "af-south-1": 0.09, 143 | "ap-east-1": 0.09, 144 | "ap-northeast-1": 0.09, 145 | "ap-northeast-2": 0.09, 146 | "ap-northeast-3": 0.09, 147 | "ap-south-1": 0.09, 148 | "ap-southeast-2": 0.09, 149 | "ap-southeast-3": 0.09, 150 | "ca-central-1": 0.09, 151 | "eu-central-1": 0.09, 152 | "eu-north-1": 0.09, 153 | "eu-south-1": 0.09, 154 | "eu-west-1": 0.09, 155 | "eu-west-2": 0.09, 156 | "eu-west-3": 0.09, 157 | "me-south-1": 0.09, 158 | "sa-east-1": 0.09, 159 | "us-east-1": 0.09, 160 | "us-east-2": 0.09, 161 | "us-west-1": 0.09, 162 | "us-west-2": 0.09 163 | }, 164 | "ap-southeast-2": { 165 | "af-south-1": 0.098, 166 | "ap-east-1": 0.098, 167 | "ap-northeast-1": 0.098, 168 | "ap-northeast-2": 0.098, 169 | "ap-northeast-3": 0.098, 170 | "ap-south-1": 0.098, 171 | "ap-southeast-1": 0.098, 172 | "ap-southeast-3": 0.098, 173 | "ca-central-1": 0.098, 174 | "eu-central-1": 0.098, 175 | "eu-north-1": 0.098, 176 | "eu-south-1": 0.098, 177 | "eu-west-1": 0.098, 178 | "eu-west-2": 0.098, 179 | "eu-west-3": 0.098, 180 | "me-south-1": 0.098, 181 | "sa-east-1": 0.098, 182 | "us-east-1": 0.098, 183 | "us-east-2": 0.098, 184 | "us-west-1": 0.098, 185 | "us-west-2": 0.098 186 | }, 187 | "ap-southeast-3": { 188 | "af-south-1": 0.1, 189 | "ap-east-1": 0.1, 190 | "ap-northeast-1": 0.1, 191 | "ap-northeast-2": 0.1, 192 | "ap-northeast-3": 0.1, 193 | "ap-south-1": 0.08, 194 | "ap-southeast-1": 0.1, 195 | "ap-southeast-2": 0.1, 196 | "ap-southeast-3": 0.1, 197 | "ca-central-1": 0.1, 198 | "eu-central-1": 0.1, 199 | "eu-north-1": 0.1, 200 | "eu-south-1": 0.1, 201 | "eu-west-1": 0.08, 202 | "eu-west-2": 0.1, 203 | "eu-west-3": 0.08, 204 | "me-south-1": 0.1, 205 | "sa-east-1": 0.08, 206 | "us-east-1": 0.1, 207 | "us-east-2": 0.1, 208 | "us-west-1": 0.1, 209 | "us-west-2": 0.1 210 | }, 211 | "ca-central-1": { 212 | "af-south-1": 0.02, 213 | "ap-east-1": 0.02, 214 | "ap-northeast-1": 0.02, 215 | "ap-northeast-2": 0.02, 216 | "ap-northeast-3": 0.02, 217 | "ap-south-1": 0.02, 218 | "ap-southeast-1": 0.02, 219 | "ap-southeast-2": 0.02, 220 | "ap-southeast-3": 0.02, 221 | "eu-central-1": 0.02, 222 | "eu-north-1": 0.02, 223 | "eu-south-1": 0.02, 224 | "eu-west-1": 0.02, 225 | "eu-west-2": 0.02, 226 | "eu-west-3": 0.02, 227 | "me-south-1": 0.02, 228 | "sa-east-1": 0.02, 229 | "us-east-1": 0.02, 230 | "us-east-2": 0.02, 231 | "us-west-1": 0.02, 232 | "us-west-2": 0.02 233 | }, 234 | "eu-central-1": { 235 | "af-south-1": 0.02, 236 | "ap-east-1": 0.02, 237 | "ap-northeast-1": 0.02, 238 | "ap-northeast-2": 0.02, 239 | "ap-northeast-3": 0.02, 240 | "ap-south-1": 0.02, 241 | "ap-southeast-1": 0.02, 242 | "ap-southeast-2": 0.02, 243 | "ap-southeast-3": 0.02, 244 | "ca-central-1": 0.02, 245 | "eu-north-1": 0.02, 246 | "eu-south-1": 0.02, 247 | "eu-west-1": 0.02, 248 | "eu-west-2": 0.02, 249 | "eu-west-3": 0.02, 250 | "me-south-1": 0.02, 251 | "sa-east-1": 0.02, 252 | "us-east-1": 0.02, 253 | "us-east-2": 0.02, 254 | "us-west-1": 0.02, 255 | "us-west-2": 0.02 256 | }, 257 | "eu-north-1": { 258 | "af-south-1": 0.02, 259 | "ap-east-1": 0.02, 260 | "ap-northeast-1": 0.02, 261 | "ap-northeast-2": 0.02, 262 | "ap-northeast-3": 0.02, 263 | "ap-south-1": 0.02, 264 | "ap-southeast-1": 0.02, 265 | "ap-southeast-2": 0.02, 266 | "ap-southeast-3": 0.02, 267 | "ca-central-1": 0.02, 268 | "eu-central-1": 0.02, 269 | "eu-south-1": 0.02, 270 | "eu-west-1": 0.02, 271 | "eu-west-2": 0.02, 272 | "eu-west-3": 0.02, 273 | "me-south-1": 0.02, 274 | "sa-east-1": 0.02, 275 | "us-east-1": 0.02, 276 | "us-east-2": 0.02, 277 | "us-west-1": 0.02, 278 | "us-west-2": 0.02 279 | }, 280 | "eu-south-1": { 281 | "af-south-1": 0.02, 282 | "ap-east-1": 0.02, 283 | "ap-northeast-1": 0.02, 284 | "ap-northeast-2": 0.02, 285 | "ap-northeast-3": 0.02, 286 | "ap-south-1": 0.02, 287 | "ap-southeast-1": 0.02, 288 | "ap-southeast-2": 0.02, 289 | "ap-southeast-3": 0.02, 290 | "ca-central-1": 0.02, 291 | "eu-central-1": 0.02, 292 | "eu-north-1": 0.02, 293 | "eu-west-1": 0.02, 294 | "eu-west-2": 0.02, 295 | "eu-west-3": 0.02, 296 | "me-south-1": 0.02, 297 | "sa-east-1": 0.02, 298 | "us-east-1": 0.02, 299 | "us-east-2": 0.02, 300 | "us-west-1": 0.02, 301 | "us-west-2": 0.02 302 | }, 303 | "eu-west-1": { 304 | "af-south-1": 0.02, 305 | "ap-east-1": 0.02, 306 | "ap-northeast-1": 0.02, 307 | "ap-northeast-2": 0.02, 308 | "ap-northeast-3": 0.02, 309 | "ap-south-1": 0.02, 310 | "ap-southeast-1": 0.02, 311 | "ap-southeast-2": 0.02, 312 | "ap-southeast-3": 0.02, 313 | "ca-central-1": 0.02, 314 | "eu-central-1": 0.02, 315 | "eu-north-1": 0.02, 316 | "eu-south-1": 0.02, 317 | "eu-west-2": 0.02, 318 | "eu-west-3": 0.02, 319 | "me-south-1": 0.02, 320 | "sa-east-1": 0.02, 321 | "us-east-1": 0.02, 322 | "us-east-2": 0.02, 323 | "us-west-1": 0.02, 324 | "us-west-2": 0.02 325 | }, 326 | "eu-west-2": { 327 | "af-south-1": 0.02, 328 | "ap-east-1": 0.02, 329 | "ap-northeast-1": 0.02, 330 | "ap-northeast-2": 0.02, 331 | "ap-northeast-3": 0.02, 332 | "ap-south-1": 0.02, 333 | "ap-southeast-1": 0.02, 334 | "ap-southeast-2": 0.02, 335 | "ap-southeast-3": 0.02, 336 | "ca-central-1": 0.02, 337 | "eu-central-1": 0.02, 338 | "eu-north-1": 0.02, 339 | "eu-south-1": 0.02, 340 | "eu-west-1": 0.02, 341 | "eu-west-3": 0.02, 342 | "me-south-1": 0.02, 343 | "sa-east-1": 0.02, 344 | "us-east-1": 0.02, 345 | "us-east-2": 0.02, 346 | "us-west-1": 0.02, 347 | "us-west-2": 0.02 348 | }, 349 | "eu-west-3": { 350 | "af-south-1": 0.02, 351 | "ap-east-1": 0.02, 352 | "ap-northeast-1": 0.02, 353 | "ap-northeast-2": 0.02, 354 | "ap-northeast-3": 0.02, 355 | "ap-south-1": 0.02, 356 | "ap-southeast-1": 0.02, 357 | "ap-southeast-2": 0.02, 358 | "ap-southeast-3": 0.02, 359 | "ca-central-1": 0.02, 360 | "eu-central-1": 0.02, 361 | "eu-north-1": 0.02, 362 | "eu-south-1": 0.02, 363 | "eu-west-1": 0.02, 364 | "eu-west-2": 0.02, 365 | "me-south-1": 0.02, 366 | "sa-east-1": 0.02, 367 | "us-east-1": 0.02, 368 | "us-east-2": 0.02, 369 | "us-west-1": 0.02, 370 | "us-west-2": 0.02 371 | }, 372 | "me-south-1": { 373 | "af-south-1": 0.1105, 374 | "ap-east-1": 0.1105, 375 | "ap-northeast-1": 0.1105, 376 | "ap-northeast-2": 0.1105, 377 | "ap-northeast-3": 0.1105, 378 | "ap-south-1": 0.1105, 379 | "ap-southeast-1": 0.1105, 380 | "ap-southeast-2": 0.1105, 381 | "ap-southeast-3": 0.1105, 382 | "ca-central-1": 0.1105, 383 | "eu-central-1": 0.1105, 384 | "eu-north-1": 0.1105, 385 | "eu-south-1": 0.1105, 386 | "eu-west-1": 0.1105, 387 | "eu-west-2": 0.1105, 388 | "eu-west-3": 0.1105, 389 | "sa-east-1": 0.1105, 390 | "us-east-1": 0.1105, 391 | "us-east-2": 0.1105, 392 | "us-west-1": 0.1105, 393 | "us-west-2": 0.1105 394 | }, 395 | "sa-east-1": { 396 | "af-south-1": 0.138, 397 | "ap-east-1": 0.138, 398 | "ap-northeast-1": 0.138, 399 | "ap-northeast-2": 0.138, 400 | "ap-northeast-3": 0.138, 401 | "ap-south-1": 0.138, 402 | "ap-southeast-1": 0.138, 403 | "ap-southeast-2": 0.138, 404 | "ap-southeast-3": 0.138, 405 | "ca-central-1": 0.138, 406 | "eu-central-1": 0.138, 407 | "eu-north-1": 0.138, 408 | "eu-south-1": 0.138, 409 | "eu-west-1": 0.138, 410 | "eu-west-2": 0.138, 411 | "eu-west-3": 0.138, 412 | "me-south-1": 0.138, 413 | "us-east-1": 0.138, 414 | "us-east-2": 0.138, 415 | "us-west-1": 0.138, 416 | "us-west-2": 0.138 417 | }, 418 | "us-east-1": { 419 | "af-south-1": 0.02, 420 | "ap-east-1": 0.02, 421 | "ap-northeast-1": 0.02, 422 | "ap-northeast-2": 0.02, 423 | "ap-northeast-3": 0.02, 424 | "ap-south-1": 0.02, 425 | "ap-southeast-1": 0.02, 426 | "ap-southeast-2": 0.02, 427 | "ap-southeast-3": 0.02, 428 | "ca-central-1": 0.02, 429 | "eu-central-1": 0.02, 430 | "eu-north-1": 0.02, 431 | "eu-south-1": 0.02, 432 | "eu-west-1": 0.02, 433 | "eu-west-2": 0.02, 434 | "eu-west-3": 0.02, 435 | "me-south-1": 0.02, 436 | "sa-east-1": 0.02, 437 | "us-east-1": 0.02, 438 | "us-east-2": 0.01, 439 | "us-west-1": 0.02, 440 | "us-west-2": 0.02 441 | }, 442 | "us-east-2": { 443 | "af-south-1": 0.02, 444 | "ap-east-1": 0.02, 445 | "ap-northeast-1": 0.02, 446 | "ap-northeast-2": 0.02, 447 | "ap-northeast-3": 0.02, 448 | "ap-south-1": 0.02, 449 | "ap-southeast-1": 0.02, 450 | "ap-southeast-2": 0.02, 451 | "ap-southeast-3": 0.02, 452 | "ca-central-1": 0.02, 453 | "eu-central-1": 0.02, 454 | "eu-north-1": 0.02, 455 | "eu-south-1": 0.02, 456 | "eu-west-1": 0.02, 457 | "eu-west-2": 0.02, 458 | "eu-west-3": 0.02, 459 | "me-south-1": 0.02, 460 | "sa-east-1": 0.02, 461 | "us-east-1": 0.01, 462 | "us-west-1": 0.02, 463 | "us-west-2": 0.02 464 | }, 465 | "us-west-1": { 466 | "af-south-1": 0.02, 467 | "ap-east-1": 0.02, 468 | "ap-northeast-1": 0.02, 469 | "ap-northeast-2": 0.02, 470 | "ap-northeast-3": 0.02, 471 | "ap-south-1": 0.02, 472 | "ap-southeast-1": 0.02, 473 | "ap-southeast-2": 0.02, 474 | "ap-southeast-3": 0.02, 475 | "ca-central-1": 0.02, 476 | "eu-central-1": 0.02, 477 | "eu-north-1": 0.02, 478 | "eu-south-1": 0.02, 479 | "eu-west-1": 0.02, 480 | "eu-west-2": 0.02, 481 | "eu-west-3": 0.02, 482 | "me-south-1": 0.02, 483 | "sa-east-1": 0.02, 484 | "us-east-1": 0.02, 485 | "us-east-2": 0.02, 486 | "us-west-2": 0.02 487 | }, 488 | "us-west-2": { 489 | "af-south-1": 0.02, 490 | "ap-east-1": 0.02, 491 | "ap-northeast-1": 0.02, 492 | "ap-northeast-2": 0.02, 493 | "ap-northeast-3": 0.02, 494 | "ap-south-1": 0.02, 495 | "ap-southeast-1": 0.02, 496 | "ap-southeast-2": 0.02, 497 | "ap-southeast-3": 0.02, 498 | "ca-central-1": 0.02, 499 | "eu-central-1": 0.02, 500 | "eu-north-1": 0.02, 501 | "eu-south-1": 0.02, 502 | "eu-west-1": 0.02, 503 | "eu-west-2": 0.02, 504 | "eu-west-3": 0.02, 505 | "me-south-1": 0.02, 506 | "sa-east-1": 0.02, 507 | "us-east-1": 0.02, 508 | "us-east-2": 0.02, 509 | "us-west-1": 0.02, 510 | "us-west-2": 0.02 511 | } 512 | } -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 9 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 10 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 11 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 12 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 13 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 14 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 15 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 16 | cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= 17 | cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= 18 | cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= 19 | cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 20 | cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= 21 | cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= 22 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 23 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 24 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 25 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 26 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 27 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 28 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 29 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 30 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 31 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 32 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 33 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 34 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 35 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 36 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 37 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 38 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 39 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 40 | github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= 41 | github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= 42 | github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= 43 | github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= 44 | github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= 45 | github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= 46 | github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= 47 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 48 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 49 | github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= 50 | github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= 51 | github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= 52 | github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= 53 | github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= 54 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 55 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 56 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 57 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 58 | github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= 59 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 60 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 61 | github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= 62 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 63 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 64 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 65 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 66 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 67 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 68 | github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= 69 | github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 70 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 71 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 72 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 73 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 74 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 75 | github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 76 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 77 | github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= 78 | github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 79 | github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 80 | github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 81 | github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 82 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 83 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 84 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 85 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 86 | github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= 87 | github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= 88 | github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 89 | github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 90 | github.com/emicklei/go-restful v2.16.0+incompatible h1:rgqiKNjTnFQA6kkhFe16D8epTksy9HQ1MyrbDXSdYhM= 91 | github.com/emicklei/go-restful v2.16.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 92 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 93 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 94 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 95 | github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 96 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 97 | github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= 98 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 99 | github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 100 | github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= 101 | github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= 102 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 103 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= 104 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 105 | github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= 106 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 107 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 108 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 109 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 110 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 111 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 112 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= 113 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 114 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 115 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= 116 | github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= 117 | github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= 118 | github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= 119 | github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 120 | github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= 121 | github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= 122 | github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= 123 | github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= 124 | github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= 125 | github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= 126 | github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 127 | github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= 128 | github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= 129 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 130 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 131 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 132 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 133 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 134 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 135 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 136 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 137 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 138 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 139 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 140 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 141 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 142 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 143 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 144 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 145 | github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= 146 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 147 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 148 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 149 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 150 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 151 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 152 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 153 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 154 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 155 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 156 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 157 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 158 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 159 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 160 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 161 | github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 162 | github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 163 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 164 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 165 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 166 | github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= 167 | github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= 168 | github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= 169 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 170 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 171 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 172 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 173 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 174 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 175 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 176 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 177 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 178 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 179 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 180 | github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= 181 | github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 182 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 183 | github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= 184 | github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 185 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 186 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 187 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 188 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 189 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 190 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 191 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 192 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 193 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 194 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 195 | github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 196 | github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 197 | github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 198 | github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 199 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 200 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 201 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 202 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 203 | github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= 204 | github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= 205 | github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 206 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 207 | github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 208 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 209 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 210 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 211 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 212 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 213 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 214 | github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= 215 | github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= 216 | github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= 217 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 218 | github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= 219 | github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 220 | github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= 221 | github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 222 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 223 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 224 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 225 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 226 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 227 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 228 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 229 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 230 | github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 231 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 232 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 233 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 234 | github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 235 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 236 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 237 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 238 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 239 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 240 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 241 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 242 | github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 243 | github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 244 | github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= 245 | github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 246 | github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= 247 | github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= 248 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= 249 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 250 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 251 | github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= 252 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 253 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 254 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 255 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 256 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 257 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 258 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 259 | github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 260 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= 261 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 262 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 263 | github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= 264 | github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 265 | github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= 266 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= 267 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 268 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 269 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 270 | github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= 271 | github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 272 | github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 273 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 274 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 275 | github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= 276 | github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 277 | github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 278 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 279 | github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= 280 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 281 | github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 282 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 283 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 284 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 285 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 286 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 287 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 288 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 289 | github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 290 | github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= 291 | github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= 292 | github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= 293 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 294 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 295 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 296 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= 297 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 298 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 299 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 300 | github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= 301 | github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= 302 | github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= 303 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 304 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 305 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 306 | github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 307 | github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= 308 | github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 309 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 310 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 311 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 312 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 313 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 314 | github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 315 | github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= 316 | github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= 317 | github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= 318 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 319 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 320 | github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= 321 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 322 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 323 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 324 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 325 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 326 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 327 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 328 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 329 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 330 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 331 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 332 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 333 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 334 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 335 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 336 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 337 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 338 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 339 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 340 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 341 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 342 | go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 343 | go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 344 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 345 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 346 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 347 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 348 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 349 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 350 | golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 351 | golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 352 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 353 | golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 354 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 355 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 356 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 357 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 358 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 359 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 360 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 361 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 362 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 363 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 364 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 365 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 366 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 367 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 368 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 369 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 370 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 371 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 372 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 373 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 374 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 375 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 376 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 377 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 378 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 379 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 380 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 381 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 382 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 383 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 384 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 385 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 386 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 387 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 388 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 389 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 390 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 391 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 392 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 393 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 394 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 395 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 396 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 397 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 398 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 399 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 400 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 401 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 402 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 403 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 404 | golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 405 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 406 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 407 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 408 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 409 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 410 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 411 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 412 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 413 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 414 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 415 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 416 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 417 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 418 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 419 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 420 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 421 | golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 422 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 423 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 424 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 425 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 426 | golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= 427 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 428 | golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 429 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 430 | golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 431 | golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 432 | golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 433 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 434 | golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= 435 | golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 436 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 437 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 438 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 439 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 440 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 441 | golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 442 | golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 443 | golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 444 | golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 445 | golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 446 | golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 447 | golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 448 | golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 449 | golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= 450 | golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 451 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 452 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 453 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 454 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 455 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 456 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 457 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 458 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 459 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 460 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 461 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 462 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 463 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 464 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 465 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 466 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 467 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 468 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 469 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 470 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 471 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 472 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 473 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 474 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 475 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 476 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 477 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 478 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 479 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 480 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 481 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 482 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 483 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 484 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 485 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 486 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 487 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 488 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 489 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 490 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 491 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 492 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 493 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 494 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 495 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 496 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 497 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 498 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 499 | golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 500 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 501 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 502 | golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 503 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 504 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 505 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 506 | golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 507 | golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 508 | golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 509 | golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 510 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 511 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 512 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 513 | golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 514 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 515 | golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 516 | golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 517 | golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 518 | golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 519 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 520 | golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 521 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 522 | golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= 523 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 524 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 525 | golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 526 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 527 | golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= 528 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 529 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 530 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 531 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 532 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 533 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 534 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 535 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 536 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 537 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 538 | golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= 539 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 540 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 541 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 542 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 543 | golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 544 | golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= 545 | golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 546 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 547 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 548 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 549 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 550 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 551 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 552 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 553 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 554 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 555 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 556 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 557 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 558 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 559 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 560 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 561 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 562 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 563 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 564 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 565 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 566 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 567 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 568 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 569 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 570 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 571 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 572 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 573 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 574 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 575 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 576 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 577 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 578 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 579 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 580 | golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 581 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 582 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 583 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 584 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 585 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 586 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 587 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 588 | golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= 589 | golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 590 | golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 591 | golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 592 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 593 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 594 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 595 | golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 596 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 597 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 598 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 599 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 600 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 601 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 602 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 603 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 604 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 605 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 606 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 607 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 608 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 609 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 610 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 611 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 612 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 613 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 614 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 615 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 616 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 617 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 618 | google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 619 | google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 620 | google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 621 | google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= 622 | google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= 623 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 624 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 625 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 626 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 627 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 628 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 629 | google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= 630 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 631 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 632 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 633 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 634 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 635 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 636 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 637 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 638 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 639 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 640 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 641 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 642 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 643 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 644 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 645 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 646 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 647 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 648 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 649 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 650 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 651 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 652 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 653 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 654 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 655 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 656 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 657 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 658 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 659 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 660 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 661 | google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 662 | google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 663 | google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 664 | google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 665 | google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 666 | google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 667 | google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 668 | google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 669 | google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 670 | google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 671 | google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= 672 | google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 h1:W70HjnmXFJm+8RNjOpIDYW2nKsSi/af0VvIZUtYkwuU= 673 | google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 674 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 675 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 676 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 677 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 678 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 679 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 680 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 681 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 682 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 683 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 684 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 685 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 686 | google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 687 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= 688 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= 689 | google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= 690 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 691 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 692 | google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 693 | google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 694 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 695 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 696 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 697 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 698 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 699 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 700 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 701 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 702 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 703 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 704 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 705 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 706 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 707 | google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= 708 | google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 709 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 710 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 711 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 712 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 713 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 714 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 715 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 716 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 717 | gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= 718 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 719 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 720 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 721 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 722 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 723 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 724 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 725 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 726 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 727 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 728 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 729 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 730 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 731 | gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 732 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 733 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 734 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 735 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 736 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 737 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 738 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 739 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 740 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 741 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 742 | istio.io/api v0.0.0-20220708132629-6a4e706e0018 h1:emO4DK9Nwxw/8QOtumxFe7YbnXWRoI37h9KbvWQhjXY= 743 | istio.io/api v0.0.0-20220708132629-6a4e706e0018/go.mod h1:hQkF0Q19MCmfOTre/Sg4KvrwwETq45oaFplnBm2p4j8= 744 | istio.io/client-go v1.12.0-alpha.5.0.20220708133129-920c6070d070 h1:bbCkKS1SDbZL+fSYs9cyKhAiUfjrNZ3v0soVMOLLf9A= 745 | istio.io/client-go v1.12.0-alpha.5.0.20220708133129-920c6070d070/go.mod h1:ucaAn6rcmYJas6n+ZSwqXvlytLt6hBLI1S1SSfQ4ESU= 746 | k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= 747 | k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= 748 | k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= 749 | k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= 750 | k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= 751 | k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= 752 | k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= 753 | k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= 754 | k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= 755 | k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= 756 | k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= 757 | k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= 758 | k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= 759 | k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= 760 | k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= 761 | k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= 762 | k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= 763 | k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= 764 | k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= 765 | k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= 766 | k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 767 | k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 768 | k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= 769 | k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 770 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 771 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 772 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 773 | sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= 774 | sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= 775 | sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= 776 | sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= 777 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= 778 | sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= 779 | sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= 780 | sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= 781 | --------------------------------------------------------------------------------