From 2e1b9efab59eee1526cabd7019a7de82d7aea144 Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Wed, 31 Aug 2022 15:55:23 -0700 Subject: [PATCH 01/14] Hack: reconciler logic for verifying if APIExport exists --- controllers/catalogentry_controller.go | 39 +++++++++++++- go.mod | 4 ++ main.go | 73 +++++++++++++++++++++++++- 3 files changed, 112 insertions(+), 4 deletions(-) diff --git a/controllers/catalogentry_controller.go b/controllers/catalogentry_controller.go index d2b703a..cd0d890 100644 --- a/controllers/catalogentry_controller.go +++ b/controllers/catalogentry_controller.go @@ -20,6 +20,7 @@ import ( "context" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" @@ -47,9 +48,43 @@ type CatalogEntryReconciler struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = log.FromContext(ctx) + log := ctrllog.FromContext(ctx) - // TODO(user): your logic here + ctx = logicalcluster.WithCluster(ctx, logicalcluster.New(req.ClusterName)) + // Fetch the catalog entry from the request + catalogEntry := &v1alpha1.CatalogEntry{} + err := r.Get(ctx, req.NamespacedName, catalogEntry) + if err != nil { + if errors.IsNotFound(err) { + // Request object not found, could have been deleted after reconcile request. + // Owned objects are automatically garbage collected. + log.Info("Catalog Entry not found. Ignoring since object must be deleted") + return ctrl.Result{}, nil + } + // Error reading the object - requeue the request. + log.Error(err, "Failed to get resource") + return ctrl.Result{}, err + } + + apiExportNameReferences := catalogEntry.Spec.References + + for _, exportRef := range apiExportNameReferences { + // TODO: verify if path contains the entire heirarchy or just the clusterName. + // If it contains the heirarchy then extract the clusterName + path := exportRef.Workspace.Path + name := exportRef.Workspace.ExportName + clusterApiExport := apisv1alpha1.APIExport{} + err := r.Get(logicalcluster.WithCluster(ctx, logicalcluster.New(path)), types.NamespacedName{Name: name, Namespace: req.Namespace}, &clusterApiExport) + if err != nil { + if errors.IsNotFound(err) { + log.Error(err, "APIExport referenced in catalog entry does not exist") + return ctrl.Result{}, err + } + // Error reading the object - requeue the request. + log.Error(err, "Failed to get resource") + return ctrl.Result{}, err + } + } return ctrl.Result{}, nil } diff --git a/go.mod b/go.mod index d8f6d30..d925f06 100644 --- a/go.mod +++ b/go.mod @@ -43,6 +43,8 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kcp-dev/apimachinery v0.0.0-20220803185518-868856d14e8a // indirect + github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.1 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -80,3 +82,5 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace sigs.k8s.io/controller-runtime => github.com/kcp-dev/controller-runtime v0.12.2-0.20220808200255-4b60fd66e5de diff --git a/main.go b/main.go index 4e30585..a08b4fc 100644 --- a/main.go +++ b/main.go @@ -17,20 +17,28 @@ limitations under the License. package main import ( + "context" "flag" + "fmt" "os" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. + apisv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/apis/v1alpha1" _ "k8s.io/client-go/plugin/pkg/client/auth" + "k8s.io/client-go/rest" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/kcp" "sigs.k8s.io/controller-runtime/pkg/log/zap" + "github.com/kcp-dev/catalog/api/v1alpha1" catalogv1alpha1 "github.com/kcp-dev/catalog/api/v1alpha1" "github.com/kcp-dev/catalog/controllers" //+kubebuilder:scaffold:imports @@ -52,6 +60,8 @@ func main() { var metricsAddr string var enableLeaderElection bool var probeAddr string + var apiExportName string + flag.StringVar(&apiExportName, "api-export-name", "", "The name of the APIExport.") flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") flag.BoolVar(&enableLeaderElection, "leader-elect", false, @@ -64,8 +74,14 @@ func main() { flag.Parse() ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) + ctx := ctrl.SetupSignalHandler() - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ + restConfig := ctrl.GetConfigOrDie() + setupLog = setupLog.WithValues("api-export-name", apiExportName) + + var mgr ctrl.Manager + var err error + options := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, Port: 9443, @@ -85,7 +101,15 @@ func main() { // LeaderElectionReleaseOnCancel: true, }) if err != nil { - setupLog.Error(err, "unable to start manager") + setupLog.Error(err, "error looking up virtual workspace URL") + } + + setupLog.Info("Using virtual workspace URL", "url", cfg.Host) + + options.LeaderElectionConfig = restConfig + mgr, err = kcp.NewClusterAwareManager(cfg, options) + if err != nil { + setupLog.Error(err, "unable to start cluster aware manager") os.Exit(1) } @@ -113,3 +137,48 @@ func main() { os.Exit(1) } } + +// restConfigForAPIExport returns a *rest.Config properly configured to communicate with the endpoint for the +// APIExport's virtual workspace. +func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string) (*rest.Config, error) { + scheme := runtime.NewScheme() + if err := v1alpha1.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding apis.kcp.dev/v1alpha1 to scheme: %w", err) + } + + apiExportClient, err := client.New(cfg, client.Options{Scheme: scheme}) + if err != nil { + return nil, fmt.Errorf("error creating APIExport client: %w", err) + } + + var apiExport apisv1alpha1.APIExport + + if apiExportName != "" { + if err := apiExportClient.Get(ctx, types.NamespacedName{Name: apiExportName}, &apiExport); err != nil { + return nil, fmt.Errorf("error getting APIExport %q: %w", apiExportName, err) + } + } else { + setupLog.Info("api-export-name is empty - listing") + exports := &apisv1alpha1.APIExportList{} + if err := apiExportClient.List(ctx, exports); err != nil { + return nil, fmt.Errorf("error listing APIExports: %w", err) + } + if len(exports.Items) == 0 { + return nil, fmt.Errorf("no APIExport found") + } + if len(exports.Items) > 1 { + return nil, fmt.Errorf("more than one APIExport found") + } + apiExport = exports.Items[0] + } + + if len(apiExport.Status.VirtualWorkspaces) < 1 { + return nil, fmt.Errorf("APIExport %q status.virtualWorkspaces is empty", apiExportName) + } + + cfg = rest.CopyConfig(cfg) + // TODO(ncdc): sharding support + cfg.Host = apiExport.Status.VirtualWorkspaces[0].URL + + return cfg, nil +} From 114c40db524c73694d2043811ec0f7aeb4710824 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Thu, 6 Oct 2022 11:48:39 -0400 Subject: [PATCH 02/14] Add CatalogEntry validation in controller 1. Validate export references in entry spec 2. Aggregate PermissionClaims and API resources info from referenced APIExport to entry status Signed-off-by: Vu Dinh --- Makefile | 4 +- config/kcp/catalogentry.apiexport.yaml | 7 + .../kcp/catalogentry.apiresourceschemas.yaml | 174 +++++++++++ controllers/catalogentry_controller.go | 122 ++++++-- go.mod | 46 ++- go.sum | 290 +++++++++++++++++- main.go | 11 +- 7 files changed, 601 insertions(+), 53 deletions(-) create mode 100644 config/kcp/catalogentry.apiexport.yaml create mode 100644 config/kcp/catalogentry.apiresourceschemas.yaml diff --git a/Makefile b/Makefile index 4e75730..5962cc4 100644 --- a/Makefile +++ b/Makefile @@ -130,9 +130,11 @@ test-e2e-cleanup: ## Clean up processes and directories from an end-to-end test build: manifests generate fmt vet ## Build manager binary. go build -o bin/manager main.go +APIEXPORT_NAME ?= catalog.kcp.dev + .PHONY: run run: manifests generate fmt vet ## Run a controller from your host. - go run ./main.go + go run ./main.go --api-export-name $(APIEXPORT_NAME) # If you wish built the manager image targeting other platforms you can use the --platform flag. # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. diff --git a/config/kcp/catalogentry.apiexport.yaml b/config/kcp/catalogentry.apiexport.yaml new file mode 100644 index 0000000..63c51a6 --- /dev/null +++ b/config/kcp/catalogentry.apiexport.yaml @@ -0,0 +1,7 @@ +apiVersion: apis.kcp.dev/v1alpha1 +kind: APIExport +metadata: + name: catalog.kcp.dev +spec: + latestResourceSchemas: + - catalogentries.catalog.kcp.dev diff --git a/config/kcp/catalogentry.apiresourceschemas.yaml b/config/kcp/catalogentry.apiresourceschemas.yaml new file mode 100644 index 0000000..f954c73 --- /dev/null +++ b/config/kcp/catalogentry.apiresourceschemas.yaml @@ -0,0 +1,174 @@ +--- +apiVersion: apis.kcp.dev/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: catalogentries.catalog.kcp.dev +spec: + group: catalog.kcp.dev + names: + kind: CatalogEntry + listKind: CatalogEntryList + plural: catalogentries + singular: catalogentry + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: CatalogEntry is the Schema for the catalogentries API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: CatalogEntrySpec defines the desired state of CatalogEntry + properties: + description: + description: description is a human-readable message to describe the + information regarding the capabilities and features that the API + provides + type: string + exports: + description: exports is a list of references to APIExports. + items: + description: ExportReference describes a reference to an APIExport. + Exactly one of the fields must be set. + properties: + workspace: + description: workspace is a reference to an APIExport in the + same organization. The creator of the APIBinding needs to + have access to the APIExport with the verb `bind` in order + to bind to it. + properties: + exportName: + description: Name of the APIExport that describes the API. + type: string + path: + description: path is an absolute reference to a workspace, + e.g. root:org:ws. The workspace must be some ancestor + or a child of some ancestor. If it is unset, the path + of the APIBinding is used. + pattern: ^root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - exportName + type: object + type: object + minItems: 1 + type: array + required: + - exports + type: object + status: + description: CatalogEntryStatus defines the observed state of CatalogEntry + properties: + conditions: + description: conditions is a list of conditions that apply to the + CatalogEntry. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition + in CamelCase. The specific API may choose whether or not this + field is considered a guaranteed API. This field may not be + empty. + type: string + severity: + description: Severity provides an explicit classification of + Reason code, so the users or machines can immediately understand + the current situation and act accordingly. The Severity field + MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + exportPermissionClaims: + description: exportPermissionClaims is a list of permissions requested + by the API provider(s) for this catalog entry. + items: + description: PermissionClaim identifies an object by GR and identity + hash. It's purpose is to determine the added permisions that a + service provider may request and that a consumer may accept and + alllow the service provider access to. + properties: + group: + description: group is the name of an API group. For core groups + this is the empty string '""'. + pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ + type: string + identityHash: + description: This is the identity for a given APIExport that + the APIResourceSchema belongs to. The hash can be found on + APIExport and APIResourceSchema's status. It will be empty + for core types. Note that one must look this up for a particular + KCP instance. + type: string + resource: + description: 'resource is the name of the resource. Note: it + is worth noting that you can not ask for permissions for resource + provided by a CRD not provided by an api export.' + pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ + type: string + required: + - resource + type: object + type: array + resources: + description: resources is the list of APIs that are provided by this + catalog entry. + items: + description: GroupResource specifies a Group and a Resource, but + does not force a version. This is useful for identifying concepts + during lookup stages without having partially valid types + properties: + group: + type: string + resource: + type: string + required: + - group + - resource + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/controllers/catalogentry_controller.go b/controllers/catalogentry_controller.go index cd0d890..acec667 100644 --- a/controllers/catalogentry_controller.go +++ b/controllers/catalogentry_controller.go @@ -18,14 +18,30 @@ package controllers import ( "context" + "fmt" + "reflect" + "strings" + "github.com/kcp-dev/catalog/api/v1alpha1" + catalogv1alpha1 "github.com/kcp-dev/catalog/api/v1alpha1" + apisv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/apis/v1alpha1" + conditionsapi "github.com/kcp-dev/kcp/pkg/apis/third_party/conditions/apis/conditions/v1alpha1" + "github.com/kcp-dev/kcp/pkg/apis/third_party/conditions/util/conditions" + "github.com/kcp-dev/kcp/pkg/logging" + "github.com/kcp-dev/logicalcluster/v2" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log" +) - catalogv1alpha1 "github.com/kcp-dev/catalog/api/v1alpha1" +const ( + controllerName = "kcp-catalogentry" ) // CatalogEntryReconciler reconciles a CatalogEntry object @@ -38,19 +54,15 @@ type CatalogEntryReconciler struct { //+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/status,verbs=get;update;patch //+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/finalizers,verbs=update -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// TODO(user): Modify the Reconcile function to compare the state specified by -// the CatalogEntry object against the actual cluster state, and then -// perform operations to make the cluster state reflect the state specified by -// the user. -// -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile +// Reconcile validates exports in CatalogEntry spec and add a condition to status +// to reflect the outcome of the validation. +// It also aggregates all permissionClaims and api resources from referenced APIExport +// to CatalogEntry status func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - log := ctrllog.FromContext(ctx) - + logger := logging.WithReconciler(klog.Background(), controllerName) + logger = logger.WithValues("clusterName", req.ClusterName) ctx = logicalcluster.WithCluster(ctx, logicalcluster.New(req.ClusterName)) + // Fetch the catalog entry from the request catalogEntry := &v1alpha1.CatalogEntry{} err := r.Get(ctx, req.NamespacedName, catalogEntry) @@ -58,30 +70,86 @@ func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request if errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. // Owned objects are automatically garbage collected. - log.Info("Catalog Entry not found. Ignoring since object must be deleted") + logger.Info("CatalogEntry not found") return ctrl.Result{}, nil } // Error reading the object - requeue the request. - log.Error(err, "Failed to get resource") + logger.Error(err, "failed to get resource") return ctrl.Result{}, err } - apiExportNameReferences := catalogEntry.Spec.References - - for _, exportRef := range apiExportNameReferences { + oldEntry := catalogEntry.DeepCopy() + resources := []metav1.GroupResource{} + exportPermissionClaims := []apisv1alpha1.PermissionClaim{} + invalidExports := []string{} + for _, exportRef := range catalogEntry.Spec.Exports { // TODO: verify if path contains the entire heirarchy or just the clusterName. // If it contains the heirarchy then extract the clusterName path := exportRef.Workspace.Path name := exportRef.Workspace.ExportName - clusterApiExport := apisv1alpha1.APIExport{} - err := r.Get(logicalcluster.WithCluster(ctx, logicalcluster.New(path)), types.NamespacedName{Name: name, Namespace: req.Namespace}, &clusterApiExport) + logger = logger.WithValues( + "path", path, + "exportName", name, + ) + logger.V(2).Info("reconciling CatalogEntry") + export := apisv1alpha1.APIExport{} + err := r.Get(logicalcluster.WithCluster(ctx, logicalcluster.New(path)), types.NamespacedName{Name: name, Namespace: req.Namespace}, &export) if err != nil { + invalidExports = append(invalidExports, fmt.Sprintf("%s/%s", path, name)) if errors.IsNotFound(err) { - log.Error(err, "APIExport referenced in catalog entry does not exist") - return ctrl.Result{}, err + logger.Error(err, "APIExport referenced in catalog entry does not exist") + continue } // Error reading the object - requeue the request. - log.Error(err, "Failed to get resource") + logger.Error(err, "failed to get resource") + continue + } + + // Extract permission and API resource info + for _, claim := range export.Spec.PermissionClaims { + exportPermissionClaims = append(exportPermissionClaims, claim) + } + catalogEntry.Status.ExportPermissionClaims = exportPermissionClaims + + for _, schemaName := range export.Spec.LatestResourceSchemas { + _, resource, group, ok := split3(schemaName, ".") + if !ok { + continue + } + gr := metav1.GroupResource{ + Group: group, + Resource: resource, + } + resources = append(resources, gr) + } + catalogEntry.Status.Resources = resources + } + + if len(invalidExports) == 0 { + cond := conditionsapi.Condition{ + Type: catalogv1alpha1.APIExportValidType, + Status: corev1.ConditionTrue, + Severity: conditionsapi.ConditionSeverityNone, + LastTransitionTime: metav1.Now(), + } + conditions.Set(catalogEntry, &cond) + } else { + message := fmt.Sprintf("invalid export(s): %s", strings.Join(invalidExports, " ,")) + invalidCond := conditionsapi.Condition{ + Type: catalogv1alpha1.APIExportValidType, + Status: corev1.ConditionFalse, + Severity: conditionsapi.ConditionSeverityError, + LastTransitionTime: metav1.Now(), + Message: message, + } + conditions.Set(catalogEntry, &invalidCond) + } + + // Update the catalog entry if status is changed + if !reflect.DeepEqual(catalogEntry.Status, oldEntry.Status) { + err = r.Client.Status().Update(context.TODO(), catalogEntry) + if err != nil { + logger.Error(err, "failed to update CatalogEntry") return ctrl.Result{}, err } } @@ -95,3 +163,11 @@ func (r *CatalogEntryReconciler) SetupWithManager(mgr ctrl.Manager) error { For(&catalogv1alpha1.CatalogEntry{}). Complete(r) } + +func split3(s string, sep string) (string, string, string, bool) { + comps := strings.SplitN(s, sep, 3) + if len(comps) != 3 { + return "", "", "", false + } + return comps[0], comps[1], comps[2], true +} diff --git a/go.mod b/go.mod index d925f06..9727881 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,15 @@ module github.com/kcp-dev/catalog go 1.19 require ( + github.com/kcp-dev/kcp v0.9.1 github.com/kcp-dev/kcp/pkg/apis v0.9.1 + github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.3 github.com/onsi/ginkgo/v2 v2.1.4 github.com/onsi/gomega v1.19.0 + k8s.io/api v0.25.0 k8s.io/apimachinery v0.25.0 k8s.io/client-go v0.25.0 + k8s.io/klog/v2 v2.70.1 sigs.k8s.io/controller-runtime v0.13.0 ) @@ -25,7 +29,7 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/zapr v1.2.3 // indirect @@ -43,8 +47,7 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kcp-dev/apimachinery v0.0.0-20220803185518-868856d14e8a // indirect - github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.1 // indirect + github.com/kcp-dev/apimachinery v0.0.0-20220912132244-efe716c18e43 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -55,9 +58,9 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect @@ -72,10 +75,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.25.0 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect + k8s.io/apiserver v0.24.3 // indirect k8s.io/component-base v0.25.0 // indirect - k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect @@ -83,4 +85,32 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -replace sigs.k8s.io/controller-runtime => github.com/kcp-dev/controller-runtime v0.12.2-0.20220808200255-4b60fd66e5de +replace ( + k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/legacy-cloud-providers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20220915135949-eeba459ad2a1 + k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20220915135949-eeba459ad2a1 + sigs.k8s.io/controller-runtime => github.com/kcp-dev/controller-runtime v0.12.2-0.20220808200255-4b60fd66e5de +) diff --git a/go.sum b/go.sum index c507122..8535f0e 100644 --- a/go.sum +++ b/go.sum @@ -34,6 +34,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -44,10 +45,13 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= @@ -62,6 +66,8 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -73,13 +79,25 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= @@ -92,11 +110,30 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -108,11 +145,19 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/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= @@ -124,28 +169,36 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -181,6 +234,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -224,14 +280,45 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ 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/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -242,14 +329,40 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kcp-dev/apimachinery v0.0.0-20220912132244-efe716c18e43 h1:vPv81j3mT5VYQ6YnCXrnKJQPeRNHwPcGJNsQNQfIG9Q= +github.com/kcp-dev/apimachinery v0.0.0-20220912132244-efe716c18e43/go.mod h1:qnvUHkdxOrNzX17yX+z8r81CZEBuFdveNzWqFlwZ55w= +github.com/kcp-dev/controller-runtime v0.12.2-0.20220808200255-4b60fd66e5de h1:IuXSIlIKJiR3ZsuO5PJ1yYdncsheX3A9rpuXQJ/TfQg= +github.com/kcp-dev/controller-runtime v0.12.2-0.20220808200255-4b60fd66e5de/go.mod h1:OFkNQPsWPPz6qWrIY3FUjmSb0W7qKLK8aZC/xBIJwUE= +github.com/kcp-dev/kcp v0.9.1 h1:XA6OpCWRrYMqtTzRFFFGDhGFYWTRy/DLptYlcLePuBc= +github.com/kcp-dev/kcp v0.9.1/go.mod h1:AJOr9fzaWBjlrB13e0ibSHEg8rwmtxzgy5hmjicbSYQ= github.com/kcp-dev/kcp/pkg/apis v0.9.1 h1:AtGD9OQqiT2Prkg0Rz8KhkIUCD1E4RnO3iO0jGcG4h8= github.com/kcp-dev/kcp/pkg/apis v0.9.1/go.mod h1:bHOeSFzFYaOOwtdNLNqoZndz53tzEGZdXT/dWnPmjLU= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20220915135949-eeba459ad2a1 h1:uqiMAGmTyBaAq8TwXNsaUcF6NZZpgIf9U8ngCwdVC/4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:IpPnJRE5t3olVaut5p67N16cZkWwwU5KVFM35xCKyxM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20220915135949-eeba459ad2a1 h1:sW2IkEqTJiD7ti56RJvQvxnX/Xik74usD4Vf9aT8YqQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:6oSWzzGWMkE8w0yGHadnWyAxSgfv4KxMFZTrBWPGw9E= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20220915135949-eeba459ad2a1 h1:yLyirMPVuDmK28OXmYipTDp/OGMvLuxXvFz/PxBkajk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:9BXCsgESAOaJVjextCdJRvSGzzGQnC/sepABcOQuICQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20220915135949-eeba459ad2a1 h1:6JdJVKT2V7hVp8Jc+KYOmiEnbMjNybsXxHQsENEqRvY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:UZcl2eMhBznRKRpxUm33RrFip03hlsTb4mVQJt4Eu9E= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20220915135949-eeba459ad2a1 h1:jo6MVwoyfAo0GHUAhOLf+xjwjovsDEyC+6k1+irHUtI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:GDxzAPoZYD5r6ga5H9++PuYseRuib8TwLrCAOggxgMg= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:+TJKHME55JimWzqz1d+2bQxHqSo4bofDuzO2tdE1MCM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20220915135949-eeba459ad2a1 h1:YvGnLYWyvlCE8ehNqsHlmLW8yGdtOHtJy5vQ0tuWXL4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20220915135949-eeba459ad2a1/go.mod h1:lU2mhvadf8dTfE0i9Cm6JRz8ZE7gB8UnUbmG+NWeMAg= +github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.1/go.mod h1:lfWJL764jKFJxZWOGuFuT3PCCLPo6lV5Cl8P7u9T05g= +github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.3 h1:+DwIG/loh2nDB9c/FqNvLzFFq/YtBliLxAfw/uWNzyE= +github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.3/go.mod h1:lfWJL764jKFJxZWOGuFuT3PCCLPo6lV5Cl8P7u9T05g= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -257,13 +370,28 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -271,28 +399,48 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -300,26 +448,51 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= 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= @@ -330,11 +503,28 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 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/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/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/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -342,25 +532,45 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -398,9 +608,14 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -423,6 +638,7 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -430,6 +646,7 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -437,7 +654,10 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -468,8 +688,12 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ 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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -480,7 +704,11 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -495,11 +723,13 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -511,6 +741,7 @@ golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -521,8 +752,12 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/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-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -542,24 +777,31 @@ 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/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -579,6 +821,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -598,6 +841,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= @@ -661,6 +905,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -672,6 +917,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -696,6 +942,7 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -744,9 +991,16 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -761,6 +1015,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= 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= @@ -768,31 +1024,31 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= -k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= -k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= -k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= -k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= -k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= -k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= -k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= -sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/main.go b/main.go index a08b4fc..bada4e6 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/kcp" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/kcp-dev/catalog/api/v1alpha1" catalogv1alpha1 "github.com/kcp-dev/catalog/api/v1alpha1" "github.com/kcp-dev/catalog/controllers" //+kubebuilder:scaffold:imports @@ -51,8 +50,8 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(catalogv1alpha1.AddToScheme(scheme)) + utilruntime.Must(apisv1alpha1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -142,7 +141,12 @@ func main() { // APIExport's virtual workspace. func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string) (*rest.Config, error) { scheme := runtime.NewScheme() - if err := v1alpha1.AddToScheme(scheme); err != nil { + // Add catalogEntry scheme + if err := catalogv1alpha1.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding catalog.kcp.dev/v1alpha1 to scheme: %w", err) + } + // Add APIExport, APIBinding and APIResourceSchema scheme + if err := apisv1alpha1.AddToScheme(scheme); err != nil { return nil, fmt.Errorf("error adding apis.kcp.dev/v1alpha1 to scheme: %w", err) } @@ -177,7 +181,6 @@ func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName } cfg = rest.CopyConfig(cfg) - // TODO(ncdc): sharding support cfg.Host = apiExport.Status.VirtualWorkspaces[0].URL return cfg, nil From 70824d89f80f6a9eb38df56c375c739fc5112584 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Wed, 9 Nov 2022 21:29:21 -0500 Subject: [PATCH 03/14] Add e2e test cases to test controller validation process Signed-off-by: Vu Dinh --- go.mod | 6 +- go.sum | 1 + main.go | 8 +- test/e2e/controller_test.go | 404 ++++++++++++++++++++++++++++++++++++ 4 files changed, 415 insertions(+), 4 deletions(-) create mode 100644 test/e2e/controller_test.go diff --git a/go.mod b/go.mod index 9727881..fec7872 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,15 @@ module github.com/kcp-dev/catalog go 1.19 require ( + github.com/kcp-dev/apimachinery v0.0.0-20220912132244-efe716c18e43 github.com/kcp-dev/kcp v0.9.1 github.com/kcp-dev/kcp/pkg/apis v0.9.1 github.com/kcp-dev/logicalcluster/v2 v2.0.0-alpha.3 github.com/onsi/ginkgo/v2 v2.1.4 github.com/onsi/gomega v1.19.0 + github.com/stretchr/testify v1.7.1 k8s.io/api v0.25.0 + k8s.io/apiextensions-apiserver v0.25.0 k8s.io/apimachinery v0.25.0 k8s.io/client-go v0.25.0 k8s.io/klog/v2 v2.70.1 @@ -47,13 +50,13 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kcp-dev/apimachinery v0.0.0-20220912132244-efe716c18e43 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect @@ -75,7 +78,6 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.0 // indirect k8s.io/apiserver v0.24.3 // indirect k8s.io/component-base v0.25.0 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect diff --git a/go.sum b/go.sum index 8535f0e..79a843d 100644 --- a/go.sum +++ b/go.sum @@ -503,6 +503,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 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/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/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= diff --git a/main.go b/main.go index bada4e6..50ab558 100644 --- a/main.go +++ b/main.go @@ -72,9 +72,10 @@ func main() { opts.BindFlags(flag.CommandLine) flag.Parse() - ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) ctx := ctrl.SetupSignalHandler() + ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) + restConfig := ctrl.GetConfigOrDie() setupLog = setupLog.WithValues("api-export-name", apiExportName) @@ -98,7 +99,10 @@ func main() { // if you are doing or is intended to do any operation such as perform cleanups // after the manager stops then its usage might be unsafe. // LeaderElectionReleaseOnCancel: true, - }) + } + + setupLog.Info("Looking up virtual workspace URL") + cfg, err := restConfigForAPIExport(ctx, restConfig, apiExportName) if err != nil { setupLog.Error(err, "error looking up virtual workspace URL") } diff --git a/test/e2e/controller_test.go b/test/e2e/controller_test.go new file mode 100644 index 0000000..b80e0d9 --- /dev/null +++ b/test/e2e/controller_test.go @@ -0,0 +1,404 @@ +package e2e + +import ( + "context" + "flag" + "fmt" + "math/rand" + "testing" + "time" + + kcpclienthelper "github.com/kcp-dev/apimachinery/pkg/client" + "github.com/stretchr/testify/assert" + + apisv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/apis/v1alpha1" + tenancyv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/tenancy/v1alpha1" + "github.com/kcp-dev/kcp/pkg/apis/third_party/conditions/util/conditions" + + "github.com/kcp-dev/logicalcluster/v2" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/config" + + catalogv1alpha1 "github.com/kcp-dev/catalog/api/v1alpha1" +) + +// The tests in this package expect to be called when: +// - kcp is running +// - a kind cluster is up and running +// - it is hosting a syncer, and the SyncTarget is ready to go +// - the controller-manager from this repo is deployed to kcp +// - that deployment is synced to the kind cluster +// - the deployment is rolled out & ready +// +// We can then check that the controllers defined here are working as expected. + +var workspaceName string + +func init() { + rand.Seed(time.Now().Unix()) + flag.StringVar(&workspaceName, "workspace", "", "Workspace in which to run these tests.") +} + +func parentWorkspace(t *testing.T) logicalcluster.Name { + flag.Parse() + if workspaceName == "" { + t.Fatal("--workspace cannot be empty") + } + + return logicalcluster.New(workspaceName) +} + +func loadClusterConfig(t *testing.T, clusterName logicalcluster.Name) *rest.Config { + t.Helper() + restConfig, err := config.GetConfigWithContext("base") + if err != nil { + t.Fatalf("failed to load *rest.Config: %v", err) + } + return rest.AddUserAgent(kcpclienthelper.SetCluster(rest.CopyConfig(restConfig), clusterName), t.Name()) +} + +func loadClient(t *testing.T, clusterName logicalcluster.Name) client.Client { + t.Helper() + scheme := runtime.NewScheme() + if err := clientgoscheme.AddToScheme(scheme); err != nil { + t.Fatalf("failed to add client go to scheme: %v", err) + } + if err := tenancyv1alpha1.AddToScheme(scheme); err != nil { + t.Fatalf("failed to add %q to scheme: %v", tenancyv1alpha1.SchemeGroupVersion, err) + } + if err := catalogv1alpha1.AddToScheme(scheme); err != nil { + t.Fatalf("failed to add %q to scheme: %v", catalogv1alpha1.GroupVersion, err) + } + if err := apisv1alpha1.AddToScheme(scheme); err != nil { + t.Fatalf("failed to add %q to scheme: %v", apisv1alpha1.SchemeGroupVersion, err) + } + tenancyClient, err := client.New(loadClusterConfig(t, clusterName), client.Options{Scheme: scheme}) + if err != nil { + t.Fatalf("failed to create a client: %v", err) + } + return tenancyClient +} + +func createWorkspace(t *testing.T, clusterName logicalcluster.Name) client.Client { + t.Helper() + parent, ok := clusterName.Parent() + if !ok { + t.Fatalf("cluster %q has no parent", clusterName) + } + c := loadClient(t, parent) + t.Logf("creating workspace %q", clusterName) + if err := c.Create(context.TODO(), &tenancyv1alpha1.ClusterWorkspace{ + ObjectMeta: metav1.ObjectMeta{ + Name: clusterName.Base(), + }, + Spec: tenancyv1alpha1.ClusterWorkspaceSpec{ + Type: tenancyv1alpha1.ClusterWorkspaceTypeReference{ + Name: "universal", + Path: "root", + }, + }, + }); err != nil { + t.Fatalf("failed to create workspace: %q: %v", clusterName, err) + } + + t.Logf("waiting for workspace %q to be ready", clusterName) + var workspace tenancyv1alpha1.ClusterWorkspace + if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) { + fetchErr := c.Get(context.TODO(), client.ObjectKey{Name: clusterName.Base()}, &workspace) + if fetchErr != nil { + t.Logf("failed to get workspace %q: %v", clusterName, err) + return false, fetchErr + } + var reason string + if actual, expected := workspace.Status.Phase, tenancyv1alpha1.ClusterWorkspacePhaseReady; actual != expected { + reason = fmt.Sprintf("phase is %q, not %q", actual, expected) + t.Logf("not done waiting for workspace %q to be ready: %q", clusterName, reason) + } + return reason == "", nil + }); err != nil { + t.Fatalf("workspace %q never ready: %v", clusterName, err) + } + + return createAPIBinding(t, clusterName) +} + +func createAPIBinding(t *testing.T, workspaceCluster logicalcluster.Name) client.Client { + c := loadClient(t, workspaceCluster) + apiName := "catalog.kcp.dev" + t.Logf("creating APIBinding %q|%q", workspaceCluster, apiName) + if err := c.Create(context.TODO(), &apisv1alpha1.APIBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: apiName, + }, + Spec: apisv1alpha1.APIBindingSpec{ + Reference: apisv1alpha1.ExportReference{ + Workspace: &apisv1alpha1.WorkspaceExportReference{ + Path: parentWorkspace(t).String(), + ExportName: apiName, + }, + }, + }, + }); err != nil { + t.Fatalf("could not create APIBinding %q|%q: %v", workspaceCluster, apiName, err) + } + + t.Logf("waiting for APIBinding %q|%q to be bound", workspaceCluster, apiName) + var apiBinding apisv1alpha1.APIBinding + if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) { + fetchErr := c.Get(context.TODO(), client.ObjectKey{Name: apiName}, &apiBinding) + if fetchErr != nil { + t.Logf("failed to get APIBinding %q|%q: %v", workspaceCluster, apiName, err) + return false, fetchErr + } + var reason string + if !conditions.IsTrue(&apiBinding, apisv1alpha1.InitialBindingCompleted) { + condition := conditions.Get(&apiBinding, apisv1alpha1.InitialBindingCompleted) + if condition != nil { + reason = fmt.Sprintf("%q: %q", condition.Reason, condition.Message) + } else { + reason = "no condition present" + } + t.Logf("not done waiting for APIBinding %q|%q to be bound: %q", workspaceCluster, apiName, reason) + } + return conditions.IsTrue(&apiBinding, apisv1alpha1.InitialBindingCompleted), nil + }); err != nil { + t.Fatalf("APIBinding %q|%q never bound: %v", workspaceCluster, apiName, err) + } + + return c +} + +func createAPIResourceSchema(t *testing.T, c client.Client, workspaceCluster logicalcluster.Name, schema *apisv1alpha1.APIResourceSchema) error { + apiName := schema.GetName() + t.Logf("creating APIResourceSchema %q|%q", workspaceCluster, apiName) + if err := c.Create(context.TODO(), schema); err != nil { + fmt.Errorf("could not create APIResourceSchema %q|%q: %v", workspaceCluster, apiName, err) + } + + t.Logf("waiting for APIResourceSchema %q|%q to be found", workspaceCluster, apiName) + var apiResourceSchema apisv1alpha1.APIResourceSchema + if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) { + fetchErr := c.Get(context.TODO(), client.ObjectKey{Name: apiName}, &apiResourceSchema) + if fetchErr != nil { + t.Logf("failed to get APIResourceSchema %q|%q: %v", workspaceCluster, apiName, err) + return false, fetchErr + } + return true, nil + }); err != nil { + return fmt.Errorf("APIResourceSchema %q|%q not found: %v", workspaceCluster, apiName, err) + } + + return nil +} + +func createAPIExport(t *testing.T, c client.Client, workspaceCluster logicalcluster.Name, export *apisv1alpha1.APIExport) error { + apiName := export.GetName() + t.Logf("creating APIExport %q|%q", workspaceCluster, apiName) + if err := c.Create(context.TODO(), export); err != nil { + fmt.Errorf("could not create APIExport %q|%q: %v", workspaceCluster, apiName, err) + } + + t.Logf("waiting for APIExport %q|%q to be found", workspaceCluster, apiName) + var apiExport apisv1alpha1.APIExport + if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) { + fetchErr := c.Get(context.TODO(), client.ObjectKey{Name: apiName}, &apiExport) + if fetchErr != nil { + t.Logf("failed to get APIExport %q|%q: %v", workspaceCluster, apiName, err) + return false, fetchErr + } + return true, nil + }); err != nil { + fmt.Errorf("APIExport %q|%q not found: %v", workspaceCluster, apiName, err) + } + + return nil +} + +func createCatalogEntry(t *testing.T, c client.Client, workspaceCluster logicalcluster.Name, entry *catalogv1alpha1.CatalogEntry) (*catalogv1alpha1.CatalogEntry, error) { + entryName := entry.GetName() + t.Logf("creating CatalogEntry %q|%q", workspaceCluster, entryName) + if err := c.Create(context.TODO(), entry); err != nil { + fmt.Errorf("could not create CatalogEntry %q|%q: %v", workspaceCluster, entryName, err) + } + + t.Logf("waiting for CatalogEntry %q|%q to be found", workspaceCluster, entryName) + var catalogEntry catalogv1alpha1.CatalogEntry + if err := wait.PollImmediate(100*time.Millisecond, wait.ForeverTestTimeout, func() (done bool, err error) { + fetchErr := c.Get(context.TODO(), client.ObjectKey{Name: entryName}, &catalogEntry) + if fetchErr != nil { + t.Logf("failed to get CatalogEntry %q|%q: %v", workspaceCluster, entryName, err) + return false, fetchErr + } + // Waiting for `APIExportValid` condition which signals the entry has been + // reconciled by the controller + if !conditions.Has(&catalogEntry, catalogv1alpha1.APIExportValidType) { + t.Logf("not done waiting for CatalogEntry %q|%q to be reconciled", workspaceCluster, entryName) + return false, fmt.Errorf("CatalogEntry %q|%q hasn't been reconciled: %v", workspaceCluster, entryName, err) + } + return true, nil + }); err != nil { + fmt.Errorf("CatalogEntry %q|%q not found: %v", workspaceCluster, entryName, err) + } + + return &catalogEntry, nil +} + +const characters = "abcdefghijklmnopqrstuvwxyz" + +func randomName() string { + b := make([]byte, 10) + for i := range b { + b[i] = characters[rand.Intn(len(characters))] + } + return string(b) +} + +// TestValidCatalogEntry verifies that our catalog controller can validate valid +// catalogEntry by adding correct conditions, resources and exportPermissionClaims +func TestValidCatalogEntry(t *testing.T) { + t.Parallel() + for i := 0; i < 3; i++ { + t.Run(fmt.Sprintf("attempt-%d", i), func(t *testing.T) { + t.Parallel() + workspaceCluster := parentWorkspace(t).Join(randomName()) + c := createWorkspace(t, workspaceCluster) + + // Create test apiResourceSchema + schema := &apisv1alpha1.APIResourceSchema{ + ObjectMeta: metav1.ObjectMeta{ + Name: "schema-test", + }, + Spec: apisv1alpha1.APIResourceSchemaSpec{ + Group: "catalog.kcp.dev", + Names: apiextensionsv1.CustomResourceDefinitionNames{ + Plural: "tests", + Singular: "test", + Kind: "Test", + }, + Scope: apiextensionsv1.ClusterScoped, + Versions: []apisv1alpha1.APIResourceVersion{{ + Name: "v1", + Served: true, + Storage: true, + }}, + }, + } + err := createAPIResourceSchema(t, c, workspaceCluster, schema) + if err != nil { + t.Fatalf("failed to create APIResourceSchema in cluster %q: %v", workspaceCluster, err) + } + + // Create test APIExport + export := &apisv1alpha1.APIExport{ + ObjectMeta: metav1.ObjectMeta{ + Name: "export-test", + }, + Spec: apisv1alpha1.APIExportSpec{ + LatestResourceSchemas: []string{"tests.catalog.kcp.dev"}, + PermissionClaims: []apisv1alpha1.PermissionClaim{ + { + GroupResource: apisv1alpha1.GroupResource{Resource: "configmaps"}, + }, + }, + }, + } + err = createAPIExport(t, c, workspaceCluster, export) + if err != nil { + t.Fatalf("failed to create APIExport in cluster %q: %v", workspaceCluster, err) + } + + // Create catalogentry + path := "root:" + workspaceCluster.Base() + newEntry := &catalogv1alpha1.CatalogEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: "entry-test", + }, + Spec: catalogv1alpha1.CatalogEntrySpec{ + Exports: []apisv1alpha1.ExportReference{ + { + Workspace: &apisv1alpha1.WorkspaceExportReference{ + Path: path, + ExportName: "export-test", + }, + }, + }, + }, + } + entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) + + // Check APIExportValid condition status to be True + if !conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { + t.Fatalf("expect APIExportValid condition in entry %qin cluster %q to be True", entry.GetName(), workspaceCluster) + } + // Check ExportPermissionClaims status + gr := metav1.GroupResource{ + Group: schema.Spec.Group, + Resource: schema.Spec.Names.Plural, + } + if len(entry.Status.Resources) > 0 { + assert.Equal(t, entry.Status.Resources[0], gr, "two resources should be the same") + } else { + t.Fatalf("expect entry %q in cluster %q to has one resource", entry.GetName(), workspaceCluster) + } + // Check Resource status + if len(entry.Status.ExportPermissionClaims) > 0 { + claim := apisv1alpha1.PermissionClaim{ + GroupResource: apisv1alpha1.GroupResource{ + Resource: "configmaps", + }, + } + assert.Equal(t, entry.Status.ExportPermissionClaims[0], claim, "two ExportPermissionClaims should be the same") + } else { + t.Fatalf("expect entry %q in cluster %q to has one ExportPermissionClaim", entry.GetName(), workspaceCluster) + } + }) + } +} + +// TestInvalidCatalogEntry verifies that our catalog controller can validate +// invalid catalogEntry (bad export reference) but add a False condition in status +func TestInvalidCatalogEntry(t *testing.T) { + t.Parallel() + for i := 0; i < 3; i++ { + t.Run(fmt.Sprintf("attempt-%d", i), func(t *testing.T) { + t.Parallel() + workspaceCluster := parentWorkspace(t).Join(randomName()) + c := createWorkspace(t, workspaceCluster) + + // Create catalogentry + path := "root:" + workspaceCluster.Base() + newEntry := &catalogv1alpha1.CatalogEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: "entry-test", + }, + Spec: catalogv1alpha1.CatalogEntrySpec{ + Exports: []apisv1alpha1.ExportReference{ + { + Workspace: &apisv1alpha1.WorkspaceExportReference{ + Path: path, + ExportName: "export-test", + }, + }, + }, + }, + } + entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) + if err != nil { + t.Fatalf("catalogEntry %q failed to be reconciled in cluster %q: %v", entry.GetName(), workspaceCluster, err) + } + + // Check APIExportValid condition status to be False due to bad export ref + if conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { + t.Fatalf("expect APIExportValid condition in entry %q in cluster %q to be False", entry.GetName(), workspaceCluster) + } + }) + } +} From 2b7e9a84e3024fff81333b4619ccfad7cff7aa06 Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Fri, 11 Nov 2022 12:58:23 -0800 Subject: [PATCH 04/14] fix syntax errors --- test/e2e/controller_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/e2e/controller_test.go b/test/e2e/controller_test.go index b80e0d9..a7f58c6 100644 --- a/test/e2e/controller_test.go +++ b/test/e2e/controller_test.go @@ -180,7 +180,7 @@ func createAPIResourceSchema(t *testing.T, c client.Client, workspaceCluster log apiName := schema.GetName() t.Logf("creating APIResourceSchema %q|%q", workspaceCluster, apiName) if err := c.Create(context.TODO(), schema); err != nil { - fmt.Errorf("could not create APIResourceSchema %q|%q: %v", workspaceCluster, apiName, err) + return fmt.Errorf("could not create APIResourceSchema %q|%q: %v", workspaceCluster, apiName, err) } t.Logf("waiting for APIResourceSchema %q|%q to be found", workspaceCluster, apiName) @@ -203,7 +203,7 @@ func createAPIExport(t *testing.T, c client.Client, workspaceCluster logicalclus apiName := export.GetName() t.Logf("creating APIExport %q|%q", workspaceCluster, apiName) if err := c.Create(context.TODO(), export); err != nil { - fmt.Errorf("could not create APIExport %q|%q: %v", workspaceCluster, apiName, err) + return fmt.Errorf("could not create APIExport %q|%q: %v", workspaceCluster, apiName, err) } t.Logf("waiting for APIExport %q|%q to be found", workspaceCluster, apiName) @@ -216,7 +216,7 @@ func createAPIExport(t *testing.T, c client.Client, workspaceCluster logicalclus } return true, nil }); err != nil { - fmt.Errorf("APIExport %q|%q not found: %v", workspaceCluster, apiName, err) + return fmt.Errorf("APIExport %q|%q not found: %v", workspaceCluster, apiName, err) } return nil @@ -226,7 +226,7 @@ func createCatalogEntry(t *testing.T, c client.Client, workspaceCluster logicalc entryName := entry.GetName() t.Logf("creating CatalogEntry %q|%q", workspaceCluster, entryName) if err := c.Create(context.TODO(), entry); err != nil { - fmt.Errorf("could not create CatalogEntry %q|%q: %v", workspaceCluster, entryName, err) + return nil, fmt.Errorf("could not create CatalogEntry %q|%q: %v", workspaceCluster, entryName, err) } t.Logf("waiting for CatalogEntry %q|%q to be found", workspaceCluster, entryName) @@ -245,7 +245,7 @@ func createCatalogEntry(t *testing.T, c client.Client, workspaceCluster logicalc } return true, nil }); err != nil { - fmt.Errorf("CatalogEntry %q|%q not found: %v", workspaceCluster, entryName, err) + return nil, fmt.Errorf("CatalogEntry %q|%q not found: %v", workspaceCluster, entryName, err) } return &catalogEntry, nil From 6e38f5652d912fa3a6ecd2dbe01ea17bc886816d Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Fri, 11 Nov 2022 18:28:18 -0500 Subject: [PATCH 05/14] Fix e2e test cases Signed-off-by: Vu Dinh --- Makefile | 2 +- test/e2e/audit-policy.yaml | 30 +++++ test/e2e/controller_test.go | 228 +++++++++++++++++------------------- 3 files changed, 141 insertions(+), 119 deletions(-) create mode 100644 test/e2e/audit-policy.yaml diff --git a/Makefile b/Makefile index 5962cc4..2a2a96d 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ vet: ## Run go vet against code. .PHONY: test test: manifests generate fmt vet envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./controllers/... -coverprofile cover.out ARTIFACT_DIR ?= .test diff --git a/test/e2e/audit-policy.yaml b/test/e2e/audit-policy.yaml new file mode 100644 index 0000000..9b1b038 --- /dev/null +++ b/test/e2e/audit-policy.yaml @@ -0,0 +1,30 @@ +apiVersion: audit.k8s.io/v1 +kind: Policy +omitStages: + - RequestReceived +omitManagedFields: true +rules: + - level: None + nonResourceURLs: + - "/api*" + - "/version" + + - level: Metadata + resources: + - group: "" + resources: ["secrets", "configmaps"] + - group: "authorization.k8s.io" + resources: ["subjectaccessreviews"] + + - level: Metadata + verbs: ["list", "watch"] + + - level: Metadata + verbs: ["get", "delete"] + omitStages: + - ResponseStarted + + - level: RequestResponse + verbs: ["create", "update", "patch"] + omitStages: + - ResponseStarted diff --git a/test/e2e/controller_test.go b/test/e2e/controller_test.go index a7f58c6..97e44b3 100644 --- a/test/e2e/controller_test.go +++ b/test/e2e/controller_test.go @@ -264,141 +264,133 @@ func randomName() string { // TestValidCatalogEntry verifies that our catalog controller can validate valid // catalogEntry by adding correct conditions, resources and exportPermissionClaims func TestValidCatalogEntry(t *testing.T) { - t.Parallel() - for i := 0; i < 3; i++ { - t.Run(fmt.Sprintf("attempt-%d", i), func(t *testing.T) { - t.Parallel() - workspaceCluster := parentWorkspace(t).Join(randomName()) - c := createWorkspace(t, workspaceCluster) - - // Create test apiResourceSchema - schema := &apisv1alpha1.APIResourceSchema{ - ObjectMeta: metav1.ObjectMeta{ - Name: "schema-test", - }, - Spec: apisv1alpha1.APIResourceSchemaSpec{ - Group: "catalog.kcp.dev", - Names: apiextensionsv1.CustomResourceDefinitionNames{ - Plural: "tests", - Singular: "test", - Kind: "Test", - }, - Scope: apiextensionsv1.ClusterScoped, - Versions: []apisv1alpha1.APIResourceVersion{{ - Name: "v1", - Served: true, - Storage: true, - }}, + t.Run("testing valid catalog entry", func(t *testing.T) { + workspaceCluster := parentWorkspace(t).Join(randomName()) + c := createWorkspace(t, workspaceCluster) + + // Create test apiResourceSchema + schema := &apisv1alpha1.APIResourceSchema{ + ObjectMeta: metav1.ObjectMeta{ + Name: "schema-test", + }, + Spec: apisv1alpha1.APIResourceSchemaSpec{ + Group: "catalog.kcp.dev", + Names: apiextensionsv1.CustomResourceDefinitionNames{ + Plural: "tests", + Singular: "test", + Kind: "Test", }, - } - err := createAPIResourceSchema(t, c, workspaceCluster, schema) - if err != nil { - t.Fatalf("failed to create APIResourceSchema in cluster %q: %v", workspaceCluster, err) - } + Scope: apiextensionsv1.ClusterScoped, + Versions: []apisv1alpha1.APIResourceVersion{{ + Name: "v1", + Served: true, + Storage: true, + }}, + }, + } + err := createAPIResourceSchema(t, c, workspaceCluster, schema) + if err != nil { + t.Fatalf("failed to create APIResourceSchema in cluster %q: %v", workspaceCluster, err) + } - // Create test APIExport - export := &apisv1alpha1.APIExport{ - ObjectMeta: metav1.ObjectMeta{ - Name: "export-test", - }, - Spec: apisv1alpha1.APIExportSpec{ - LatestResourceSchemas: []string{"tests.catalog.kcp.dev"}, - PermissionClaims: []apisv1alpha1.PermissionClaim{ - { - GroupResource: apisv1alpha1.GroupResource{Resource: "configmaps"}, - }, + // Create test APIExport + export := &apisv1alpha1.APIExport{ + ObjectMeta: metav1.ObjectMeta{ + Name: "export-test", + }, + Spec: apisv1alpha1.APIExportSpec{ + LatestResourceSchemas: []string{"tests.catalog.kcp.dev"}, + PermissionClaims: []apisv1alpha1.PermissionClaim{ + { + GroupResource: apisv1alpha1.GroupResource{Resource: "configmaps"}, }, }, - } - err = createAPIExport(t, c, workspaceCluster, export) - if err != nil { - t.Fatalf("failed to create APIExport in cluster %q: %v", workspaceCluster, err) - } + }, + } + err = createAPIExport(t, c, workspaceCluster, export) + if err != nil { + t.Fatalf("failed to create APIExport in cluster %q: %v", workspaceCluster, err) + } - // Create catalogentry - path := "root:" + workspaceCluster.Base() - newEntry := &catalogv1alpha1.CatalogEntry{ - ObjectMeta: metav1.ObjectMeta{ - Name: "entry-test", - }, - Spec: catalogv1alpha1.CatalogEntrySpec{ - Exports: []apisv1alpha1.ExportReference{ - { - Workspace: &apisv1alpha1.WorkspaceExportReference{ - Path: path, - ExportName: "export-test", - }, + // Create catalogentry + path := "root:" + workspaceCluster.Base() + newEntry := &catalogv1alpha1.CatalogEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: "entry-test", + }, + Spec: catalogv1alpha1.CatalogEntrySpec{ + Exports: []apisv1alpha1.ExportReference{ + { + Workspace: &apisv1alpha1.WorkspaceExportReference{ + Path: path, + ExportName: "export-test", }, }, }, - } - entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) + }, + } + entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) - // Check APIExportValid condition status to be True - if !conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { - t.Fatalf("expect APIExportValid condition in entry %qin cluster %q to be True", entry.GetName(), workspaceCluster) - } - // Check ExportPermissionClaims status - gr := metav1.GroupResource{ - Group: schema.Spec.Group, - Resource: schema.Spec.Names.Plural, - } - if len(entry.Status.Resources) > 0 { - assert.Equal(t, entry.Status.Resources[0], gr, "two resources should be the same") - } else { - t.Fatalf("expect entry %q in cluster %q to has one resource", entry.GetName(), workspaceCluster) - } - // Check Resource status - if len(entry.Status.ExportPermissionClaims) > 0 { - claim := apisv1alpha1.PermissionClaim{ - GroupResource: apisv1alpha1.GroupResource{ - Resource: "configmaps", - }, - } - assert.Equal(t, entry.Status.ExportPermissionClaims[0], claim, "two ExportPermissionClaims should be the same") - } else { - t.Fatalf("expect entry %q in cluster %q to has one ExportPermissionClaim", entry.GetName(), workspaceCluster) + // Check APIExportValid condition status to be True + if !conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { + t.Fatalf("expect APIExportValid condition in entry %qin cluster %q to be True", entry.GetName(), workspaceCluster) + } + // Check ExportPermissionClaims status + gr := metav1.GroupResource{ + Group: schema.Spec.Group, + Resource: schema.Spec.Names.Plural, + } + if len(entry.Status.Resources) > 0 { + assert.Equal(t, entry.Status.Resources[0], gr, "two resources should be the same") + } else { + t.Fatalf("expect entry %q in cluster %q to has one resource", entry.GetName(), workspaceCluster) + } + // Check Resource status + if len(entry.Status.ExportPermissionClaims) > 0 { + claim := apisv1alpha1.PermissionClaim{ + GroupResource: apisv1alpha1.GroupResource{ + Resource: "configmaps", + }, } - }) - } + assert.Equal(t, entry.Status.ExportPermissionClaims[0], claim, "two ExportPermissionClaims should be the same") + } else { + t.Fatalf("expect entry %q in cluster %q to has one ExportPermissionClaim", entry.GetName(), workspaceCluster) + } + }) } // TestInvalidCatalogEntry verifies that our catalog controller can validate // invalid catalogEntry (bad export reference) but add a False condition in status func TestInvalidCatalogEntry(t *testing.T) { - t.Parallel() - for i := 0; i < 3; i++ { - t.Run(fmt.Sprintf("attempt-%d", i), func(t *testing.T) { - t.Parallel() - workspaceCluster := parentWorkspace(t).Join(randomName()) - c := createWorkspace(t, workspaceCluster) - - // Create catalogentry - path := "root:" + workspaceCluster.Base() - newEntry := &catalogv1alpha1.CatalogEntry{ - ObjectMeta: metav1.ObjectMeta{ - Name: "entry-test", - }, - Spec: catalogv1alpha1.CatalogEntrySpec{ - Exports: []apisv1alpha1.ExportReference{ - { - Workspace: &apisv1alpha1.WorkspaceExportReference{ - Path: path, - ExportName: "export-test", - }, + t.Run("testing invalid catalog entry", func(t *testing.T) { + workspaceCluster := parentWorkspace(t).Join(randomName()) + c := createWorkspace(t, workspaceCluster) + + // Create catalogentry + path := "root:" + workspaceCluster.Base() + newEntry := &catalogv1alpha1.CatalogEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: "entry-test", + }, + Spec: catalogv1alpha1.CatalogEntrySpec{ + Exports: []apisv1alpha1.ExportReference{ + { + Workspace: &apisv1alpha1.WorkspaceExportReference{ + Path: path, + ExportName: "export-test", }, }, }, - } - entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) - if err != nil { - t.Fatalf("catalogEntry %q failed to be reconciled in cluster %q: %v", entry.GetName(), workspaceCluster, err) - } + }, + } + entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) + if err != nil { + t.Fatalf("catalogEntry %q failed to be reconciled in cluster %q: %v", entry.GetName(), workspaceCluster, err) + } - // Check APIExportValid condition status to be False due to bad export ref - if conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { - t.Fatalf("expect APIExportValid condition in entry %q in cluster %q to be False", entry.GetName(), workspaceCluster) - } - }) - } + // Check APIExportValid condition status to be False due to bad export ref + if conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { + t.Fatalf("expect APIExportValid condition in entry %q in cluster %q to be False", entry.GetName(), workspaceCluster) + } + }) } From 964495eb65eaf73026a053589698c9ae8f533c01 Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Fri, 18 Nov 2022 02:29:18 +0530 Subject: [PATCH 06/14] Fix Makefile changes --- Makefile | 126 +++++++++++++++--------------- config/manager/kustomization.yaml | 6 ++ 2 files changed, 71 insertions(+), 61 deletions(-) diff --git a/Makefile b/Makefile index 2a2a96d..fb44355 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,57 @@ IMG ?= controller:latest REGISTRY ?= localhost # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.25.0 + +##@ Build Dependencies + +## Location to install dependencies to +LOCALBIN ?= $(shell pwd)/bin + +## Tool Binaries +KUSTOMIZE ?= $(LOCALBIN)/kustomize +CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen +ENVTEST ?= $(LOCALBIN)/setup-envtest +KCP ?= $(LOCALBIN)/kcp +KUBECTL_KCP ?= $(LOCALBIN)/kubectl-kcp +YQ ?= $(LOCALBIN)/yq + +## Tool Versions +KUSTOMIZE_VERSION ?= v3.8.7 +CONTROLLER_TOOLS_VERSION ?= v0.10.0 +KCP_VERSION ?= 0.9.1 +YQ_VERSION ?= v4.27.2 + +KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" +$(KUSTOMIZE): ## Download kustomize locally if necessary. + mkdir -p $(LOCALBIN) + curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN) + touch $(KUSTOMIZE) # we download an "old" file, so make will re-download to refresh it unless we make it newer than the owning dir + +$(CONTROLLER_GEN): ## Download controller-gen locally if necessary. + mkdir -p $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + +$(YQ): ## Download yq locally if necessary. + mkdir -p $(LOCALBIN) + GOBIN=$(LOCALBIN) go install github.com/mikefarah/yq/v4@$(YQ_VERSION) + OS ?= $(shell go env GOOS ) ARCH ?= $(shell go env GOARCH ) +$(KCP): ## Download kcp locally if necessary. + mkdir -p $(LOCALBIN) + curl -L -s -o - https://github.com/kcp-dev/kcp/releases/download/v$(KCP_VERSION)/kcp_$(KCP_VERSION)_$(OS)_$(ARCH).tar.gz | tar --directory $(LOCALBIN)/../ -xvzf - bin/kcp + touch $(KCP) # we download an "old" file, so make will re-download to refresh it unless we make it newer than the owning dir + +$(KUBECTL_KCP): ## Download kcp kubectl plugins locally if necessary. + mkdir -p $(LOCALBIN) + curl -L -s -o - https://github.com/kcp-dev/kcp/releases/download/v$(KCP_VERSION)/kubectl-kcp-plugin_$(KCP_VERSION)_$(OS)_$(ARCH).tar.gz | tar --directory $(LOCALBIN)/../ -xvzf - bin + touch $(KUBECTL_KCP) # we download an "old" file, so make will re-download to refresh it unless we make it newer than the owning dir + +$(ENVTEST): ## Download envtest locally if necessary. + mkdir -p $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -23,7 +71,7 @@ SHELL = /usr/bin/env bash -o pipefail all: build # kcp specific -APIEXPORT_PREFIX ?= catalog +APIEXPORT_PREFIX ?= catalogentry ##@ General @@ -45,11 +93,11 @@ help: ## Display this help. ##@ Development .PHONY: manifests -manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. +manifests: $(CONTROLLER_GEN) ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate -generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. +generate: $(CONTROLLER_GEN) ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." .PHONY: apiresourceschemas @@ -65,18 +113,23 @@ vet: ## Run go vet against code. go vet ./... .PHONY: test -test: manifests generate fmt vet envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./controllers/... -coverprofile cover.out +test: manifests generate fmt vet $(ENVTEST) ## Run tests. + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./controllers/... -coverprofile cover.out ARTIFACT_DIR ?= .test .PHONY: test-e2e -test-e2e: $(ARTIFACT_DIR)/kind.kubeconfig kcp-synctarget run-test-e2e## Set up prerequisites and run end-to-end tests on a cluster. +test-e2e: $(ARTIFACT_DIR)/kind.kubeconfig kcp-synctarget ready-deployment run-test-e2e## Set up prerequisites and run end-to-end tests on a cluster. .PHONY: run-test-e2e run-test-e2e: ## Run end-to-end tests on a cluster. go test ./test/e2e/... --kubeconfig $(abspath $(ARTIFACT_DIR)/kcp.kubeconfig) --workspace $(shell $(KCP_KUBECTL) kcp workspace . --short) +.PHONY: ready-deployment +ready-deployment: KUBECONFIG = $(ARTIFACT_DIR)/kcp.kubeconfig +ready-deployment: kind-image install deploy ## Deploy the controller-manager and wait for it to be ready. + $(KCP_KUBECTL) --namespace "catalog-system" rollout status deployment/catalog-controller-manager + .PHONY: kind-image kind-image: docker-build ## Load the controller-manager image into the kind cluster. kind load docker-image $(REGISTRY)/$(IMG) --name catalog @@ -130,6 +183,7 @@ test-e2e-cleanup: ## Clean up processes and directories from an end-to-end test build: manifests generate fmt vet ## Build manager binary. go build -o bin/manager main.go +NAME_PREFIX ?= catalog- APIEXPORT_NAME ?= catalog.kcp.dev .PHONY: run @@ -141,11 +195,11 @@ run: manifests generate fmt vet ## Run a controller from your host. # More info: https://docs.docker.com/develop/develop-images/build_enhancements/ .PHONY: docker-build docker-build: test ## Build docker image with the manager. - docker build -t ${IMG} . + docker build -t ${REGISTRY}/${IMG} . .PHONY: docker-push docker-push: ## Push docker image with the manager. - docker push ${IMG} + docker push ${REGISTRY}/${IMG} # PLATFORMS defines the target platforms for the manager image be build to provide support to multiple # architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: @@ -173,11 +227,11 @@ endif KUBECONFIG ?= $(abspath ~/.kube/config ) .PHONY: install -install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. +install: manifests $(KUSTOMIZE) ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | kubectl apply -f - .PHONY: uninstall -uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. +uninstall: manifests $(KUSTOMIZE) ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - .PHONY: deploy-crd @@ -186,7 +240,7 @@ deploy-crd: manifests $(KUSTOMIZE) ## Deploy controller $(KUSTOMIZE) build config/default-crd | kubectl --kubeconfig $(KUBECONFIG) apply -f - || true .PHONY: deploy -deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. +deploy: manifests $(KUSTOMIZE) ## Deploy controller to the K8s cluster specified in ~/.kube/config. cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default | kubectl apply -f - @@ -194,55 +248,5 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - -##@ Build Dependencies - -## Location to install dependencies to -LOCALBIN ?= $(shell pwd)/bin -$(LOCALBIN): - mkdir -p $(LOCALBIN) - -## Tool Binaries -KUSTOMIZE ?= $(LOCALBIN)/kustomize -CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen -ENVTEST ?= $(LOCALBIN)/setup-envtest -KCP ?= $(LOCALBIN)/kcp -KUBECTL_KCP ?= $(LOCALBIN)/kubectl-kcp -YQ ?= $(LOCALBIN)/yq -## Tool Versions -KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.10.0 -KCP_VERSION ?= 0.9.1 -YQ_VERSION ?= v4.27.2 - -KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" -.PHONY: kustomize -kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. -$(KUSTOMIZE): $(LOCALBIN) - test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } - -.PHONY: controller-gen -controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. -$(CONTROLLER_GEN): $(LOCALBIN) - test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) - -.PHONY: envtest -envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. -$(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest - -$(YQ): ## Download yq locally if necessary. - mkdir -p $(LOCALBIN) - GOBIN=$(LOCALBIN) go install github.com/mikefarah/yq/v4@$(YQ_VERSION) - -.PHONY: kcp -$(KCP): ## Download kcp locally if necessary. - mkdir -p $(LOCALBIN) - curl -L -s -o - https://github.com/kcp-dev/kcp/releases/download/v$(KCP_VERSION)/kcp_$(KCP_VERSION)_$(OS)_$(ARCH).tar.gz | tar --directory $(LOCALBIN)/../ -xvzf - bin/kcp - touch $(KCP) # we download an "old" file, so make will re-download to refresh it unless we make it newer than the owning dir - -$(KUBECTL_KCP): ## Download kcp kubectl plugins locally if necessary. - mkdir -p $(LOCALBIN) - curl -L -s -o - https://github.com/kcp-dev/kcp/releases/download/v$(KCP_VERSION)/kubectl-kcp-plugin_$(KCP_VERSION)_$(OS)_$(ARCH).tar.gz | tar --directory $(LOCALBIN)/../ -xvzf - bin - touch $(KUBECTL_KCP) # we download an "old" file, so make will re-download to refresh it unless we make it newer than the owning dir diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b8..ad13e96 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: controller + newTag: latest From 35deac400dc50c92e3f13171340c7dffeb899c00 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Thu, 17 Nov 2022 17:52:43 -0500 Subject: [PATCH 07/14] Fix Makefiles and few kcp resources files Signed-off-by: Vu Dinh --- Makefile | 17 +- config/kcp/catalogentry.apiexport.yaml | 2 +- .../kcp/catalogentry.apiresourceschemas.yaml | 174 ------------------ config/kcp/kustomization.yaml | 6 + config/kcp/kustomizeconfig.yaml | 5 + config/kcp/today.apiresourceschemas.yaml | 169 +++++++++++++++++ config/manager/manager.yaml | 3 +- 7 files changed, 191 insertions(+), 185 deletions(-) delete mode 100644 config/kcp/catalogentry.apiresourceschemas.yaml create mode 100644 config/kcp/kustomization.yaml create mode 100644 config/kcp/kustomizeconfig.yaml create mode 100644 config/kcp/today.apiresourceschemas.yaml diff --git a/Makefile b/Makefile index fb44355..f9f15b4 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ KUBECTL_KCP ?= $(LOCALBIN)/kubectl-kcp YQ ?= $(LOCALBIN)/yq ## Tool Versions -KUSTOMIZE_VERSION ?= v3.8.7 +KUSTOMIZE_VERSION ?= v4.5.7 CONTROLLER_TOOLS_VERSION ?= v0.10.0 KCP_VERSION ?= 0.9.1 YQ_VERSION ?= v4.27.2 @@ -71,7 +71,7 @@ SHELL = /usr/bin/env bash -o pipefail all: build # kcp specific -APIEXPORT_PREFIX ?= catalogentry +APIEXPORT_PREFIX ?= today ##@ General @@ -225,28 +225,27 @@ ifndef ignore-not-found endif KUBECONFIG ?= $(abspath ~/.kube/config ) +KCPKUBECONFIG ?= $(ARTIFACT_DIR)/kcp.kubeconfig .PHONY: install install: manifests $(KUSTOMIZE) ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | kubectl apply -f - + $(KUSTOMIZE) build config/kcp | kubectl --kubeconfig $(KCPKUBECONFIG) apply -f - .PHONY: uninstall uninstall: manifests $(KUSTOMIZE) ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. - $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - + $(KUSTOMIZE) build config/crd | kubectl --kubeconfig $(KCPKUBECONFIG) delete --ignore-not-found=$(ignore-not-found) -f - .PHONY: deploy-crd deploy-crd: manifests $(KUSTOMIZE) ## Deploy controller cd config/manager && $(KUSTOMIZE) edit set image controller=${REGISTRY}/${IMG} - $(KUSTOMIZE) build config/default-crd | kubectl --kubeconfig $(KUBECONFIG) apply -f - || true + $(KUSTOMIZE) build config/default-crd | kubectl --kubeconfig $(KCPKUBECONFIG) apply -f - || true .PHONY: deploy deploy: manifests $(KUSTOMIZE) ## Deploy controller to the K8s cluster specified in ~/.kube/config. cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} - $(KUSTOMIZE) build config/default | kubectl apply -f - + $(KUSTOMIZE) build config/default | kubectl --kubeconfig $(KCPKUBECONFIG) apply -f - .PHONY: undeploy undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. - $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - - - - + $(KUSTOMIZE) build config/default | kubectl --kubeconfig $(KCPKUBECONFIG) delete --ignore-not-found=$(ignore-not-found) -f - diff --git a/config/kcp/catalogentry.apiexport.yaml b/config/kcp/catalogentry.apiexport.yaml index 63c51a6..7b2e22d 100644 --- a/config/kcp/catalogentry.apiexport.yaml +++ b/config/kcp/catalogentry.apiexport.yaml @@ -4,4 +4,4 @@ metadata: name: catalog.kcp.dev spec: latestResourceSchemas: - - catalogentries.catalog.kcp.dev + - today.catalogentries.catalog.kcp.dev diff --git a/config/kcp/catalogentry.apiresourceschemas.yaml b/config/kcp/catalogentry.apiresourceschemas.yaml deleted file mode 100644 index f954c73..0000000 --- a/config/kcp/catalogentry.apiresourceschemas.yaml +++ /dev/null @@ -1,174 +0,0 @@ ---- -apiVersion: apis.kcp.dev/v1alpha1 -kind: APIResourceSchema -metadata: - creationTimestamp: null - name: catalogentries.catalog.kcp.dev -spec: - group: catalog.kcp.dev - names: - kind: CatalogEntry - listKind: CatalogEntryList - plural: catalogentries - singular: catalogentry - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: CatalogEntry is the Schema for the catalogentries API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: CatalogEntrySpec defines the desired state of CatalogEntry - properties: - description: - description: description is a human-readable message to describe the - information regarding the capabilities and features that the API - provides - type: string - exports: - description: exports is a list of references to APIExports. - items: - description: ExportReference describes a reference to an APIExport. - Exactly one of the fields must be set. - properties: - workspace: - description: workspace is a reference to an APIExport in the - same organization. The creator of the APIBinding needs to - have access to the APIExport with the verb `bind` in order - to bind to it. - properties: - exportName: - description: Name of the APIExport that describes the API. - type: string - path: - description: path is an absolute reference to a workspace, - e.g. root:org:ws. The workspace must be some ancestor - or a child of some ancestor. If it is unset, the path - of the APIBinding is used. - pattern: ^root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - exportName - type: object - type: object - minItems: 1 - type: array - required: - - exports - type: object - status: - description: CatalogEntryStatus defines the observed state of CatalogEntry - properties: - conditions: - description: conditions is a list of conditions that apply to the - CatalogEntry. - items: - description: Condition defines an observation of a object operational - state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - lastTransitionTime - - status - - type - type: object - type: array - exportPermissionClaims: - description: exportPermissionClaims is a list of permissions requested - by the API provider(s) for this catalog entry. - items: - description: PermissionClaim identifies an object by GR and identity - hash. It's purpose is to determine the added permisions that a - service provider may request and that a consumer may accept and - alllow the service provider access to. - properties: - group: - description: group is the name of an API group. For core groups - this is the empty string '""'. - pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ - type: string - identityHash: - description: This is the identity for a given APIExport that - the APIResourceSchema belongs to. The hash can be found on - APIExport and APIResourceSchema's status. It will be empty - for core types. Note that one must look this up for a particular - KCP instance. - type: string - resource: - description: 'resource is the name of the resource. Note: it - is worth noting that you can not ask for permissions for resource - provided by a CRD not provided by an api export.' - pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ - type: string - required: - - resource - type: object - type: array - resources: - description: resources is the list of APIs that are provided by this - catalog entry. - items: - description: GroupResource specifies a Group and a Resource, but - does not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - resource: - type: string - required: - - group - - resource - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/kcp/kustomization.yaml b/config/kcp/kustomization.yaml new file mode 100644 index 0000000..8cb3e01 --- /dev/null +++ b/config/kcp/kustomization.yaml @@ -0,0 +1,6 @@ +resources: + - today.apiresourceschemas.yaml + - catalogentry.apiexport.yaml + +configurations: + - kustomizeconfig.yaml diff --git a/config/kcp/kustomizeconfig.yaml b/config/kcp/kustomizeconfig.yaml new file mode 100644 index 0000000..cfd8094 --- /dev/null +++ b/config/kcp/kustomizeconfig.yaml @@ -0,0 +1,5 @@ +nameReference: +- kind: APIResourceSchema + fieldSpecs: + - kind: APIExport + path: spec/latestResourceSchemas diff --git a/config/kcp/today.apiresourceschemas.yaml b/config/kcp/today.apiresourceschemas.yaml new file mode 100644 index 0000000..f535b60 --- /dev/null +++ b/config/kcp/today.apiresourceschemas.yaml @@ -0,0 +1,169 @@ +apiVersion: apis.kcp.dev/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: today.catalogentries.catalog.kcp.dev +spec: + group: catalog.kcp.dev + names: + kind: CatalogEntry + listKind: CatalogEntryList + plural: catalogentries + singular: catalogentry + scope: Cluster + versions: + - name: v1alpha1 + schema: + description: CatalogEntry is the Schema for the catalogentries API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: CatalogEntrySpec defines the desired state of CatalogEntry + properties: + description: + description: description is a human-readable message to describe the + information regarding the capabilities and features that the API provides + type: string + exports: + description: exports is a list of references to APIExports. + items: + description: ExportReference describes a reference to an APIExport. + Exactly one of the fields must be set. + properties: + workspace: + description: workspace is a reference to an APIExport in the same + organization. The creator of the APIBinding needs to have access + to the APIExport with the verb `bind` in order to bind to it. + properties: + exportName: + description: Name of the APIExport that describes the API. + type: string + path: + description: path is an absolute reference to a workspace, + e.g. root:org:ws. If it is unset, the path of the APIBinding + is used. + pattern: ^root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - exportName + type: object + type: object + minItems: 1 + type: array + required: + - exports + type: object + status: + description: CatalogEntryStatus defines the observed state of CatalogEntry + properties: + conditions: + description: conditions is a list of conditions that apply to the CatalogEntry. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. This should be when the underlying condition changed. + If that is not known, then using the time when the API field + changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition in + CamelCase. The specific API may choose whether or not this field + is considered a guaranteed API. This field may not be empty. + type: string + severity: + description: Severity provides an explicit classification of Reason + code, so the users or machines can immediately understand the + current situation and act accordingly. The Severity field MUST + be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + exportPermissionClaims: + description: exportPermissionClaims is a list of permissions requested + by the API provider(s) for this catalog entry. + items: + description: PermissionClaim identifies an object by GR and identity + hash. Its purpose is to determine the added permissions that a service + provider may request and that a consumer may accept and allow the + service provider access to. + properties: + group: + default: "" + description: group is the name of an API group. For core groups + this is the empty string '""'. + pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ + type: string + identityHash: + description: This is the identity for a given APIExport that the + APIResourceSchema belongs to. The hash can be found on APIExport + and APIResourceSchema's status. It will be empty for core types. + Note that one must look this up for a particular KCP instance. + type: string + resource: + description: 'resource is the name of the resource. Note: it is + worth noting that you can not ask for permissions for resource + provided by a CRD not provided by an api export.' + pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ + type: string + required: + - resource + type: object + type: array + resources: + description: resources is the list of APIs that are provided by this + catalog entry. + items: + description: GroupResource specifies a Group and a Resource, but does + not force a version. This is useful for identifying concepts during + lookup stages without having partially valid types + properties: + group: + type: string + resource: + type: string + required: + - group + - resource + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} + +--- diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 5e6ced4..3e75600 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -37,7 +37,7 @@ spec: control-plane: controller-manager spec: # TODO(user): Uncomment the following code to configure the nodeAffinity expression - # according to the platforms which are supported by your solution. + # according to the platforms which are supported by your solution. # It is considered best practice to support multiple architectures. You can # build your manager image using the makefile target docker-buildx. # affinity: @@ -69,6 +69,7 @@ spec: - command: - /manager args: + - --api-export-name=catalog.kcp.dev - --leader-elect image: controller:latest name: manager From 1e73061b51ca61508e9a24e79d523c28fe8ffc41 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Mon, 21 Nov 2022 11:17:55 -0500 Subject: [PATCH 08/14] Fix image-related issues on Makefile and deployment Signed-off-by: Vu Dinh --- Makefile | 2 +- config/default/manager_auth_proxy_patch.yaml | 1 + config/manager/manager.yaml | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f9f15b4..fe243d9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Image URL to use all building/pushing image targets -IMG ?= controller:latest REGISTRY ?= localhost +IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.25.0 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 687c4a7..ad1505b 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -50,6 +50,7 @@ spec: memory: 64Mi - name: manager args: + - "--api-export-name=catalog.kcp.dev" - "--health-probe-bind-address=:8081" - "--metrics-bind-address=127.0.0.1:8080" - "--leader-elect" diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 3e75600..1b07e89 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -71,7 +71,8 @@ spec: args: - --api-export-name=catalog.kcp.dev - --leader-elect - image: controller:latest + image: localhost/controller:latest + imagePullPolicy: IfNotPresent name: manager securityContext: allowPrivilegeEscalation: false From ad144e48c3090d0dae473cd130193df1f4497eef Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Mon, 21 Nov 2022 22:01:34 +0530 Subject: [PATCH 09/14] Add permission model to apiexport --- config/kcp/clusterrole.yaml | 21 +++++++++++++++++++++ config/kcp/clusterrolebinding.yaml | 12 ++++++++++++ config/kcp/kustomization.yaml | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 config/kcp/clusterrole.yaml create mode 100644 config/kcp/clusterrolebinding.yaml diff --git a/config/kcp/clusterrole.yaml b/config/kcp/clusterrole.yaml new file mode 100644 index 0000000..a465c80 --- /dev/null +++ b/config/kcp/clusterrole.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: kcp-manager-role +rules: +- apiGroups: + - apis.kcp.dev + resources: + - apiexports + verbs: + - get + - list + - watch +- apiGroups: + - apis.kcp.dev + resources: + - apiexports/content + verbs: + - '*' \ No newline at end of file diff --git a/config/kcp/clusterrolebinding.yaml b/config/kcp/clusterrolebinding.yaml new file mode 100644 index 0000000..55cb26e --- /dev/null +++ b/config/kcp/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kcp-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kcp-manager-role +subjects: +- kind: ServiceAccount + name: controller-manager + namespace: system \ No newline at end of file diff --git a/config/kcp/kustomization.yaml b/config/kcp/kustomization.yaml index 8cb3e01..adcce65 100644 --- a/config/kcp/kustomization.yaml +++ b/config/kcp/kustomization.yaml @@ -1,6 +1,8 @@ resources: - today.apiresourceschemas.yaml - catalogentry.apiexport.yaml + - clusterrole.yaml + - clusterrolebinding.yaml configurations: - kustomizeconfig.yaml From 8f8c76baccdfa8078cced6328cf856e0833aab5d Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Mon, 21 Nov 2022 12:23:37 -0500 Subject: [PATCH 10/14] Fix e2e test cases implementation details Signed-off-by: Vu Dinh --- config/rbac/role.yaml | 8 ++++++++ main.go | 4 +++- test/e2e/controller_test.go | 9 ++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 292b102..1a67491 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,6 +5,14 @@ metadata: creationTimestamp: null name: manager-role rules: +- apiGroups: + - apis.kcp.dev + resources: + - apiexports + verbs: + - get + - list + - watch - apiGroups: - catalog.kcp.dev resources: diff --git a/main.go b/main.go index 50ab558..324e428 100644 --- a/main.go +++ b/main.go @@ -135,12 +135,14 @@ func main() { } setupLog.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { + if err := mgr.Start(ctx); err != nil { setupLog.Error(err, "problem running manager") os.Exit(1) } } +// +kubebuilder:rbac:groups="apis.kcp.dev",resources=apiexports,verbs=get;list;watch + // restConfigForAPIExport returns a *rest.Config properly configured to communicate with the endpoint for the // APIExport's virtual workspace. func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string) (*rest.Config, error) { diff --git a/test/e2e/controller_test.go b/test/e2e/controller_test.go index 97e44b3..9492f41 100644 --- a/test/e2e/controller_test.go +++ b/test/e2e/controller_test.go @@ -271,7 +271,7 @@ func TestValidCatalogEntry(t *testing.T) { // Create test apiResourceSchema schema := &apisv1alpha1.APIResourceSchema{ ObjectMeta: metav1.ObjectMeta{ - Name: "schema-test", + Name: "today.tests.catalog.kcp.dev", }, Spec: apisv1alpha1.APIResourceSchemaSpec{ Group: "catalog.kcp.dev", @@ -279,12 +279,16 @@ func TestValidCatalogEntry(t *testing.T) { Plural: "tests", Singular: "test", Kind: "Test", + ListKind: "testlist", }, Scope: apiextensionsv1.ClusterScoped, Versions: []apisv1alpha1.APIResourceVersion{{ Name: "v1", Served: true, Storage: true, + Schema: runtime.RawExtension{ + Raw: []byte(`{"description":"foo","type":"object"}`), + }, }}, }, } @@ -330,6 +334,9 @@ func TestValidCatalogEntry(t *testing.T) { }, } entry, err := createCatalogEntry(t, c, workspaceCluster, newEntry) + if err != nil { + t.Fatalf("unable to create CatalogEntry: %v", err) + } // Check APIExportValid condition status to be True if !conditions.IsTrue(entry, catalogv1alpha1.APIExportValidType) { From 7e871ba6fa4bb4de30153bee42f79ff60a8c5052 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Tue, 22 Nov 2022 13:00:09 -0500 Subject: [PATCH 11/14] Add log level for debugging Signed-off-by: Vu Dinh --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 324e428..a0a1264 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/healthz" @@ -53,6 +54,10 @@ func init() { utilruntime.Must(catalogv1alpha1.AddToScheme(scheme)) utilruntime.Must(apisv1alpha1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme + klog.InitFlags(flag.CommandLine) + if err := flag.Lookup("v").Value.Set("6"); err != nil { + panic(err) + } } func main() { From f11c2453992090b1e01aa2774793d99fc0fa361e Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Wed, 23 Nov 2022 03:19:50 +0530 Subject: [PATCH 12/14] Check if rbac is working --- config/rbac/role.yaml | 78 ++++++++++++++++++++++++++ controllers/catalogentry_controller.go | 18 ++++-- 2 files changed, 92 insertions(+), 4 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 1a67491..51c81ad 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,6 +5,84 @@ metadata: creationTimestamp: null name: manager-role rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - patch + - update +- apiGroups: + - "" + resources: + - namespaces + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - namespaces/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - namespaces/status + verbs: + - get + - patch + - update +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - secrets/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - secrets/status + verbs: + - get + - patch + - update - apiGroups: - apis.kcp.dev resources: diff --git a/controllers/catalogentry_controller.go b/controllers/catalogentry_controller.go index acec667..7969341 100644 --- a/controllers/catalogentry_controller.go +++ b/controllers/catalogentry_controller.go @@ -50,14 +50,24 @@ type CatalogEntryReconciler struct { Scheme *runtime.Scheme } -//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/finalizers,verbs=update - // Reconcile validates exports in CatalogEntry spec and add a condition to status // to reflect the outcome of the validation. // It also aggregates all permissionClaims and api resources from referenced APIExport // to CatalogEntry status + +//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=catalog.kcp.dev,resources=catalogentries/finalizers,verbs=update +// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=secrets/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=secrets/finalizers,verbs=update +// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=configmaps/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=configmaps/finalizers,verbs=update +// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=namespaces/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=namespaces/finalizers,verbs=update + func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { logger := logging.WithReconciler(klog.Background(), controllerName) logger = logger.WithValues("clusterName", req.ClusterName) From ae3b39efc781469062a17149382cd9fca1a4b6d7 Mon Sep 17 00:00:00 2001 From: Vu Dinh Date: Sat, 26 Nov 2022 01:38:23 -0500 Subject: [PATCH 13/14] Fix resource crd issue Signed-off-by: Vu Dinh --- Makefile | 9 +++++++-- config/default/kustomization.yaml | 2 +- test/e2e/apibinding.yaml | 9 +++++++++ test/e2e/controller_test.go | 6 ++---- 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 test/e2e/apibinding.yaml diff --git a/Makefile b/Makefile index fe243d9..d4d24f0 100644 --- a/Makefile +++ b/Makefile @@ -127,9 +127,15 @@ run-test-e2e: ## Run end-to-end tests on a cluster. .PHONY: ready-deployment ready-deployment: KUBECONFIG = $(ARTIFACT_DIR)/kcp.kubeconfig -ready-deployment: kind-image install deploy ## Deploy the controller-manager and wait for it to be ready. +ready-deployment: kind-image install deploy apibinding ## Deploy the controller-manager and wait for it to be ready. $(KCP_KUBECTL) --namespace "catalog-system" rollout status deployment/catalog-controller-manager +.PHONY: apibinding +apibinding: + $( eval WORKSPACE = $(shell $(KCP_KUBECTL) kcp workspace . --short)) + sed 's/WORKSPACE/$(WORKSPACE)/' ./test/e2e/apibinding.yaml | $(KCP_KUBECTL) apply -f - + $(KCP_KUBECTL) wait --for=condition=Ready apibinding/catalog.kcp.dev + .PHONY: kind-image kind-image: docker-build ## Load the controller-manager image into the kind cluster. kind load docker-image $(REGISTRY)/$(IMG) --name catalog @@ -229,7 +235,6 @@ KCPKUBECONFIG ?= $(ARTIFACT_DIR)/kcp.kubeconfig .PHONY: install install: manifests $(KUSTOMIZE) ## Install CRDs into the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/crd | kubectl apply -f - $(KUSTOMIZE) build config/kcp | kubectl --kubeconfig $(KCPKUBECONFIG) apply -f - .PHONY: uninstall diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 18eef47..7469069 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -13,7 +13,7 @@ namePrefix: catalog- # someName: someValue bases: -- ../crd +- ../kcp - ../rbac - ../manager # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in diff --git a/test/e2e/apibinding.yaml b/test/e2e/apibinding.yaml new file mode 100644 index 0000000..2429c89 --- /dev/null +++ b/test/e2e/apibinding.yaml @@ -0,0 +1,9 @@ +apiVersion: apis.kcp.dev/v1alpha1 +kind: APIBinding +metadata: + name: catalog.kcp.dev +spec: + reference: + workspace: + path: WORKSPACE + exportName: catalog.kcp.dev diff --git a/test/e2e/controller_test.go b/test/e2e/controller_test.go index 9492f41..ef9c0ca 100644 --- a/test/e2e/controller_test.go +++ b/test/e2e/controller_test.go @@ -317,7 +317,6 @@ func TestValidCatalogEntry(t *testing.T) { } // Create catalogentry - path := "root:" + workspaceCluster.Base() newEntry := &catalogv1alpha1.CatalogEntry{ ObjectMeta: metav1.ObjectMeta{ Name: "entry-test", @@ -326,7 +325,7 @@ func TestValidCatalogEntry(t *testing.T) { Exports: []apisv1alpha1.ExportReference{ { Workspace: &apisv1alpha1.WorkspaceExportReference{ - Path: path, + Path: workspaceCluster.String(), ExportName: "export-test", }, }, @@ -374,7 +373,6 @@ func TestInvalidCatalogEntry(t *testing.T) { c := createWorkspace(t, workspaceCluster) // Create catalogentry - path := "root:" + workspaceCluster.Base() newEntry := &catalogv1alpha1.CatalogEntry{ ObjectMeta: metav1.ObjectMeta{ Name: "entry-test", @@ -383,7 +381,7 @@ func TestInvalidCatalogEntry(t *testing.T) { Exports: []apisv1alpha1.ExportReference{ { Workspace: &apisv1alpha1.WorkspaceExportReference{ - Path: path, + Path: workspaceCluster.String(), ExportName: "export-test", }, }, From 83778def1f3caff7bb2ceddb0ac7e0d32542efc2 Mon Sep 17 00:00:00 2001 From: varshaprasad96 Date: Thu, 1 Dec 2022 23:03:25 +0530 Subject: [PATCH 14/14] Fix path cannot be added error --- controllers/catalogentry_controller.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/catalogentry_controller.go b/controllers/catalogentry_controller.go index 7969341..49036c8 100644 --- a/controllers/catalogentry_controller.go +++ b/controllers/catalogentry_controller.go @@ -116,9 +116,7 @@ func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request } // Extract permission and API resource info - for _, claim := range export.Spec.PermissionClaims { - exportPermissionClaims = append(exportPermissionClaims, claim) - } + exportPermissionClaims = append(exportPermissionClaims, export.Spec.PermissionClaims...) catalogEntry.Status.ExportPermissionClaims = exportPermissionClaims for _, schemaName := range export.Spec.LatestResourceSchemas { @@ -157,7 +155,7 @@ func (r *CatalogEntryReconciler) Reconcile(ctx context.Context, req ctrl.Request // Update the catalog entry if status is changed if !reflect.DeepEqual(catalogEntry.Status, oldEntry.Status) { - err = r.Client.Status().Update(context.TODO(), catalogEntry) + err = r.Client.Status().Update(ctx, catalogEntry) if err != nil { logger.Error(err, "failed to update CatalogEntry") return ctrl.Result{}, err