From 54d66814374ea57f5c2f3173336958fb7f59d056 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Tue, 22 Mar 2022 21:03:20 -0700 Subject: [PATCH] feat: set-namespace without kyaml/rnode dependencies (#769) --- .../.expected/diff.patch | 38 - examples/set-namespace-advanced/.krmignore | 1 - examples/set-namespace-advanced/Kptfile | 8 - examples/set-namespace-advanced/README.md | 70 -- .../set-namespace-advanced/fn-config.yaml | 11 - .../set-namespace-advanced/resources.yaml | 34 - .../.expected/diff.patch | 16 +- examples/set-namespace-imperative/app.yaml | 2 +- .../set-namespace-simple/.expected/diff.patch | 48 +- examples/set-namespace-simple/README.md | 7 +- examples/set-namespace-simple/resources.yaml | 50 +- functions/go/set-namespace/README.md | 94 +-- functions/go/set-namespace/generated/docs.go | 88 +-- functions/go/set-namespace/go.mod | 32 +- functions/go/set-namespace/go.sum | 693 +++++++++++++++--- functions/go/set-namespace/main.go | 157 +--- functions/go/set-namespace/metadata.yaml | 3 +- .../go/set-namespace/namespace_transformer.go | 225 ------ .../namespace_transformer_test.go | 540 -------------- .../go/set-namespace/transformer/namespace.go | 167 +++++ tests/set-namespace/crd/.expected/diff.patch | 14 - tests/set-namespace/crd/.krmignore | 1 - tests/set-namespace/crd/Kptfile | 8 - tests/set-namespace/crd/fn-config.yaml | 10 - tests/set-namespace/crd/resources.yaml | 8 - .../advanced/.expected/config.yaml | 1 - .../advanced/.expected/results.yaml | 12 - .../empty-input/advanced/.krmignore | 1 - .../empty-input/advanced/Kptfile | 8 - .../empty-input/advanced/fn-config.yaml | 4 - .../empty-input/advanced/resources.yaml | 25 - .../empty-input/simple/.expected/config.yaml | 1 - .../empty-input/simple/.expected/results.yaml | 12 - .../empty-input/simple/.krmignore | 1 - .../set-namespace/empty-input/simple/Kptfile | 8 - .../empty-input/simple/resources.yaml | 19 - .../.expected/diff.patch | 52 -- .../ensure-name-substring/.krmignore | 1 - .../ensure-name-substring/Kptfile | 12 - .../ensure-name-substring/resources.yaml | 36 - .../legacy-config/.expected/diff.patch | 38 - tests/set-namespace/legacy-config/.krmignore | 1 - tests/set-namespace/legacy-config/Kptfile | 8 - .../legacy-config/fn-config.yaml | 11 - .../legacy-config/resources.yaml | 34 - .../local-config/.expected/diff.patch | 22 - tests/set-namespace/local-config/.krmignore | 1 - tests/set-namespace/local-config/Kptfile | 8 - .../set-namespace/local-config/fn-config.yaml | 7 - .../local-config/local-config.yaml | 8 - .../set-namespace/local-config/resources.yaml | 6 - .../rolebindings/.expected/diff.patch | 42 -- tests/set-namespace/rolebindings/.krmignore | 1 - tests/set-namespace/rolebindings/Kptfile | 9 - .../set-namespace/rolebindings/resources.yaml | 36 - 55 files changed, 886 insertions(+), 1864 deletions(-) delete mode 100644 examples/set-namespace-advanced/.expected/diff.patch delete mode 100644 examples/set-namespace-advanced/.krmignore delete mode 100644 examples/set-namespace-advanced/Kptfile delete mode 100644 examples/set-namespace-advanced/README.md delete mode 100644 examples/set-namespace-advanced/fn-config.yaml delete mode 100644 examples/set-namespace-advanced/resources.yaml delete mode 100644 functions/go/set-namespace/namespace_transformer.go delete mode 100644 functions/go/set-namespace/namespace_transformer_test.go create mode 100644 functions/go/set-namespace/transformer/namespace.go delete mode 100644 tests/set-namespace/crd/.expected/diff.patch delete mode 100644 tests/set-namespace/crd/.krmignore delete mode 100644 tests/set-namespace/crd/Kptfile delete mode 100644 tests/set-namespace/crd/fn-config.yaml delete mode 100644 tests/set-namespace/crd/resources.yaml delete mode 100644 tests/set-namespace/empty-input/advanced/.expected/config.yaml delete mode 100644 tests/set-namespace/empty-input/advanced/.expected/results.yaml delete mode 100644 tests/set-namespace/empty-input/advanced/.krmignore delete mode 100644 tests/set-namespace/empty-input/advanced/Kptfile delete mode 100644 tests/set-namespace/empty-input/advanced/fn-config.yaml delete mode 100644 tests/set-namespace/empty-input/advanced/resources.yaml delete mode 100644 tests/set-namespace/empty-input/simple/.expected/config.yaml delete mode 100644 tests/set-namespace/empty-input/simple/.expected/results.yaml delete mode 100644 tests/set-namespace/empty-input/simple/.krmignore delete mode 100644 tests/set-namespace/empty-input/simple/Kptfile delete mode 100644 tests/set-namespace/empty-input/simple/resources.yaml delete mode 100644 tests/set-namespace/ensure-name-substring/.expected/diff.patch delete mode 100644 tests/set-namespace/ensure-name-substring/.krmignore delete mode 100644 tests/set-namespace/ensure-name-substring/Kptfile delete mode 100644 tests/set-namespace/ensure-name-substring/resources.yaml delete mode 100644 tests/set-namespace/legacy-config/.expected/diff.patch delete mode 100644 tests/set-namespace/legacy-config/.krmignore delete mode 100644 tests/set-namespace/legacy-config/Kptfile delete mode 100644 tests/set-namespace/legacy-config/fn-config.yaml delete mode 100644 tests/set-namespace/legacy-config/resources.yaml delete mode 100644 tests/set-namespace/local-config/.expected/diff.patch delete mode 100644 tests/set-namespace/local-config/.krmignore delete mode 100644 tests/set-namespace/local-config/Kptfile delete mode 100644 tests/set-namespace/local-config/fn-config.yaml delete mode 100644 tests/set-namespace/local-config/local-config.yaml delete mode 100644 tests/set-namespace/local-config/resources.yaml delete mode 100644 tests/set-namespace/rolebindings/.expected/diff.patch delete mode 100644 tests/set-namespace/rolebindings/.krmignore delete mode 100644 tests/set-namespace/rolebindings/Kptfile delete mode 100644 tests/set-namespace/rolebindings/resources.yaml diff --git a/examples/set-namespace-advanced/.expected/diff.patch b/examples/set-namespace-advanced/.expected/diff.patch deleted file mode 100644 index 37b424b26..000000000 --- a/examples/set-namespace-advanced/.expected/diff.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/resources.yaml b/resources.yaml -index 517a507..7dfa8c1 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -2,6 +2,7 @@ apiVersion: v1 - kind: ConfigMap - metadata: - name: the-map -+ namespace: example-ns - data: - some-key: some-value - --- -@@ -9,7 +10,7 @@ apiVersion: v1 - kind: Service - metadata: - name: the-service -- namespace: the-namespace -+ namespace: example-ns - spec: - ports: - - name: etcd-server-ssl -@@ -22,13 +23,14 @@ spec: - apiVersion: v1 - kind: Namespace - metadata: -- name: old-name -+ name: example-ns - --- - apiVersion: dev.example.com/v1 - kind: MyResource - metadata: - name: the-service -- namespace: the-namespace -+ namespace: example-ns - spec: - configmapRef: - name: the-map -+ namespace: example-ns diff --git a/examples/set-namespace-advanced/.krmignore b/examples/set-namespace-advanced/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/examples/set-namespace-advanced/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/examples/set-namespace-advanced/Kptfile b/examples/set-namespace-advanced/Kptfile deleted file mode 100644 index 048accc40..000000000 --- a/examples/set-namespace-advanced/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml diff --git a/examples/set-namespace-advanced/README.md b/examples/set-namespace-advanced/README.md deleted file mode 100644 index 642c308c0..000000000 --- a/examples/set-namespace-advanced/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# set-namespace: Advanced Example - -### Overview - -This example demonstrates how to declaratively run [`set-namespace`] function to -add or replace the `.metadata.namespace` field on all resources except for those -known to be cluster-scoped. - -### Fetch the example package - -Get the example package by running the following commands: - -```shell -$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/set-namespace-advanced -``` - -We use the following `Kptfile` and `fn-config.yaml` to configure the function. - -```yaml -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml -``` - -```yaml -# fn-config.yaml -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: - name: my-config -namespace: example-ns -additionalNamespaceFields: - - group: dev.example.com - version: v1 - kind: MyResource - path: spec/configmapRef/namespace - create: true -``` - -`set-namespace` function not only support `ConfigMap` but also a custom resource -of kind `SetNamespace` as the function configuration. In the `Kptfile`, we -specify `configPath` to point to the `functionConfig` file. The desired -namespace is provided using the `namespace` field in the function configuration. - -If you have a resource that uses namespace in fields other -than `metadata.namespace`, you can use -`additionalNamespaceFields` to update those namespace fields. - -In this example, we want the namespace to be set in -field `spec.configmapRef.namespace` in resources of kind `MyResource` as well. -We specify it in field `additionalNamespaceFields`. - -### Function invocation - -Invoke the function by running the following commands: - -```shell -$ kpt fn render set-namespace-advanced -``` - -### Expected result - -Check all resources have `.metadata.namespace` set to `example-ns`: - -[`set-namespace`]: https://catalog.kpt.dev/set-namespace/v0.1/ diff --git a/examples/set-namespace-advanced/fn-config.yaml b/examples/set-namespace-advanced/fn-config.yaml deleted file mode 100644 index 5daf9793c..000000000 --- a/examples/set-namespace-advanced/fn-config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -namespace: example-ns -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: - name: my-config -additionalNamespaceFields: - - kind: MyResource - create: true - group: dev.example.com - path: spec/configmapRef/namespace - version: v1 diff --git a/examples/set-namespace-advanced/resources.yaml b/examples/set-namespace-advanced/resources.yaml deleted file mode 100644 index 517a507a8..000000000 --- a/examples/set-namespace-advanced/resources.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value ---- -apiVersion: v1 -kind: Service -metadata: - name: the-service - namespace: the-namespace -spec: - ports: - - name: etcd-server-ssl - port: 2380 - - name: etcd-client-ssl - port: 2379 - clusterIP: None - publishNotReadyAddresses: true ---- -apiVersion: v1 -kind: Namespace -metadata: - name: old-name ---- -apiVersion: dev.example.com/v1 -kind: MyResource -metadata: - name: the-service - namespace: the-namespace -spec: - configmapRef: - name: the-map diff --git a/examples/set-namespace-imperative/.expected/diff.patch b/examples/set-namespace-imperative/.expected/diff.patch index ace8c1928..6f0e0d736 100644 --- a/examples/set-namespace-imperative/.expected/diff.patch +++ b/examples/set-namespace-imperative/.expected/diff.patch @@ -1,16 +1,8 @@ diff --git a/app.yaml b/app.yaml -index 53c70b1..15a02f9 100644 +index 1f8aeee..33e42da 100644 --- a/app.yaml +++ b/app.yaml -@@ -2,6 +2,7 @@ apiVersion: v1 - kind: ConfigMap - metadata: - name: the-map -+ namespace: example-ns - data: - some-key: some-value - --- -@@ -9,7 +10,7 @@ apiVersion: v1 +@@ -9,7 +9,7 @@ apiVersion: v1 kind: Service metadata: name: the-service @@ -19,9 +11,9 @@ index 53c70b1..15a02f9 100644 spec: ports: - name: etcd-server-ssl -@@ -21,4 +22,4 @@ spec: +@@ -21,4 +21,4 @@ spec: apiVersion: v1 kind: Namespace metadata: -- name: old-name +- name: example + name: example-ns diff --git a/examples/set-namespace-imperative/app.yaml b/examples/set-namespace-imperative/app.yaml index 53c70b1b0..1f8aeeead 100644 --- a/examples/set-namespace-imperative/app.yaml +++ b/examples/set-namespace-imperative/app.yaml @@ -21,4 +21,4 @@ spec: apiVersion: v1 kind: Namespace metadata: - name: old-name + name: example diff --git a/examples/set-namespace-simple/.expected/diff.patch b/examples/set-namespace-simple/.expected/diff.patch index 43f2d7e0c..ab027c51f 100644 --- a/examples/set-namespace-simple/.expected/diff.patch +++ b/examples/set-namespace-simple/.expected/diff.patch @@ -1,27 +1,43 @@ diff --git a/resources.yaml b/resources.yaml -index 468897a..8d5a446 100644 +index 85885ac..f93e6a4 100644 --- a/resources.yaml +++ b/resources.yaml -@@ -2,6 +2,7 @@ apiVersion: v1 - kind: ConfigMap - metadata: - name: the-map -+ namespace: example-ns - data: - some-key: some-value - --- -@@ -9,7 +10,7 @@ apiVersion: v1 +@@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: name: the-service -- namespace: the-namespace +- namespace: example + namespace: example-ns - spec: - ports: - - name: etcd-server-ssl -@@ -22,4 +23,4 @@ spec: + --- apiVersion: v1 kind: Namespace metadata: -- name: old-name +- name: example + name: example-ns + --- + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition +@@ -20,7 +20,7 @@ spec: + clientConfig: + service: + name: crd-svc +- namespace: example ++ namespace: example-ns + --- + apiVersion: apiregistration.k8s.io/v1 + kind: APIService +@@ -29,7 +29,7 @@ metadata: + spec: + service: + name: api-svc +- namespace: example ++ namespace: example-ns + --- + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding +@@ -38,4 +38,4 @@ metadata: + subjects: + - kind: ServiceAccount + name: default +- namespace: example ++ namespace: example-ns diff --git a/examples/set-namespace-simple/README.md b/examples/set-namespace-simple/README.md index 5344eed4e..e4a5be6af 100644 --- a/examples/set-namespace-simple/README.md +++ b/examples/set-namespace-simple/README.md @@ -2,9 +2,8 @@ ### Overview -This example demonstrates how to declaratively run [`set-namespace`] function -to adds or replaces the `.metadata.namespace` field on all resources except for -those known to be cluster-scoped. +This example demonstrates how to run [`set-namespace`] function +to replace the `namespace` resource type in a variety of KRM resources. ### Fetch the example package @@ -42,6 +41,6 @@ $ kpt fn render set-namespace-simple ### Expected result -Check all resources have `metadata.namespace` set to `example-ns`: +Check all resources have `metadata.namespace` set to `example-ns` [`set-namespace`]: https://catalog.kpt.dev/set-namespace/v0.1/ diff --git a/examples/set-namespace-simple/resources.yaml b/examples/set-namespace-simple/resources.yaml index 468897aa7..85885ac6b 100644 --- a/examples/set-namespace-simple/resources.yaml +++ b/examples/set-namespace-simple/resources.yaml @@ -1,25 +1,41 @@ apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value ---- -apiVersion: v1 kind: Service metadata: name: the-service - namespace: the-namespace -spec: - ports: - - name: etcd-server-ssl - port: 2380 - - name: etcd-client-ssl - port: 2379 - clusterIP: None - publishNotReadyAddresses: true + namespace: example --- apiVersion: v1 kind: Namespace metadata: - name: old-name + name: example +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: the-crd +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: crd-svc + namespace: example +--- +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: the-api-service +spec: + service: + name: api-svc + namespace: example +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: crb1 +subjects: + - kind: ServiceAccount + name: default + namespace: example diff --git a/functions/go/set-namespace/README.md b/functions/go/set-namespace/README.md index 06f2c7ce8..762475272 100644 --- a/functions/go/set-namespace/README.md +++ b/functions/go/set-namespace/README.md @@ -4,76 +4,51 @@ -The `set-namespace` function update or add namespace to all namespaced -resources. Kubernetes supports multiple virtual clusters backed by the same -physical cluster through namespaces. +The `set-namespace` function replaces the `namespace` specific resource type in a variety +of KRM resources. -Namespaces are often used in the following scenarios: + +Namespaces are often used in the following scenarios: - Separate resources between environments (prod, staging and test). - Separate resources between different team or users to divide resource quota. - - -You can learn more about namespace [here][namespace]. - ## Usage This function can be used with any KRM function orchestrators (e.g. kpt). -For all namespaced resurces, the `set-namespace` function adds the namespace -if `metadata.namespace` doesn't exist. Otherwise, it updates the existing value. -It will skip the resources that are known to be cluster-scoped (e.g. `Node` -, `CustomResourceDefinitions`, `ClusterRole`). Whether a resource is namespaced -is determined by the OpenAPI schema. If the API path -contains `namespaces/{namespace}` then the resource is considered namespaced. -Otherwise, it's not. Currently, this function is using API version 1.20.4. - -In addition to updating the `metadata.namespace` field for applicable resources, -by default the function will also update the [fields][commonnamespace] that -target the namespace. There are a few cases that worth pointing out: - -- If there is a `Namespace` resource, its `metadata.name` field will be updated. -- If there's a `RoleBinding` or `ClusterRoleBinding` resource, the function will - update the namespace in the `ServiceAccount` if one of the following are true: - 1) the subject element `name` is `default`. - 2) the subject element `name` matches the name of a `ServiceAccount` resource declared in the package. +- If the resource is `Namespace`, `set-namespace` updates the `metadata.name` field. +- If the resource is `RoleBinding` or `ClusterRoleBinding` resource, the function updates + the namespace field in the `subjects` element whose name is `default`. +- If the resource is `CustomResourceDefinition` (CRD), `set-namespace` updates the + `spec/conversion/webhook/clientConfig/service/namespace` field. +- If the resource is `APIService`, `set-namespace` updates the + `spec/service/namespace` field. - If there is a [`depends-on`] annotation for a namespaced resource, the namespace section of the annotation will be updated if the referenced resource is also declared in the package. -In the following example, the `set-namespace` function will update: -- `subjects[0].namespace` since `subjects[0].name` is `default`. -- `subjects[1].namespace` since `subjects[1].name` matches a `ServiceAccount` - name declared in the package. - ```yaml apiVersion: v1 kind: ServiceAccount metadata: name: sa - namespace: ns + namespace: example annotations: - config.kubernetes.io/depends-on: /namespaces/ns/ServiceAccount/foo # <= this will NOT be updated (resource not declared) + config.kubernetes.io/depends-on: /namespaces/example/ServiceAccount/foo # <= this will NOT be updated (resource not declared) --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: ... annotations: - config.kubernetes.io/depends-on: /namespaces/ns/ServiceAccount/sa # <== this will be updated (resource declared) + config.kubernetes.io/depends-on: /namespaces/example/ServiceAccount/sa # <== this will be updated (resource declared) subjects: - kind: ServiceAccount name: default # <================== name default is used - namespace: ns # <================== this will be updated - - kind: ServiceAccount - name: sa # <======================= name matches above ServiceAccount - namespace: ns # <================== this will be updated - - kind: ServiceAccount - name: other-service-account # <==== name does not match any included resource - namespace: ns # <================== this will NOT be updated + namespace: example # <================== this will be updated roleRef: kind: Role name: confluent-operator @@ -104,47 +79,8 @@ data: namespace: staging ``` -To use a `SetNamespace` custom resource as the `functionConfig`, the desired -namespace must be specified in the `namespace` field. Sometimes you have -resources (especially custom resources) that have namespace fields in fields -other than the [defaults][commonnamespace], you can specify such label fields -using `additionalNamespaceFields`. It will be used jointly with the -[defaults][commonnamespace]. - -`additionalNamespaceFields` has following fields: - -- `group`: Select the resources by API version group. Will select all groups if - omitted. -- `version`: Select the resources by API version. Will select all versions if - omitted. -- `kind`: Select the resources by resource kind. Will select all kinds if - omitted. -- `path`: Specify the path to the field that the value needs to be updated. This - field is required. -- `create`: If it's set to true, the field specified will be created if it - doesn't exist. Otherwise, the function will only update the existing field. - -To add namespace `staging` to all built-in resources and the -path `spec/selector/namespace` in in `MyKind` resource, we use the -following `functionConfig`: - -```yaml -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: -name: my-config -additionalNamespaceFields: - - path: spec/selector/namespace - kind: MyKind - version: v1 - group: example.com - create: true -``` - [namespace]: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ [depends-on]: https://kpt.dev/reference/annotations/depends-on/ - -[commonnamespace]: https://github.com/kubernetes-sigs/kustomize/blob/master/api/konfig/builtinpluginconsts/namespace.go#L7 \ No newline at end of file diff --git a/functions/go/set-namespace/generated/docs.go b/functions/go/set-namespace/generated/docs.go index d82faf071..489ae77e0 100644 --- a/functions/go/set-namespace/generated/docs.go +++ b/functions/go/set-namespace/generated/docs.go @@ -3,69 +3,42 @@ // Code generated by "mdtogo"; DO NOT EDIT. package generated -var SetNamespaceShort = `The ` + "`" + `set-namespace` + "`" + ` function update or add namespace to all namespaced -resources. Kubernetes supports multiple virtual clusters backed by the same -physical cluster through namespaces. - -Namespaces are often used in the following scenarios: - -- Separate resources between environments (prod, staging and test). -- Separate resources between different team or users to divide resource quota.` +var SetNamespaceShort = `The ` + "`" + `set-namespace` + "`" + ` function replaces the ` + "`" + `namespace` + "`" + ` specific resource type in a variety +of KRM resources.` var SetNamespaceLong = ` ## Usage This function can be used with any KRM function orchestrators (e.g. kpt). -For all namespaced resurces, the ` + "`" + `set-namespace` + "`" + ` function adds the namespace -if ` + "`" + `metadata.namespace` + "`" + ` doesn't exist. Otherwise, it updates the existing value. -It will skip the resources that are known to be cluster-scoped (e.g. ` + "`" + `Node` + "`" + ` -, ` + "`" + `CustomResourceDefinitions` + "`" + `, ` + "`" + `ClusterRole` + "`" + `). Whether a resource is namespaced -is determined by the OpenAPI schema. If the API path -contains ` + "`" + `namespaces/{namespace}` + "`" + ` then the resource is considered namespaced. -Otherwise, it's not. Currently, this function is using API version 1.20.4. - -In addition to updating the ` + "`" + `metadata.namespace` + "`" + ` field for applicable resources, -by default the function will also update the [fields][commonnamespace] that -target the namespace. There are a few cases that worth pointing out: - -- If there is a ` + "`" + `Namespace` + "`" + ` resource, its ` + "`" + `metadata.name` + "`" + ` field will be updated. -- If there's a ` + "`" + `RoleBinding` + "`" + ` or ` + "`" + `ClusterRoleBinding` + "`" + ` resource, the function will - update the namespace in the ` + "`" + `ServiceAccount` + "`" + ` if one of the following are true: - 1) the subject element ` + "`" + `name` + "`" + ` is ` + "`" + `default` + "`" + `. - 2) the subject element ` + "`" + `name` + "`" + ` matches the name of a ` + "`" + `ServiceAccount` + "`" + ` resource declared in the package. +- If the resource is ` + "`" + `Namespace` + "`" + `, ` + "`" + `set-namespace` + "`" + ` updates the ` + "`" + `metadata.name` + "`" + ` field. +- If the resource is ` + "`" + `RoleBinding` + "`" + ` or ` + "`" + `ClusterRoleBinding` + "`" + ` resource, the function updates + the namespace field in the ` + "`" + `subjects` + "`" + ` element whose name is ` + "`" + `default` + "`" + `. +- If the resource is ` + "`" + `CustomResourceDefinition` + "`" + ` (CRD), ` + "`" + `set-namespace` + "`" + ` updates the + ` + "`" + `spec/conversion/webhook/clientConfig/service/namespace` + "`" + ` field. +- If the resource is ` + "`" + `APIService` + "`" + `, ` + "`" + `set-namespace` + "`" + ` updates the + ` + "`" + `spec/service/namespace` + "`" + ` field. - If there is a [` + "`" + `depends-on` + "`" + `] annotation for a namespaced resource, the namespace section of the annotation will be updated if the referenced resource is also declared in the package. -In the following example, the ` + "`" + `set-namespace` + "`" + ` function will update: -- ` + "`" + `subjects[0].namespace` + "`" + ` since ` + "`" + `subjects[0].name` + "`" + ` is ` + "`" + `default` + "`" + `. -- ` + "`" + `subjects[1].namespace` + "`" + ` since ` + "`" + `subjects[1].name` + "`" + ` matches a ` + "`" + `ServiceAccount` + "`" + ` - name declared in the package. - apiVersion: v1 kind: ServiceAccount metadata: name: sa - namespace: ns + namespace: example annotations: - config.kubernetes.io/depends-on: /namespaces/ns/ServiceAccount/foo # <= this will NOT be updated (resource not declared) + config.kubernetes.io/depends-on: /namespaces/example/ServiceAccount/foo # <= this will NOT be updated (resource not declared) --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: ... annotations: - config.kubernetes.io/depends-on: /namespaces/ns/ServiceAccount/sa # <== this will be updated (resource declared) + config.kubernetes.io/depends-on: /namespaces/example/ServiceAccount/sa # <== this will be updated (resource declared) subjects: - kind: ServiceAccount name: default # <================== name default is used - namespace: ns # <================== this will be updated - - kind: ServiceAccount - name: sa # <======================= name matches above ServiceAccount - namespace: ns # <================== this will be updated - - kind: ServiceAccount - name: other-service-account # <==== name does not match any included resource - namespace: ns # <================== this will NOT be updated + namespace: example # <================== this will be updated roleRef: kind: Role name: confluent-operator @@ -92,39 +65,4 @@ following ` + "`" + `functionConfig` + "`" + `: name: my-config data: namespace: staging - -To use a ` + "`" + `SetNamespace` + "`" + ` custom resource as the ` + "`" + `functionConfig` + "`" + `, the desired -namespace must be specified in the ` + "`" + `namespace` + "`" + ` field. Sometimes you have -resources (especially custom resources) that have namespace fields in fields -other than the [defaults][commonnamespace], you can specify such label fields -using ` + "`" + `additionalNamespaceFields` + "`" + `. It will be used jointly with the -[defaults][commonnamespace]. - -` + "`" + `additionalNamespaceFields` + "`" + ` has following fields: - -- ` + "`" + `group` + "`" + `: Select the resources by API version group. Will select all groups if - omitted. -- ` + "`" + `version` + "`" + `: Select the resources by API version. Will select all versions if - omitted. -- ` + "`" + `kind` + "`" + `: Select the resources by resource kind. Will select all kinds if - omitted. -- ` + "`" + `path` + "`" + `: Specify the path to the field that the value needs to be updated. This - field is required. -- ` + "`" + `create` + "`" + `: If it's set to true, the field specified will be created if it - doesn't exist. Otherwise, the function will only update the existing field. - -To add namespace ` + "`" + `staging` + "`" + ` to all built-in resources and the -path ` + "`" + `spec/selector/namespace` + "`" + ` in in ` + "`" + `MyKind` + "`" + ` resource, we use the -following ` + "`" + `functionConfig` + "`" + `: - - apiVersion: fn.kpt.dev/v1alpha1 - kind: SetNamespace - metadata: - name: my-config - additionalNamespaceFields: - - path: spec/selector/namespace - kind: MyKind - version: v1 - group: example.com - create: true ` diff --git a/functions/go/set-namespace/go.mod b/functions/go/set-namespace/go.mod index f3242e273..a322bc7ef 100644 --- a/functions/go/set-namespace/go.mod +++ b/functions/go/set-namespace/go.mod @@ -2,32 +2,28 @@ module github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/set-na go 1.17 -require ( - github.com/stretchr/testify v1.7.0 - sigs.k8s.io/kustomize/api v0.8.11-0.20210614195535-7e8ba62e9fd9 - sigs.k8s.io/kustomize/kyaml v0.10.21 - sigs.k8s.io/yaml v1.2.0 -) +require github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20220316202203-f9115a993ebd require ( github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-errors/errors v1.0.1 // indirect - github.com/go-openapi/jsonpointer v0.19.3 // indirect - github.com/go-openapi/jsonreference v0.19.3 // indirect - github.com/go-openapi/swag v0.19.5 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/mailru/easyjson v0.7.0 // indirect + github.com/go-errors/errors v1.4.2 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/spf13/cobra v1.0.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect - golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect - golang.org/x/text v0.3.2 // indirect + github.com/stretchr/testify v1.7.1 // indirect + github.com/xlab/treeprint v1.1.0 // indirect + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/text v0.3.7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 // indirect + sigs.k8s.io/kustomize/kyaml v0.13.3 // indirect ) diff --git a/functions/go/set-namespace/go.sum b/functions/go/set-namespace/go.sum index aff7f20ed..26af51598 100644 --- a/functions/go/set-namespace/go.sum +++ b/functions/go/set-namespace/go.sum @@ -1,224 +1,680 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20220316202203-f9115a993ebd h1:PzlNXoJTvlzct3n2hw3gmM6C9S/W4wmeaA3qqkM4TTQ= +github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20220316202203-f9115a993ebd/go.mod h1:hENpuHQH/bIfHUCuG4hvzb5i4doJ1KTId5EdWBg6AvU= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -226,15 +682,38 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E= +k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= +k8s.io/apimachinery v0.23.4 h1:fhnuMd/xUL3Cjfl64j5ULKZ1/J9n8NuQEgNL+WXWfdM= +k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -sigs.k8s.io/kustomize/api v0.8.11-0.20210614195535-7e8ba62e9fd9 h1:ge8BT4wAOMQRJ6wL5E7/d4vyI+K3ckJf40EbEyggvWA= -sigs.k8s.io/kustomize/api v0.8.11-0.20210614195535-7e8ba62e9fd9/go.mod h1:C431Rq3Ne1LxTCWA93ZN1R5v0KxioCGVlLVaUlFDvJw= -sigs.k8s.io/kustomize/kyaml v0.10.20/go.mod h1:TYWhGwW9vjoRh3rWqBwB/ZOXyEGRVWe7Ggc3+KZIO+c= -sigs.k8s.io/kustomize/kyaml v0.10.21 h1:KdoEgz3HzmcaLUTFqs6aaqFpsaA9MVRIwOZbi8vMaD0= -sigs.k8s.io/kustomize/kyaml v0.10.21/go.mod h1:TYWhGwW9vjoRh3rWqBwB/ZOXyEGRVWe7Ggc3+KZIO+c= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18 h1:M0Korml79JW27ndc6lxLxkNP8QVqdpBj0MIEZliKy8A= +k8s.io/kube-openapi v0.0.0-20220316025549-ddc66922ab18/go.mod h1:p8bjuqy9+BWvBDEBjdeVYtX6kMWWg6OhY1V1jhC9MPI= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/kustomize/kyaml v0.13.3 h1:tNNQIC+8cc+aXFTVg+RtQAOsjwUdYBZRAgYOVI3RBc4= +sigs.k8s.io/kustomize/kyaml v0.13.3/go.mod h1:/ya3Gk4diiQzlE4mBh7wykyLRFZNvqlbh+JnwQ9Vhrc= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/functions/go/set-namespace/main.go b/functions/go/set-namespace/main.go index 2bf3d3339..c0a0aef13 100644 --- a/functions/go/set-namespace/main.go +++ b/functions/go/set-namespace/main.go @@ -1,150 +1,27 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package main import ( - "fmt" "os" - "github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/set-namespace/generated" - "sigs.k8s.io/kustomize/api/hasher" - "sigs.k8s.io/kustomize/api/konfig/builtinpluginconsts" - "sigs.k8s.io/kustomize/api/resmap" - "sigs.k8s.io/kustomize/api/resource" - "sigs.k8s.io/kustomize/api/types" - "sigs.k8s.io/kustomize/kyaml/fn/framework" - "sigs.k8s.io/kustomize/kyaml/fn/framework/command" - kyaml "sigs.k8s.io/kustomize/kyaml/yaml" - "sigs.k8s.io/yaml" + "github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/set-namespace/transformer" + "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" ) -const ( - fnConfigGroup = "fn.kpt.dev" - fnConfigVersion = "v1alpha1" - fnConfigAPIVersion = fnConfigGroup + "/" + fnConfigVersion - legacyFnConfigKind = "SetNamespaceConfig" - fnConfigKind = "SetNamespace" -) - -//nolint func main() { - asp := SetNamespaceProcessor{} - cmd := command.Build(&asp, command.StandaloneEnabled, false) - - cmd.Short = generated.SetNamespaceShort - cmd.Long = generated.SetNamespaceLong - if err := cmd.Execute(); err != nil { + if err := fn.AsMain(fn.ResourceListProcessorFunc(transformer.SetNamespace)); err != nil { os.Exit(1) } -} - -type SetNamespaceProcessor struct{} - -func (snp *SetNamespaceProcessor) Process(resourceList *framework.ResourceList) error { - err := run(resourceList) - if err != nil { - resourceList.Result = &framework.Result{ - Name: "set-namespace", - Items: []framework.ResultItem{ - { - Message: err.Error(), - Severity: framework.Error, - }, - }, - } - return resourceList.Result - } - return nil -} - -type transformerConfig struct { - FieldSpecs types.FsSlice `json:"namespace,omitempty" yaml:"namespace,omitempty"` -} - -type setNamespaceFunction struct { - kyaml.ResourceMeta `json:",inline" yaml:",inline"` - plugin `json:",inline" yaml:",inline"` -} - -func (f *setNamespaceFunction) Config(rn *kyaml.RNode) error { - switch { - case f.validGVK(rn, "v1", "ConfigMap"): - f.plugin.Namespace = rn.GetDataMap()["namespace"] - case f.validGVK(rn, fnConfigAPIVersion, legacyFnConfigKind): - fallthrough - case f.validGVK(rn, fnConfigAPIVersion, fnConfigKind): - // input config is a CRD - y, err := rn.String() - if err != nil { - return fmt.Errorf("cannot get YAML from RNode: %w", err) - } - err = f.plugin.Config(nil, []byte(y)) - if err != nil { - return err - } - default: - return fmt.Errorf("`functionConfig` must be a `ConfigMap` or `%s`", fnConfigKind) - } - - if f.plugin.Namespace == "" { - return fmt.Errorf("input namespace cannot be empty") - } - tc, err := getDefaultConfig() - if err != nil { - return err - } - // set default field specs - f.plugin.AdditionalNamespaceFields = append(f.plugin.AdditionalNamespaceFields, tc.FieldSpecs...) - return nil -} - -func (f *setNamespaceFunction) Run(items []*kyaml.RNode) ([]*kyaml.RNode, error) { - resmapFactory := newResMapFactory() - resMap, err := resmapFactory.NewResMapFromRNodeSlice(items) - if err != nil { - return nil, err - } - err = f.plugin.Transform(resMap) - if err != nil { - return nil, fmt.Errorf("failed to run transformer: %w", err) - } - return resMap.ToRNodeSlice(), nil -} - -func (f *setNamespaceFunction) validGVK(rn *kyaml.RNode, apiVersion, kind string) bool { - meta, err := rn.GetMeta() - if err != nil { - return false - } - if meta.APIVersion != apiVersion || meta.Kind != kind { - return false - } - return true -} - -//nolint -func getDefaultConfig() (transformerConfig, error) { - defaultConfigString := builtinpluginconsts.GetDefaultFieldSpecsAsMap()["namespace"] - var defaultConfig transformerConfig - err := yaml.Unmarshal([]byte(defaultConfigString), &defaultConfig) - return defaultConfig, err -} - -//nolint -func newResMapFactory() *resmap.Factory { - resourceFactory := resource.NewFactory(&hasher.Hasher{}) - resourceFactory.IncludeLocalConfigs = true - return resmap.NewFactory(resourceFactory) -} - -func run(resourceList *framework.ResourceList) error { - var fn setNamespaceFunction - err := fn.Config(resourceList.FunctionConfig) - if err != nil { - return fmt.Errorf("failed to configure function: %w", err) - } - - resourceList.Items, err = fn.Run(resourceList.Items) - if err != nil { - return fmt.Errorf("failed to run function: %w", err) - } - return nil -} +} \ No newline at end of file diff --git a/functions/go/set-namespace/metadata.yaml b/functions/go/set-namespace/metadata.yaml index 32dce6448..55b1fc857 100644 --- a/functions/go/set-namespace/metadata.yaml +++ b/functions/go/set-namespace/metadata.yaml @@ -1,11 +1,10 @@ image: gcr.io/kpt-fn/set-namespace -description: Update or add namespace. +description: Update namespace. tags: - mutator sourceURL: https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/go/set-namespace examplePackageURLs: - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-namespace-simple - - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-namespace-advanced - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-namespace-imperative - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-namespace-depends-on emails: diff --git a/functions/go/set-namespace/namespace_transformer.go b/functions/go/set-namespace/namespace_transformer.go deleted file mode 100644 index ab4f7d590..000000000 --- a/functions/go/set-namespace/namespace_transformer.go +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2019 The Kubernetes Authors. -// SPDX-License-Identifier: Apache-2.0 - -//go:generate pluginator -package main - -import ( - "fmt" - "regexp" - "strings" - - "sigs.k8s.io/kustomize/api/filters/namespace" - "sigs.k8s.io/kustomize/api/resmap" - "sigs.k8s.io/kustomize/api/resource" - "sigs.k8s.io/kustomize/api/types" - "sigs.k8s.io/kustomize/kyaml/filtersutil" - "sigs.k8s.io/kustomize/kyaml/resid" - kyaml "sigs.k8s.io/kustomize/kyaml/yaml" - "sigs.k8s.io/yaml" -) - -const ( - subjectsField = "subjects" - serviceAccountKind = "ServiceAccount" - roleBindingKind = "RoleBinding" - clusterRoleBindingKind = "ClusterRoleBinding" - dependsOnAnnotation = "config.kubernetes.io/depends-on" -) - -// Constants for namespaced resources -const ( - groupIdx = 0 - namespaceIdx = 2 - kindIdx = 3 - nameIdx = 4 -) - -var ( - // Assumes alphanumeric characters, '-', or '.' - // /namespaces/// - namespacedResourcePattern = regexp.MustCompile(`\A([-.\w]*)/namespaces/([-.\w]*)/([-.\w]*)/([-.\w]*)\z`) -) - -// Change or set the namespace of non-cluster level resources. -type plugin struct { - // Desired namespace. - Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` - // FieldSpecs is deprecated, please use AdditionalNamespaceFields instead. - FieldSpecs []types.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"` - // AdditionalNamespaceFields is used to specify additional fields to set namespace. - AdditionalNamespaceFields []types.FieldSpec `json:"additionalNamespaceFields,omitempty" yaml:"additionalNamespaceFields,omitempty"` - // inputResourceLookup is used internally to track input resources - inputResourceLookup resourceLookup -} - -//noinspection GoUnusedGlobalVariable -var KustomizePlugin plugin - -func (p *plugin) Config( - _ *resmap.PluginHelpers, c []byte) (err error) { - p.Namespace = "" - p.FieldSpecs = nil - p.AdditionalNamespaceFields = nil - if err = yaml.Unmarshal(c, p); err != nil { - return fmt.Errorf("failed to unmarshal config %#v: %w", string(c), err) - } - if p.AdditionalNamespaceFields != nil && p.FieldSpecs != nil { - return fmt.Errorf("`fieldSpecs` has been deprecated, please rename it to `additionalLabelFields`") - } - if p.AdditionalNamespaceFields == nil && p.FieldSpecs != nil { - p.AdditionalNamespaceFields = p.FieldSpecs - } - return nil -} - -func (p *plugin) Transform(m resmap.ResMap) error { - if len(p.Namespace) == 0 { - return nil - } - p.inputResourceLookup.FromResMap(m) - for _, r := range m.Resources() { - if r.IsNilOrEmpty() { - // Don't mutate empty objects? - continue - } - err := filtersutil.ApplyToJSON(namespace.Filter{ - Namespace: p.Namespace, - FsSlice: p.AdditionalNamespaceFields, - }, r) - if err != nil { - return err - } - if err = p.updateRoleBinding(r); err != nil { - return err - } - if err = p.updateDependsOnAnnotation(r); err != nil { - return err - } - } - return nil -} - -// set namespace if input matches /namespaces/// -// returns (string, bool) where the bool indicates if namespace was set -func (p *plugin) setDependsOnNamespace(dependsOn string) (string, bool) { - if !namespacedResourcePattern.MatchString(dependsOn) { - return dependsOn, false - } - segments := strings.Split(dependsOn, "/") - rk := resourceKey{ - Group: segments[groupIdx], - Kind: segments[kindIdx], - Name: segments[nameIdx], - } - // Only update namespace if the referenced resource is included in input - if !p.inputResourceLookup.HasResource(rk) { - return dependsOn, false - } - segments[namespaceIdx] = p.Namespace - dependsOn = strings.Join(segments, "/") - return dependsOn, true -} - -// updateDependsOnAnnotation updates the namespace for the depends-on annotation -// if the annotation is for a namespaced resource. The expected syntax for a -// namespaced resource is /namespaces/// -func (p *plugin) updateDependsOnAnnotation(r *resource.Resource) error { - annotations := r.GetAnnotations() - dependsOn, ok := annotations[dependsOnAnnotation] - if !ok { - return nil - } - dependsOn, ok = p.setDependsOnNamespace(dependsOn) - if !ok { - return nil - } - annotations[dependsOnAnnotation] = dependsOn - if err := r.SetAnnotations(annotations); err != nil { - return err - } - return nil -} - -// updateRoleBinding extends the behavior of the upstream kustomize filter -// This extension adds the following behavior: -// Given a ServiceAccount is present in the ResourceList, additionally set the -// namespace for that ServiceAccount where it is referenced in the "subjects" -// field of a RoleBinding or ClusterRoleBinding -func (p *plugin) updateRoleBinding(r *resource.Resource) error { - kind := r.GetKind() - if kind != roleBindingKind && kind != clusterRoleBindingKind { - return nil - } - subjects, err := r.Pipe(kyaml.Lookup(subjectsField)) - if err != nil || kyaml.IsMissingOrNull(subjects) { - return err - } - - err = subjects.VisitElements(func(o *kyaml.RNode) error { - subjectKind := o.GetKind() - if subjectKind != serviceAccountKind { - return nil - } - rk := resourceKey{} - if err := rk.FromRNode(o); err != nil { - return nil - } - if !p.inputResourceLookup.HasResource(rk) { - return nil - } - v := kyaml.NewScalarRNode(p.Namespace) - return o.PipeE( - kyaml.LookupCreate(kyaml.ScalarNode, "namespace"), - kyaml.FieldSetter{Value: v}, - ) - }) - return err -} - -// resourceKey provides a key for looking up resources in resourceLookup -type resourceKey struct { - Group string - Kind string - Name string -} - -// FromRNode populates the fields of resourceKey from the provided RNode -func (rk *resourceKey) FromRNode(r *kyaml.RNode) error { - gvk := resid.GvkFromNode(r) - nameRN, err := r.Pipe(kyaml.Lookup("name")) - if err != nil { - return err - } - if kyaml.IsMissingOrNull(nameRN) { - s, _ := r.String() - return fmt.Errorf("RNode name missing or null from: %s", s) - } - rk.Kind = gvk.Kind - rk.Group = gvk.Group - rk.Name = kyaml.GetValue(nameRN) - return nil -} - -// resourceLookup provides an API for tracking resources -type resourceLookup struct { - resourceMap map[resourceKey]bool -} - -// FromResMap reads through a ResMap to populate ResourceLookup -func (rl *resourceLookup) FromResMap(m resmap.ResMap) { - rl.resourceMap = make(map[resourceKey]bool) - for _, r := range m.Resources() { - gvk := r.GetGvk() - rl.resourceMap[resourceKey{ - Group: gvk.Group, - Kind: gvk.Kind, - Name: r.GetName(), - }] = true - } -} - -// HasResource returns whether a Resource with the provided resourceKey is present -func (rl *resourceLookup) HasResource(rk resourceKey) bool { - return rl.resourceMap[rk] -} diff --git a/functions/go/set-namespace/namespace_transformer_test.go b/functions/go/set-namespace/namespace_transformer_test.go deleted file mode 100644 index 82d357016..000000000 --- a/functions/go/set-namespace/namespace_transformer_test.go +++ /dev/null @@ -1,540 +0,0 @@ -package main - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func runNamespaceTransformerE(config, input string) (string, error) { - resmapFactory := newResMapFactory() - resMap, err := resmapFactory.NewResMapFromBytes([]byte(input)) - if err != nil { - return "", err - } - - var plugin *plugin = &KustomizePlugin - err = plugin.Config(nil, []byte(config)) - if err != nil { - return "", err - } - defaultConfig, err := getDefaultConfig() - if err != nil { - return "", err - } - if len(plugin.AdditionalNamespaceFields) == 0 { - plugin.AdditionalNamespaceFields = defaultConfig.FieldSpecs - } - err = plugin.Transform(resMap) - if err != nil { - return "", err - } - y, err := resMap.AsYaml() - if err != nil { - return "", err - } - return string(y), nil -} - -func runNamespaceTransformer(t *testing.T, config, input string) string { - s, err := runNamespaceTransformerE(config, input) - if err != nil { - t.Fatal(err) - } - return s -} - -func TestNamespaceTransformer1(t *testing.T) { - config := ` -namespace: test -` - input := ` -apiVersion: v1 -kind: ConfigMap -metadata: - name: cm1 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: cm2 - namespace: foo ---- -apiVersion: v1 -kind: Service -metadata: - name: svc1 ---- -apiVersion: v1 -kind: Namespace -metadata: - name: ns1 ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: default - namespace: test ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: service-account - namespace: system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-rolebinding -subjects: -- kind: ServiceAccount - name: default - namespace: system -- kind: ServiceAccount - name: service-account - namespace: system -- kind: ServiceAccount - name: another - namespace: random ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: example -webhooks: - - name: example1 - clientConfig: - service: - name: svc1 - namespace: system - - name: example2 - clientConfig: - service: - name: svc2 - namespace: system ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: crd -` - expected := `apiVersion: v1 -kind: ConfigMap -metadata: - name: cm1 - namespace: test ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: cm2 - namespace: test ---- -apiVersion: v1 -kind: Service -metadata: - name: svc1 - namespace: test ---- -apiVersion: v1 -kind: Namespace -metadata: - name: test ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: default - namespace: test ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: service-account - namespace: test ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-rolebinding -subjects: -- kind: ServiceAccount - name: default - namespace: test -- kind: ServiceAccount - name: service-account - namespace: test -- kind: ServiceAccount - name: another - namespace: random ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: example -webhooks: -- clientConfig: - service: - name: svc1 - namespace: system - name: example1 -- clientConfig: - service: - name: svc2 - namespace: system - name: example2 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: crd -` - - output := runNamespaceTransformer(t, config, input) - if output != expected { - fmt.Println("Actual:") - fmt.Println(output) - fmt.Println("===") - fmt.Println("Expected:") - fmt.Println(expected) - t.Fatalf("Actual doesn't equal to expected") - } -} - -func TestNamespaceTransformerClusterLevelKinds(t *testing.T) { - input := `apiVersion: v1 -kind: Namespace -metadata: - name: ns1 ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: crd1 ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cr1 ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: crb1 ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: pv1 -` - - config := ` -namespace: test -fieldSpecs: -- path: metadata/namespace - create: true -- path: subjects - kind: RoleBinding - group: rbac.authorization.k8s.io -- path: subjects - kind: ClusterRoleBinding - group: rbac.authorization.k8s.io -` - - expected := input - - output := runNamespaceTransformer(t, config, input) - if output != expected { - fmt.Println("Actual:") - fmt.Println(output) - fmt.Println("===") - fmt.Println("Expected:") - fmt.Println(expected) - t.Fatalf("Actual doesn't equal to expected") - } -} - -func TestNamespaceTransformerCRD(t *testing.T) { - config := ` -namespace: test -fieldSpecs: -- path: metadata/namespace - create: true -- path: data/namespace - group: foo - version: v1 - create: true -` - - input := `apiVersion: foo/v1 -kind: bar -metadata: - name: whatever ---- -apiVersion: bar/v1 -kind: foo -metadata: - name: whatever -` - - expected := `apiVersion: foo/v1 -data: - namespace: test -kind: bar -metadata: - name: whatever - namespace: test ---- -apiVersion: bar/v1 -kind: foo -metadata: - name: whatever - namespace: test -` - - output := runNamespaceTransformer(t, config, input) - if output != expected { - fmt.Println("Actual:") - fmt.Println(output) - fmt.Println("===") - fmt.Println("Expected:") - fmt.Println(expected) - t.Fatalf("Actual doesn't equal to expected") - } -} - -func TestNamespaceTransformerDependsOn(t *testing.T) { - config := ` -namespace: test -` - testCases := []struct { - TestName string - Input string - Expected string - }{ - { - TestName: "update depends-on annotation if referenced resource is core, namespaced, and included", - Input: `apiVersion: v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: /namespaces/default/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: default ---- -apiVersion: v1 -kind: StatefulSet -metadata: - labels: - app: wordpress - name: wordpress-mysql - namespace: default -`, - Expected: `apiVersion: v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: /namespaces/test/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: test ---- -apiVersion: v1 -kind: StatefulSet -metadata: - labels: - app: wordpress - name: wordpress-mysql - namespace: test -`, - }, - { - TestName: "update depends-on annotation if referenced resource is namespaced and included", - Input: `apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: apps/namespaces/default/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: default ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - app: wordpress - name: wordpress-mysql - namespace: default -`, - Expected: `apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: apps/namespaces/test/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: test ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - app: wordpress - name: wordpress-mysql - namespace: test -`, - }, - { - TestName: "not update depends-on annotation if referenced resource is namespaced but not included", - Input: `apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: apps/namespaces/default/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: default -`, - Expected: `apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - config.kubernetes.io/depends-on: apps/namespaces/default/StatefulSet/wordpress-mysql - labels: - app: wordpress - name: wordpress - namespace: test -`, - }, - { - TestName: "not update depends-on annotation referencing a cluster scoped resource", - Input: `apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - config.kubernetes.io/depends-on: rbac.authorization.k8s.io/ClusterRole/secret-reader - name: read-secrets-global -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: secret-reader -subjects: -- apiGroup: rbac.authorization.k8s.io - kind: Group - name: admin -`, - Expected: `apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - config.kubernetes.io/depends-on: rbac.authorization.k8s.io/ClusterRole/secret-reader - name: read-secrets-global -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: secret-reader -subjects: -- apiGroup: rbac.authorization.k8s.io - kind: Group - name: admin -`, - }, - } - - for _, tc := range testCases { - t.Run(fmt.Sprintf("namespace transformer should %s", tc.TestName), func(t *testing.T) { - actual := runNamespaceTransformer(t, config, tc.Input) - assert.Equal(t, tc.Expected, actual) - }) - } -} - -func TestSetDependsOnNamespace(t *testing.T) { - testCases := []struct { - TestName string - Input string - ResourceLookup resourceLookup - Expected string - IsSet bool - }{ - { - TestName: "set the namespace portion for a namespaced resource which was included in the input", - Input: "group/namespaces/ns/kind/name", - ResourceLookup: resourceLookup{ - resourceMap: map[resourceKey]bool{ - { - Group: "group", - Kind: "kind", - Name: "name", - }: true, - }, - }, - Expected: "group/namespaces/new-ns/kind/name", - IsSet: true, - }, - { - TestName: "set the namespace portion for a core namespaced resource which was included in the input", - Input: "/namespaces/ns/kind/name", - ResourceLookup: resourceLookup{ - resourceMap: map[resourceKey]bool{ - { - Group: "", - Kind: "kind", - Name: "name", - }: true, - }, - }, - Expected: "/namespaces/new-ns/kind/name", - IsSet: true, - }, - { - TestName: "not set the namespace portion for a namespaced resource which was not included in the input", - Input: "group/namespaces/ns/kind/name", - Expected: "group/namespaces/ns/kind/name", - IsSet: false, - }, - { - TestName: "not set namespace for cluster scoped resource", - Input: "group/kind/name", - Expected: "group/kind/name", - IsSet: false, - }, - { - TestName: "not set namespace for resource with unexpected prefix", - Input: "some-prefix/group/namespaces/ns/kind/name", - Expected: "some-prefix/group/namespaces/ns/kind/name", - IsSet: false, - }, - { - TestName: "not set namespace for resource with unexpected suffix", - Input: "group/namespaces/ns/kind/name/some-suffix", - Expected: "group/namespaces/ns/kind/name/some-suffix", - IsSet: false, - }, - { - TestName: "not set namespace for resource without the 'namespaces' substring", - Input: "group/oops/ns/kind/name/some-suffix", - Expected: "group/oops/ns/kind/name/some-suffix", - IsSet: false, - }, - } - for _, tc := range testCases { - t.Run(fmt.Sprintf("setDependsOnNamespaces should %s", tc.TestName), func(t *testing.T) { - myPlugin := plugin{ - Namespace: "new-ns", - inputResourceLookup: tc.ResourceLookup, - } - actual, set := myPlugin.setDependsOnNamespace(tc.Input) - assert.Equal(t, tc.IsSet, set) - assert.Equal(t, tc.Expected, actual) - }) - } -} diff --git a/functions/go/set-namespace/transformer/namespace.go b/functions/go/set-namespace/transformer/namespace.go new file mode 100644 index 000000000..25e90b325 --- /dev/null +++ b/functions/go/set-namespace/transformer/namespace.go @@ -0,0 +1,167 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package transformer + +import ( + "fmt" + "regexp" + "strings" + + "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" +) + +const ( + fnConfigAPIVersion = "fn.kpt.dev/v1alpha1" + fnConfigKind = "SetNamespace" + dependsOnAnnotation = "config.kubernetes.io/depends-on" + groupIdx = 0 + namespaceIdx = 2 + kindIdx = 3 + nameIdx = 4 +) + +var ( + // /namespaces/// + namespacedResourcePattern = regexp.MustCompile(`\A([-.\w]*)/namespaces/([-.\w]*)/([-.\w]*)/([-.\w]*)\z`) + dependsOnKeyPattern = func(group, kind, name string) string { + return fmt.Sprintf("%s/%s/%s", group, kind, name) + } +) + +type Subject struct { + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + ApiGroup string `json:"apiGroup,omitempty" yaml:"apiGroup,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` +} + + +func SetNamespace(rl *fn.ResourceList) error { + tc := NamespaceTransformer{} + // Get "namespace" arguments from FunctionConfig + err := tc.Config(rl.FunctionConfig) + if err != nil { + rl.Results = append(rl.Results, fn.ErrorConfigObjectResult(err, rl.FunctionConfig)) + return nil + } + // Update "namespace" to the proper resources. + tc.Transform(rl.Items) + var result *fn.Result + if len(tc.Errors) != 0 { + errMsg := strings.Join(tc.Errors, "\n") + result = fn.GeneralResult(errMsg, fn.Error) + } else { + result = fn.GeneralResult("namespace updated", fn.Info) + } + rl.Results = append(rl.Results, result) + return nil +} + +type NamespaceTransformer struct { + Namespace string + DependsOnMap map[string]bool + Errors []string +} + +func (p *NamespaceTransformer) Config(o *fn.KubeObject) error { + switch { + case o.IsGVK("v1", "ConfigMap"): + p.Namespace = o.GetStringOrDie("data", "namespace") + if p.Namespace == "" { + return fmt.Errorf("`data.namespace` should not be empty") + } + case o.IsGVK(fnConfigAPIVersion, fnConfigKind): + p.Namespace = o.GetStringOrDie("namespace") + if p.Namespace == "" { + return fmt.Errorf("`namespace` should not be empty") + } + case o.IsGVK("v1", "ConfigMap") && o.GetName() == "kptfile.kpt.dev": + p.Namespace = o.GetStringOrDie("data", "name") + if p.Namespace == "" { + return fmt.Errorf("`data.name` should not be empty") + } + default: + return fmt.Errorf("unknown functionConfig Kind=%v ApiVersion=%v, expect `%v` or `ConfigMap`", + o.GetKind(), o.GetAPIVersion(), fnConfigKind) + } + return nil +} + +func (p *NamespaceTransformer) Transform(objects []*fn.KubeObject) { + p.SetDependsOnMap(objects) + for _, o := range objects { + switch { + case o.IsGVK("v1", "Namespace"): + o.SetName(p.Namespace) + case o.IsGVK("apiextensions.k8s.io/v1", "CustomResourceDefinition"): + err := o.Set(p.Namespace, "spec", "conversion", "webhook", "clientConfig", "service", "namespace") + if err != nil { + p.Errors = append(p.Errors, err.Error()) + } + case o.IsGVK("apiregistration.k8s.io/v1", "APIService"): + err := o.Set(p.Namespace, "spec", "service", "namespace") + if err != nil { + p.Errors = append(p.Errors, err.Error()) + } + case o.GetKind() == "ClusterRoleBinding" || o.GetKind() == "RoleBinding": + var subjects []*Subject + o.GetOrDie(&subjects, "subjects") + for _, s := range subjects { + if s.Name == "default" { + s.Namespace = p.Namespace + } + } + o.SetOrDie(&subjects, "subjects") + case o.HasNamespace(): + // Only update the namespace scoped resource. To determine if a resource is namespace scoped, + // we assume its namespace should have been set. + o.SetNamespace(p.Namespace) + default: + // skip the cluster scoped resource. We determine if a resource is cluster scoped by + // checking if the metadata.namespace is configured. + } + // Shall we accept custom fieldspec? + // p.SetCustomFieldSpec(o) + p.UpdateAnnotation(o) + } +} + +func (p *NamespaceTransformer) SetDependsOnMap(objects []*fn.KubeObject) { + p.DependsOnMap = map[string]bool{} + for _, o := range objects { + group := o.GetAPIVersion() + if i := strings.Index(o.GetAPIVersion(), "/"); i > -1 { + group = group[:i] + } + key := dependsOnKeyPattern(group, o.GetKind(), o.GetName()) + p.DependsOnMap[key] = true + } +} + +func (p *NamespaceTransformer) UpdateAnnotation(o *fn.KubeObject) { + anno, ok := o.GetAnnotations()[dependsOnAnnotation] + if !ok { + return + } + if !namespacedResourcePattern.MatchString(anno) { + return + } + segments := strings.Split(anno, "/") + dependsOnkey := dependsOnKeyPattern(segments[groupIdx], segments[kindIdx], segments[nameIdx]) + if ok := p.DependsOnMap[dependsOnkey]; ok { + segments[namespaceIdx] = p.Namespace + newAnno := strings.Join(segments, "/") + o.SetAnnotation(dependsOnAnnotation, newAnno) + } +} diff --git a/tests/set-namespace/crd/.expected/diff.patch b/tests/set-namespace/crd/.expected/diff.patch deleted file mode 100644 index 2331addef..000000000 --- a/tests/set-namespace/crd/.expected/diff.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/resources.yaml b/resources.yaml -index 6267d90..9397139 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -2,7 +2,7 @@ apiVersion: dev.example.com/v1 - kind: MyResource - metadata: - name: the-service -- namespace: the-namespace -+ namespace: test - spec: - selector: -- namespace: foo -+ namespace: test diff --git a/tests/set-namespace/crd/.krmignore b/tests/set-namespace/crd/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/crd/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/crd/Kptfile b/tests/set-namespace/crd/Kptfile deleted file mode 100644 index 048accc40..000000000 --- a/tests/set-namespace/crd/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml diff --git a/tests/set-namespace/crd/fn-config.yaml b/tests/set-namespace/crd/fn-config.yaml deleted file mode 100644 index 5f9fbedbb..000000000 --- a/tests/set-namespace/crd/fn-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -namespace: test -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: - name: my-config -additionalNamespaceFields: - - kind: MyResource - group: dev.example.com - path: spec/selector/namespace - version: v1 diff --git a/tests/set-namespace/crd/resources.yaml b/tests/set-namespace/crd/resources.yaml deleted file mode 100644 index 6267d907b..000000000 --- a/tests/set-namespace/crd/resources.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: dev.example.com/v1 -kind: MyResource -metadata: - name: the-service - namespace: the-namespace -spec: - selector: - namespace: foo diff --git a/tests/set-namespace/empty-input/advanced/.expected/config.yaml b/tests/set-namespace/empty-input/advanced/.expected/config.yaml deleted file mode 100644 index f6237512c..000000000 --- a/tests/set-namespace/empty-input/advanced/.expected/config.yaml +++ /dev/null @@ -1 +0,0 @@ -exitCode: 1 diff --git a/tests/set-namespace/empty-input/advanced/.expected/results.yaml b/tests/set-namespace/empty-input/advanced/.expected/results.yaml deleted file mode 100644 index b56490137..000000000 --- a/tests/set-namespace/empty-input/advanced/.expected/results.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: FunctionResultList -metadata: - name: fnresults -exitCode: 1 -items: - - image: gcr.io/kpt-fn/set-namespace:unstable - stderr: '[error] : failed to configure function: input namespace cannot be empty' - exitCode: 1 - results: - - message: 'failed to configure function: input namespace cannot be empty' - severity: error diff --git a/tests/set-namespace/empty-input/advanced/.krmignore b/tests/set-namespace/empty-input/advanced/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/empty-input/advanced/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/empty-input/advanced/Kptfile b/tests/set-namespace/empty-input/advanced/Kptfile deleted file mode 100644 index 048accc40..000000000 --- a/tests/set-namespace/empty-input/advanced/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml diff --git a/tests/set-namespace/empty-input/advanced/fn-config.yaml b/tests/set-namespace/empty-input/advanced/fn-config.yaml deleted file mode 100644 index d93918ada..000000000 --- a/tests/set-namespace/empty-input/advanced/fn-config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: - name: my-config diff --git a/tests/set-namespace/empty-input/advanced/resources.yaml b/tests/set-namespace/empty-input/advanced/resources.yaml deleted file mode 100644 index 8859df8f9..000000000 --- a/tests/set-namespace/empty-input/advanced/resources.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value ---- -apiVersion: v1 -kind: Service -metadata: - name: the-service - namespace: the-namespace -spec: - ports: - - name: etcd-server-ssl - port: 2380 - - name: etcd-client-ssl - port: 2379 - clusterIP: None - publishNotReadyAddresses: true ---- -apiVersion: v1 -kind: Namespace -metadata: - name: old-name diff --git a/tests/set-namespace/empty-input/simple/.expected/config.yaml b/tests/set-namespace/empty-input/simple/.expected/config.yaml deleted file mode 100644 index f6237512c..000000000 --- a/tests/set-namespace/empty-input/simple/.expected/config.yaml +++ /dev/null @@ -1 +0,0 @@ -exitCode: 1 diff --git a/tests/set-namespace/empty-input/simple/.expected/results.yaml b/tests/set-namespace/empty-input/simple/.expected/results.yaml deleted file mode 100644 index f8a665767..000000000 --- a/tests/set-namespace/empty-input/simple/.expected/results.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: FunctionResultList -metadata: - name: fnresults -exitCode: 1 -items: - - image: gcr.io/kpt-fn/set-namespace:unstable - stderr: '[error] : failed to configure function: `functionConfig` must be a `ConfigMap` or `SetNamespace`' - exitCode: 1 - results: - - message: 'failed to configure function: `functionConfig` must be a `ConfigMap` or `SetNamespace`' - severity: error diff --git a/tests/set-namespace/empty-input/simple/.krmignore b/tests/set-namespace/empty-input/simple/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/empty-input/simple/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/empty-input/simple/Kptfile b/tests/set-namespace/empty-input/simple/Kptfile deleted file mode 100644 index 24933efbf..000000000 --- a/tests/set-namespace/empty-input/simple/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configMap: {} diff --git a/tests/set-namespace/empty-input/simple/resources.yaml b/tests/set-namespace/empty-input/simple/resources.yaml deleted file mode 100644 index eb7a72495..000000000 --- a/tests/set-namespace/empty-input/simple/resources.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value ---- -apiVersion: v1 -kind: Service -metadata: - name: the-service -spec: - ports: - - name: etcd-server-ssl - port: 2380 - - name: etcd-client-ssl - port: 2379 - clusterIP: None - publishNotReadyAddresses: true diff --git a/tests/set-namespace/ensure-name-substring/.expected/diff.patch b/tests/set-namespace/ensure-name-substring/.expected/diff.patch deleted file mode 100644 index f40db802c..000000000 --- a/tests/set-namespace/ensure-name-substring/.expected/diff.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/resources.yaml b/resources.yaml -index 0315d44..3a16469 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -1,21 +1,21 @@ - apiVersion: v1 - kind: ServiceAccount - metadata: -- name: service-account -- namespace: system -+ name: dev-service-account -+ namespace: example-ns - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: RoleBinding - metadata: -- name: manager-rolebinding -- namespace: system -+ name: dev-manager-rolebinding -+ namespace: example-ns - subjects: - - kind: ServiceAccount - name: default -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount -- name: service-account -- namespace: system -+ name: dev-service-account -+ namespace: example-ns - - kind: ServiceAccount - name: another - namespace: random -@@ -23,14 +23,14 @@ subjects: - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: -- name: manager-cluster-rolebinding -+ name: dev-manager-cluster-rolebinding - subjects: - - kind: ServiceAccount - name: default -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount -- name: service-account -- namespace: system -+ name: dev-service-account -+ namespace: example-ns - - kind: ServiceAccount - name: another - namespace: random diff --git a/tests/set-namespace/ensure-name-substring/.krmignore b/tests/set-namespace/ensure-name-substring/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/ensure-name-substring/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/ensure-name-substring/Kptfile b/tests/set-namespace/ensure-name-substring/Kptfile deleted file mode 100644 index 08dce899a..000000000 --- a/tests/set-namespace/ensure-name-substring/Kptfile +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/ensure-name-substring:unstable - configMap: - prepend: dev- - - image: gcr.io/kpt-fn/set-namespace:unstable - configMap: - namespace: example-ns diff --git a/tests/set-namespace/ensure-name-substring/resources.yaml b/tests/set-namespace/ensure-name-substring/resources.yaml deleted file mode 100644 index 0315d4419..000000000 --- a/tests/set-namespace/ensure-name-substring/resources.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: service-account - namespace: system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: manager-rolebinding - namespace: system -subjects: -- kind: ServiceAccount - name: default - namespace: system -- kind: ServiceAccount - name: service-account - namespace: system -- kind: ServiceAccount - name: another - namespace: random ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-cluster-rolebinding -subjects: -- kind: ServiceAccount - name: default - namespace: system -- kind: ServiceAccount - name: service-account - namespace: system -- kind: ServiceAccount - name: another - namespace: random diff --git a/tests/set-namespace/legacy-config/.expected/diff.patch b/tests/set-namespace/legacy-config/.expected/diff.patch deleted file mode 100644 index 37b424b26..000000000 --- a/tests/set-namespace/legacy-config/.expected/diff.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/resources.yaml b/resources.yaml -index 517a507..7dfa8c1 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -2,6 +2,7 @@ apiVersion: v1 - kind: ConfigMap - metadata: - name: the-map -+ namespace: example-ns - data: - some-key: some-value - --- -@@ -9,7 +10,7 @@ apiVersion: v1 - kind: Service - metadata: - name: the-service -- namespace: the-namespace -+ namespace: example-ns - spec: - ports: - - name: etcd-server-ssl -@@ -22,13 +23,14 @@ spec: - apiVersion: v1 - kind: Namespace - metadata: -- name: old-name -+ name: example-ns - --- - apiVersion: dev.example.com/v1 - kind: MyResource - metadata: - name: the-service -- namespace: the-namespace -+ namespace: example-ns - spec: - configmapRef: - name: the-map -+ namespace: example-ns diff --git a/tests/set-namespace/legacy-config/.krmignore b/tests/set-namespace/legacy-config/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/legacy-config/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/legacy-config/Kptfile b/tests/set-namespace/legacy-config/Kptfile deleted file mode 100644 index 048accc40..000000000 --- a/tests/set-namespace/legacy-config/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml diff --git a/tests/set-namespace/legacy-config/fn-config.yaml b/tests/set-namespace/legacy-config/fn-config.yaml deleted file mode 100644 index b2085049a..000000000 --- a/tests/set-namespace/legacy-config/fn-config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -namespace: example-ns -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespaceConfig -metadata: - name: my-config -fieldSpecs: - - kind: MyResource - create: true - group: dev.example.com - path: spec/configmapRef/namespace - version: v1 diff --git a/tests/set-namespace/legacy-config/resources.yaml b/tests/set-namespace/legacy-config/resources.yaml deleted file mode 100644 index 517a507a8..000000000 --- a/tests/set-namespace/legacy-config/resources.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value ---- -apiVersion: v1 -kind: Service -metadata: - name: the-service - namespace: the-namespace -spec: - ports: - - name: etcd-server-ssl - port: 2380 - - name: etcd-client-ssl - port: 2379 - clusterIP: None - publishNotReadyAddresses: true ---- -apiVersion: v1 -kind: Namespace -metadata: - name: old-name ---- -apiVersion: dev.example.com/v1 -kind: MyResource -metadata: - name: the-service - namespace: the-namespace -spec: - configmapRef: - name: the-map diff --git a/tests/set-namespace/local-config/.expected/diff.patch b/tests/set-namespace/local-config/.expected/diff.patch deleted file mode 100644 index 9822ab317..000000000 --- a/tests/set-namespace/local-config/.expected/diff.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/local-config.yaml b/local-config.yaml -index b8d83d1..8ccd207 100644 ---- a/local-config.yaml -+++ b/local-config.yaml -@@ -4,5 +4,6 @@ metadata: - name: local-config-map - annotations: - config.kubernetes.io/local-config: "true" -+ namespace: test - data: - some-key: some-value -diff --git a/resources.yaml b/resources.yaml -index 3127bfa..bddef62 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -2,5 +2,6 @@ apiVersion: v1 - kind: ConfigMap - metadata: - name: the-map -+ namespace: test - data: - some-key: some-value diff --git a/tests/set-namespace/local-config/.krmignore b/tests/set-namespace/local-config/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/local-config/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/local-config/Kptfile b/tests/set-namespace/local-config/Kptfile deleted file mode 100644 index 048accc40..000000000 --- a/tests/set-namespace/local-config/Kptfile +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configPath: fn-config.yaml diff --git a/tests/set-namespace/local-config/fn-config.yaml b/tests/set-namespace/local-config/fn-config.yaml deleted file mode 100644 index 2cb8e8a32..000000000 --- a/tests/set-namespace/local-config/fn-config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -namespace: test -apiVersion: fn.kpt.dev/v1alpha1 -kind: SetNamespace -metadata: - name: my-config - annotations: - config.kubernetes.io/local-config: "true" diff --git a/tests/set-namespace/local-config/local-config.yaml b/tests/set-namespace/local-config/local-config.yaml deleted file mode 100644 index b8d83d17d..000000000 --- a/tests/set-namespace/local-config/local-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: local-config-map - annotations: - config.kubernetes.io/local-config: "true" -data: - some-key: some-value diff --git a/tests/set-namespace/local-config/resources.yaml b/tests/set-namespace/local-config/resources.yaml deleted file mode 100644 index 3127bfafd..000000000 --- a/tests/set-namespace/local-config/resources.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - some-key: some-value diff --git a/tests/set-namespace/rolebindings/.expected/diff.patch b/tests/set-namespace/rolebindings/.expected/diff.patch deleted file mode 100644 index b62493818..000000000 --- a/tests/set-namespace/rolebindings/.expected/diff.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/resources.yaml b/resources.yaml -index 0315d44..78167d3 100644 ---- a/resources.yaml -+++ b/resources.yaml -@@ -2,20 +2,20 @@ apiVersion: v1 - kind: ServiceAccount - metadata: - name: service-account -- namespace: system -+ namespace: example-ns - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: RoleBinding - metadata: - name: manager-rolebinding -- namespace: system -+ namespace: example-ns - subjects: - - kind: ServiceAccount - name: default -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount - name: service-account -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount - name: another - namespace: random -@@ -27,10 +27,10 @@ metadata: - subjects: - - kind: ServiceAccount - name: default -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount - name: service-account -- namespace: system -+ namespace: example-ns - - kind: ServiceAccount - name: another - namespace: random diff --git a/tests/set-namespace/rolebindings/.krmignore b/tests/set-namespace/rolebindings/.krmignore deleted file mode 100644 index 9d7a4007d..000000000 --- a/tests/set-namespace/rolebindings/.krmignore +++ /dev/null @@ -1 +0,0 @@ -.expected diff --git a/tests/set-namespace/rolebindings/Kptfile b/tests/set-namespace/rolebindings/Kptfile deleted file mode 100644 index 99c225804..000000000 --- a/tests/set-namespace/rolebindings/Kptfile +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: example -pipeline: - mutators: - - image: gcr.io/kpt-fn/set-namespace:unstable - configMap: - namespace: example-ns diff --git a/tests/set-namespace/rolebindings/resources.yaml b/tests/set-namespace/rolebindings/resources.yaml deleted file mode 100644 index 0315d4419..000000000 --- a/tests/set-namespace/rolebindings/resources.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: service-account - namespace: system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: manager-rolebinding - namespace: system -subjects: -- kind: ServiceAccount - name: default - namespace: system -- kind: ServiceAccount - name: service-account - namespace: system -- kind: ServiceAccount - name: another - namespace: random ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-cluster-rolebinding -subjects: -- kind: ServiceAccount - name: default - namespace: system -- kind: ServiceAccount - name: service-account - namespace: system -- kind: ServiceAccount - name: another - namespace: random