From ffd50a59b2f070ae2346d2ec62f50612f032fbe2 Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Thu, 21 Mar 2024 12:28:56 +0100 Subject: [PATCH 1/2] Upgrade to controller-runtime v0.17.2 --- Makefile | 2 +- apis/marin3r/v1alpha1/envoyconfig_webhook.go | 15 +- .../v1alpha1/envoydeployment_webhook.go | 11 +- .../v1alpha1/webhook_suite_test.go | 18 +- cmd/discoveryservice.go | 14 +- cmd/operator.go | 24 +- cmd/webhook.go | 47 ++-- ....marin3r.3scale.net_discoveryservices.yaml | 6 +- ...r.marin3r.3scale.net_envoydeployments.yaml | 195 ++++++++++++-- config/default/kustomization.yaml | 25 +- .../marin3r/envoyconfigrevision_controller.go | 101 +++---- .../envoyconfigrevision_controller_test.go | 6 +- controllers/marin3r/suite_test.go | 5 +- .../discoveryservicecertificate_controller.go | 46 +--- .../envoydeployment_controller.go | 66 ++--- controllers/operator.marin3r/suite_test.go | 5 +- go.mod | 77 +++--- go.sum | 248 ++++++------------ .../envoyconfig/reconcile_revisions_test.go | 22 +- .../envoyconfig/revisions/crud_test.go | 24 +- .../providers/marin3r/crud_test.go | 80 +++--- .../reconcile_certificate_test.go | 20 +- pkg/webhooks/podv1mutator/handle.go | 9 +- pkg/webhooks/podv1mutator/handle_test.go | 16 +- pkg/webhooks/podv1mutator/sidecar_test.go | 12 +- test/e2e/marin3r/suite_test.go | 6 +- 26 files changed, 588 insertions(+), 512 deletions(-) diff --git a/Makefile b/Makefile index 4d23e9dc..76672889 100644 --- a/Makefile +++ b/Makefile @@ -213,7 +213,7 @@ KIND ?= $(LOCALBIN)/kind ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 CONTROLLER_TOOLS_VERSION ?= v0.11.3 -GINKGO_VERSION ?= v2.9.1 +GINKGO_VERSION ?= v2.14.0 CRD_REFDOCS_VERSION ?= v0.0.8 KIND_VERSION ?= v0.16.0 diff --git a/apis/marin3r/v1alpha1/envoyconfig_webhook.go b/apis/marin3r/v1alpha1/envoyconfig_webhook.go index a1872bae..46fe5696 100644 --- a/apis/marin3r/v1alpha1/envoyconfig_webhook.go +++ b/apis/marin3r/v1alpha1/envoyconfig_webhook.go @@ -27,6 +27,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // log is for logging in this package. @@ -43,25 +44,25 @@ func (r *EnvoyConfig) SetupWebhookWithManager(mgr ctrl.Manager) error { var _ webhook.Validator = &EnvoyConfig{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyConfig) ValidateCreate() error { +func (r *EnvoyConfig) ValidateCreate() (admission.Warnings, error) { validationlog.Info("ValidateCreate", "type", "EnvoyConfig", "resource", util.ObjectKey(r).String()) if err := r.Validate(); err != nil { - return err + return nil, err } - return nil + return nil, nil } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyConfig) ValidateUpdate(old runtime.Object) error { +func (r *EnvoyConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { validationlog.Info("validateUpdate", "type", "EnvoyConfig", "resource", util.ObjectKey(r).String()) if err := r.Validate(); err != nil { - return err + return nil, err } - return nil + return nil, nil } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyConfig) ValidateDelete() error { return nil } +func (r *EnvoyConfig) ValidateDelete() (admission.Warnings, error) { return nil, nil } // Validates the EnvoyConfig resource func (r *EnvoyConfig) Validate() error { diff --git a/apis/operator.marin3r/v1alpha1/envoydeployment_webhook.go b/apis/operator.marin3r/v1alpha1/envoydeployment_webhook.go index 06e2822c..82f26170 100644 --- a/apis/operator.marin3r/v1alpha1/envoydeployment_webhook.go +++ b/apis/operator.marin3r/v1alpha1/envoydeployment_webhook.go @@ -21,6 +21,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // log is for logging in this package. @@ -38,21 +39,21 @@ func (r *EnvoyDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error { var _ webhook.Validator = &EnvoyDeployment{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyDeployment) ValidateCreate() error { +func (r *EnvoyDeployment) ValidateCreate() (admission.Warnings, error) { envoydeploymentlog.V(1).Info("validate create", "name", r.Name) - return r.Validate() + return nil, r.Validate() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyDeployment) ValidateUpdate(old runtime.Object) error { +func (r *EnvoyDeployment) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { envoydeploymentlog.V(1).Info("validate update", "name", r.Name) - return r.Validate() + return nil, r.Validate() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (r *EnvoyDeployment) ValidateDelete() error { return nil } +func (r *EnvoyDeployment) ValidateDelete() (admission.Warnings, error) { return nil, nil } // Validate checks that the spec of the EnvoyDeployment resource is correct func (r *EnvoyDeployment) Validate() error { diff --git a/apis/operator.marin3r/v1alpha1/webhook_suite_test.go b/apis/operator.marin3r/v1alpha1/webhook_suite_test.go index a30947bf..fcf1df4c 100644 --- a/apis/operator.marin3r/v1alpha1/webhook_suite_test.go +++ b/apis/operator.marin3r/v1alpha1/webhook_suite_test.go @@ -37,6 +37,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" //+kubebuilder:scaffold:imports ) @@ -98,12 +100,16 @@ var _ = BeforeSuite(func() { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: scheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: scheme, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + LeaderElection: false, + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) Expect(err).NotTo(HaveOccurred()) diff --git a/cmd/discoveryservice.go b/cmd/discoveryservice.go index 828da368..99a92a86 100644 --- a/cmd/discoveryservice.go +++ b/cmd/discoveryservice.go @@ -42,9 +42,11 @@ import ( "k8s.io/client-go/kubernetes" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" ) const ( @@ -96,12 +98,18 @@ func runDiscoveryService(cmd *cobra.Command, args []string) { ctx := signals.SetupSignalHandler() mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: dsScheme, - MetricsBindAddress: metricsAddr, + Scheme: dsScheme, + Metrics: metricsserver.Options{ + BindAddress: "0", + }, HealthProbeBindAddress: probeAddr, LeaderElectionID: "2cfbe7d6.marin3r.3scale.net", LeaderElectionResourceLock: "leases", - Namespace: os.Getenv("WATCH_NAMESPACE"), + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{ + os.Getenv("WATCH_NAMESPACE"): {}, + }, + }, }) if err != nil { setupLog.Error(err, "unable to start manager") diff --git a/cmd/operator.go b/cmd/operator.go index c3f7a0df..9997d878 100644 --- a/cmd/operator.go +++ b/cmd/operator.go @@ -32,6 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" marin3rv1alpha1 "github.com/3scale-ops/marin3r/apis/marin3r/v1alpha1" operatorv1alpha1 "github.com/3scale-ops/marin3r/apis/operator.marin3r/v1alpha1" @@ -80,24 +81,29 @@ func runOperator(cmd *cobra.Command, args []string) { } options := ctrl.Options{ - Scheme: operatorScheme, - MetricsBindAddress: metricsAddr, + Scheme: operatorScheme, + Metrics: metricsserver.Options{ + BindAddress: metricsAddr, + }, HealthProbeBindAddress: probeAddr, LeaderElection: leaderElect, LeaderElectionID: "2cfbe7d6.operator.marin3r.3scale.net", LeaderElectionResourceLock: "leases", - Namespace: watchNamespace, // namespaced-scope when the value is not an empty string } if strings.Contains(watchNamespace, ",") { setupLog.Info(fmt.Sprintf("manager in MultiNamespaced mode will be watching namespaces %q", watchNamespace)) - options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(watchNamespace, ",")) - } else if watchNamespace == "" { - setupLog.Info("manager in Cluster scope mode will be watching all namespaces") - options.Namespace = watchNamespace - } else { + options.Cache = cache.Options{DefaultNamespaces: map[string]cache.Config{}} + for _, ns := range strings.Split(watchNamespace, ",") { + options.Cache.DefaultNamespaces[ns] = cache.Config{} + } + } else if watchNamespace != "" { setupLog.Info(fmt.Sprintf("manager in Namespaced mode will be watching namespace %q", watchNamespace)) - options.Namespace = watchNamespace + options.Cache = cache.Options{DefaultNamespaces: map[string]cache.Config{ + watchNamespace: {}, + }} + } else { + setupLog.Info("manager in Cluster scope mode will be watching all namespaces") } mgr, err := ctrl.NewManager(cfg, options) diff --git a/cmd/webhook.go b/cmd/webhook.go index 2c0bcd91..fe25213b 100644 --- a/cmd/webhook.go +++ b/cmd/webhook.go @@ -31,7 +31,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" marin3rv1alpha1 "github.com/3scale-ops/marin3r/apis/marin3r/v1alpha1" operatorv1alpha1 "github.com/3scale-ops/marin3r/apis/operator.marin3r/v1alpha1" @@ -90,21 +92,33 @@ func runWebhook(cmd *cobra.Command, args []string) { options := ctrl.Options{ Scheme: webhookScheme, - MetricsBindAddress: "0", HealthProbeBindAddress: probeAddr, - Port: webhookPort, LeaderElection: false, + WebhookServer: webhook.NewServer(webhook.Options{ + // Setup the webhook + Port: webhookPort, + CertDir: webhookTLSCertDir, + CertName: webhookTLSCertName, + KeyName: webhookTLSKeyName, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, } if strings.Contains(watchNamespace, ",") { - setupLog.Info(fmt.Sprintf("webhook in MultiNamespaced mode will be watching namespaces %q", watchNamespace)) - options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(watchNamespace, ",")) - } else if watchNamespace == "" { - setupLog.Info("webhook in Cluster scope mode will be watching all namespaces") - options.Namespace = watchNamespace + setupLog.Info(fmt.Sprintf("manager in MultiNamespaced mode will be watching namespaces %q", watchNamespace)) + options.Cache = cache.Options{DefaultNamespaces: map[string]cache.Config{}} + for _, ns := range strings.Split(watchNamespace, ",") { + options.Cache.DefaultNamespaces[ns] = cache.Config{} + } + } else if watchNamespace != "" { + setupLog.Info(fmt.Sprintf("manager in Namespaced mode will be watching namespace %q", watchNamespace)) + options.Cache = cache.Options{DefaultNamespaces: map[string]cache.Config{ + watchNamespace: {}, + }} } else { - setupLog.Info(fmt.Sprintf("webhook in Namespaced mode will be watching namespace %q", watchNamespace)) - options.Namespace = watchNamespace + setupLog.Info("manager in Cluster scope mode will be watching all namespaces") } mgr, err := ctrl.NewManager(cfg, options) @@ -113,16 +127,15 @@ func runWebhook(cmd *cobra.Command, args []string) { os.Exit(1) } - // Setup the webhook - hookServer := mgr.GetWebhookServer() - hookServer.CertDir = webhookTLSCertDir - hookServer.KeyName = webhookTLSKeyName - hookServer.CertName = webhookTLSCertName - hookServer.Port = webhookPort - // Register the Pod mutating webhook + hookServer := mgr.GetWebhookServer() ctrl.Log.Info("registering the pod mutating webhook with webhook server") - hookServer.Register(podv1mutator.MutatePath, &webhook.Admission{Handler: &podv1mutator.PodMutator{Client: mgr.GetClient()}}) + hookServer.Register(podv1mutator.MutatePath, &webhook.Admission{ + Handler: &podv1mutator.PodMutator{ + Client: mgr.GetClient(), + Decoder: admission.NewDecoder(mgr.GetScheme()), + }, + }) // Register the EnvoyConfig v1alpha1 webhooks if err = (&marin3rv1alpha1.EnvoyConfig{}).SetupWebhookWithManager(mgr); err != nil { diff --git a/config/crd/bases/operator.marin3r.3scale.net_discoveryservices.yaml b/config/crd/bases/operator.marin3r.3scale.net_discoveryservices.yaml index 3300bba7..aaa8e169 100644 --- a/config/crd/bases/operator.marin3r.3scale.net_discoveryservices.yaml +++ b/config/crd/bases/operator.marin3r.3scale.net_discoveryservices.yaml @@ -101,7 +101,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -137,7 +138,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceConfig: diff --git a/config/crd/bases/operator.marin3r.3scale.net_envoydeployments.yaml b/config/crd/bases/operator.marin3r.3scale.net_envoydeployments.yaml index bbd7c614..398af7c9 100644 --- a/config/crd/bases/operator.marin3r.3scale.net_envoydeployments.yaml +++ b/config/crd/bases/operator.marin3r.3scale.net_envoydeployments.yaml @@ -280,7 +280,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -330,6 +331,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -440,7 +479,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -486,6 +526,43 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -589,7 +666,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -639,6 +717,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -749,7 +865,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -795,6 +912,43 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1049,18 +1203,18 @@ spec: which must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -1078,7 +1232,7 @@ spec: Max is used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than @@ -1106,18 +1260,18 @@ spec: which must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -1135,7 +1289,7 @@ spec: Max is used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than @@ -1358,15 +1512,16 @@ spec: of a object,such as kind,name apiVersion properties: apiVersion: - description: API version of the referent + description: apiVersion is the API version of + the referent type: string kind: - description: 'Kind of the referent; More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'kind is the kind of the referent; + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: - description: 'Name of the referent; More info: - http://kubernetes.io/docs/user-guide/identifiers#names' + description: 'name is the name of the referent; + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string required: - kind @@ -1689,7 +1844,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1725,7 +1881,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object shutdownManager: diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 343e3cdf..ea8bf8ef 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -51,19 +51,18 @@ patches: kind: Service name: controller-manager-metrics-service version: v1 -# [CUSTOM: cluster scope] Uncomment this for cluster scoped installations -# - path: custom/clusterrole_patch.yaml -# target: -# group: rbac.authorization.k8s.io -# kind: Role -# name: manager-role -# version: v1 -# - path: custom/clusterrolebinding_patch.yaml -# target: -# group: rbac.authorization.k8s.io -# kind: RoleBinding -# name: manager-rolebinding -# version: v1 +- path: custom/clusterrole_patch.yaml + target: + group: rbac.authorization.k8s.io + kind: Role + name: manager-role + version: v1 +- path: custom/clusterrolebinding_patch.yaml + target: + group: rbac.authorization.k8s.io + kind: RoleBinding + name: manager-rolebinding + version: v1 # the following config is for teaching kustomize how to do var substitution vars: diff --git a/controllers/marin3r/envoyconfigrevision_controller.go b/controllers/marin3r/envoyconfigrevision_controller.go index 1b03edd6..49587a48 100644 --- a/controllers/marin3r/envoyconfigrevision_controller.go +++ b/controllers/marin3r/envoyconfigrevision_controller.go @@ -39,14 +39,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "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/event" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/predicate" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" ) // EnvoyConfigRevisionReconciler reconciles a EnvoyConfigRevision object @@ -198,84 +195,60 @@ func filterByAPIVersionPredicate(version envoy.APIVersion, // SecretsEventHandler returns an EventHandler that generates // reconcile requests for Secrets func (r *EnvoyConfigRevisionReconciler) SecretsEventHandler() handler.EventHandler { - return handler.EnqueueRequestsFromMapFunc( - func(o client.Object) []reconcile.Request { - secret := o.(*corev1.Secret) + return r.FilteredEventHandler( + &marin3rv1alpha1.EnvoyConfigRevisionList{}, + func(event client.Object, o client.Object) bool { + secret := event.(*corev1.Secret) if secret.Type != corev1.SecretTypeTLS { - return []reconcile.Request{} + return false } - list := &marin3rv1alpha1.EnvoyConfigRevisionList{} - if err := r.Client.List(context.Background(), list); err != nil { - return []reconcile.Request{} - } - - reconcileRequests := []reconcile.Request{} - - for _, ecr := range list.Items { - if meta.IsStatusConditionTrue(ecr.Status.Conditions, marin3rv1alpha1.RevisionPublishedCondition) { - // check if the k8s Secret is relevant for this EnvoyConfigRevision - for _, s := range ecr.Spec.Resources { - if s.Type == envoy.Secret { - - if *s.GenerateFromTlsSecret == secret.GetName() { - reconcileRequests = append(reconcileRequests, - reconcile.Request{NamespacedName: types.NamespacedName{ - Name: ecr.GetName(), - Namespace: ecr.GetNamespace(), - }}) - } + ecr := o.(*marin3rv1alpha1.EnvoyConfigRevision) + if meta.IsStatusConditionTrue(ecr.Status.Conditions, marin3rv1alpha1.RevisionPublishedCondition) { + // check if the k8s Secret is relevant for this EnvoyConfigRevision + for _, s := range ecr.Spec.Resources { + if s.Type == envoy.Secret { + if *s.GenerateFromTlsSecret == secret.GetName() { + return true } - } + } } - - return reconcileRequests + return false }, + logr.Discard(), ) } // EndpointSlicesEventHandler returns an EventHandler that generates // reconcile requests for EndpointSlices func (r *EnvoyConfigRevisionReconciler) EndpointSlicesEventHandler() handler.EventHandler { - return handler.EnqueueRequestsFromMapFunc( - func(o client.Object) []reconcile.Request { - endpointSlice := o.(*discoveryv1.EndpointSlice) - - list := &marin3rv1alpha1.EnvoyConfigRevisionList{} - if err := r.Client.List(context.Background(), list); err != nil { - return []reconcile.Request{} - } + return r.FilteredEventHandler( + &marin3rv1alpha1.EnvoyConfigRevisionList{}, + func(event client.Object, o client.Object) bool { + endpointSlice := event.(*discoveryv1.EndpointSlice) + ecr := o.(*marin3rv1alpha1.EnvoyConfigRevision) + if meta.IsStatusConditionTrue(ecr.Status.Conditions, marin3rv1alpha1.RevisionPublishedCondition) { + // check if the k8s EndpointSlice is relevant for this EnvoyConfigRevision + for _, r := range ecr.Spec.Resources { + if r.Type == envoy.Endpoint && r.GenerateFromEndpointSlices != nil { + + selector, err := metav1.LabelSelectorAsSelector(r.GenerateFromEndpointSlices.Selector) + if err != nil { + // skip this item in case of error + continue + } - reconcileRequests := []reconcile.Request{} - - for _, ecr := range list.Items { - if meta.IsStatusConditionTrue(ecr.Status.Conditions, marin3rv1alpha1.RevisionPublishedCondition) { - // check if the k8s EndpointSlice is relevant for this EnvoyConfigRevision - for _, r := range ecr.Spec.Resources { - if r.Type == envoy.Endpoint && r.GenerateFromEndpointSlices != nil { - - selector, err := metav1.LabelSelectorAsSelector(r.GenerateFromEndpointSlices.Selector) - if err != nil { - // skip this item in case of error - continue - } - - // generate a reconcile request if this event is relevant for this revision - if selector.Matches(labels.Set(endpointSlice.GetLabels())) { - reconcileRequests = append(reconcileRequests, - reconcile.Request{NamespacedName: types.NamespacedName{ - Name: ecr.GetName(), - Namespace: ecr.GetNamespace(), - }}) - } + // generate a reconcile request if this event is relevant for this revision + if selector.Matches(labels.Set(endpointSlice.GetLabels())) { + return true } } } } - - return reconcileRequests + return false }, + logr.Discard(), ) } @@ -284,7 +257,7 @@ func (r *EnvoyConfigRevisionReconciler) SetupWithManager(mgr ctrl.Manager) error return ctrl.NewControllerManagedBy(mgr). For(&marin3rv1alpha1.EnvoyConfigRevision{}). WithEventFilter(filterByAPIVersionPredicate(r.APIVersion, filterByAPIVersion)). - Watches(&source.Kind{Type: &corev1.Secret{}}, r.SecretsEventHandler()). - Watches(&source.Kind{Type: &discoveryv1.EndpointSlice{}}, r.EndpointSlicesEventHandler()). + Watches(&corev1.Secret{}, r.SecretsEventHandler()). + Watches(&discoveryv1.EndpointSlice{}, r.EndpointSlicesEventHandler()). Complete(r) } diff --git a/controllers/marin3r/envoyconfigrevision_controller_test.go b/controllers/marin3r/envoyconfigrevision_controller_test.go index a2689c19..8b1dbc5d 100644 --- a/controllers/marin3r/envoyconfigrevision_controller_test.go +++ b/controllers/marin3r/envoyconfigrevision_controller_test.go @@ -37,7 +37,7 @@ func TestEnvoyConfigRevisionReconciler_taintSelf(t *testing.T) { } r := &EnvoyConfigRevisionReconciler{ Reconciler: &reconciler.Reconciler{ - Client: fake.NewClientBuilder().WithObjects(ecr).Build(), + Client: fake.NewClientBuilder().WithObjects(ecr).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), Scheme: scheme.Scheme, Log: ctrl.Log.WithName("test"), }, @@ -46,7 +46,9 @@ func TestEnvoyConfigRevisionReconciler_taintSelf(t *testing.T) { if err := r.taintSelf(context.TODO(), ecr, "test", "test", r.Log); err != nil { t.Errorf("EnvoyConfigRevisionReconciler.taintSelf() error = %v", err) } - r.Client.Get(context.TODO(), types.NamespacedName{Name: "ecr", Namespace: "default"}, ecr) + if err := r.Client.Get(context.TODO(), types.NamespacedName{Name: "ecr", Namespace: "default"}, ecr); err != nil { + t.Error(err) + } if !meta.IsStatusConditionTrue(ecr.Status.Conditions, marin3rv1alpha1.RevisionTaintedCondition) { t.Errorf("EnvoyConfigRevisionReconciler.taintSelf() ecr is not tainted") } diff --git a/controllers/marin3r/suite_test.go b/controllers/marin3r/suite_test.go index 49cea6b0..20a3f781 100644 --- a/controllers/marin3r/suite_test.go +++ b/controllers/marin3r/suite_test.go @@ -39,6 +39,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" // +kubebuilder:scaffold:imports ) @@ -93,7 +94,9 @@ var _ = BeforeSuite(func() { Scheme: scheme.Scheme, // Disable the metrics port to allow running the // test suite in parallel - MetricsBindAddress: "0", + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) Expect(err).ToNot(HaveOccurred()) diff --git a/controllers/operator.marin3r/discoveryservicecertificate_controller.go b/controllers/operator.marin3r/discoveryservicecertificate_controller.go index c92d5c69..d77fec03 100644 --- a/controllers/operator.marin3r/discoveryservicecertificate_controller.go +++ b/controllers/operator.marin3r/discoveryservicecertificate_controller.go @@ -24,13 +24,11 @@ import ( operatorv1alpha1 "github.com/3scale-ops/marin3r/apis/operator.marin3r/v1alpha1" discoveryservicecertificate "github.com/3scale-ops/marin3r/pkg/reconcilers/operator/discoveryservicecertificate" marin3r_provider "github.com/3scale-ops/marin3r/pkg/reconcilers/operator/discoveryservicecertificate/providers/marin3r" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" ) // DiscoveryServiceCertificateReconciler reconciles a DiscoveryServiceCertificate object @@ -80,37 +78,19 @@ func (r *DiscoveryServiceCertificateReconciler) Reconcile(ctx context.Context, r // IssuerChangedHandler returns an EventHandler that generates // reconcile requests for Secrets func (r *DiscoveryServiceCertificateReconciler) IssuerChangedHandler() handler.EventHandler { - return handler.EnqueueRequestsFromMapFunc( - func(o client.Object) []reconcile.Request { - - issuer := o.(*operatorv1alpha1.DiscoveryServiceCertificate) - // Only interested in changes to CA certificates. A change in the CA - // means that the child certificates need to be re-issued - if !issuer.IsCA() { - return []reconcile.Request{} + return r.FilteredEventHandler( + &operatorv1alpha1.DiscoveryServiceCertificateList{}, + func(event client.Object, o client.Object) bool { + issuer := event.(*operatorv1alpha1.DiscoveryServiceCertificate) + cert := o.(*operatorv1alpha1.DiscoveryServiceCertificate) + if issuer.IsCA() && + cert.Spec.Signer.CASigned != nil && + cert.Spec.Signer.CASigned.SecretRef.Name == issuer.Spec.SecretRef.Name { + return true } - - list := &operatorv1alpha1.DiscoveryServiceCertificateList{} - if err := r.Client.List(context.Background(), list); err != nil { - return []reconcile.Request{} - } - - reconcileRequests := []reconcile.Request{} - - for _, dsc := range list.Items { - if dsc.Spec.Signer.CASigned != nil && - dsc.Spec.Signer.CASigned.SecretRef.Name == issuer.Spec.SecretRef.Name { - - reconcileRequests = append(reconcileRequests, - reconcile.Request{NamespacedName: types.NamespacedName{ - Name: dsc.GetName(), - Namespace: dsc.GetNamespace(), - }}) - } - } - - return reconcileRequests + return false }, + logr.Discard(), ) } @@ -119,6 +99,6 @@ func (r *DiscoveryServiceCertificateReconciler) SetupWithManager(mgr ctrl.Manage return ctrl.NewControllerManagedBy(mgr). For(&operatorv1alpha1.DiscoveryServiceCertificate{}). Owns(&corev1.Secret{}). - Watches(&source.Kind{Type: &operatorv1alpha1.DiscoveryServiceCertificate{}}, r.IssuerChangedHandler()). + Watches(&operatorv1alpha1.DiscoveryServiceCertificate{}, r.IssuerChangedHandler()). Complete(r) } diff --git a/controllers/operator.marin3r/envoydeployment_controller.go b/controllers/operator.marin3r/envoydeployment_controller.go index 1c14c8f5..ae64a175 100644 --- a/controllers/operator.marin3r/envoydeployment_controller.go +++ b/controllers/operator.marin3r/envoydeployment_controller.go @@ -30,18 +30,15 @@ import ( "github.com/3scale-ops/marin3r/pkg/envoy/container/defaults" "github.com/3scale-ops/marin3r/pkg/reconcilers/operator/envoydeployment/generators" "github.com/3scale-ops/marin3r/pkg/util/pointer" + "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" - corev1 "k8s.io/api/core/v1" policyv1 "k8s.io/api/policy/v1" "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" ) // EnvoyDeploymentReconciler reconciles a EnvoyDeployment object @@ -161,6 +158,38 @@ func (r *EnvoyDeploymentReconciler) getEnvoyConfig(ctx context.Context, key type return ec, nil } +// EnvoyConfigHandler returns an EventHandler to watch for EnvoyConfigs +func (r *EnvoyDeploymentReconciler) EnvoyConfigHandler() handler.EventHandler { + return r.FilteredEventHandler( + &operatorv1alpha1.EnvoyDeploymentList{}, + func(event client.Object, o client.Object) bool { + ec := event.(*marin3rv1alpha1.EnvoyConfig) + ed := o.(*operatorv1alpha1.EnvoyDeployment) + if ed.Spec.EnvoyConfigRef == ec.GetName() { + return true + } + return false + }, + logr.Discard(), + ) +} + +// EnvoyConfigHandler returns an EventHandler to watch for DiscoveryServices +func (r *EnvoyDeploymentReconciler) DiscoveryServiceHandler() handler.EventHandler { + return r.FilteredEventHandler( + &operatorv1alpha1.EnvoyDeploymentList{}, + func(event client.Object, o client.Object) bool { + ds := event.(*operatorv1alpha1.DiscoveryService) + ed := o.(*operatorv1alpha1.EnvoyDeployment) + if ed.Spec.DiscoveryServiceRef == ds.GetName() { + return true + } + return false + }, + logr.Discard(), + ) +} + // SetupWithManager sets up the controller with the Manager. func (r *EnvoyDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). @@ -169,32 +198,7 @@ func (r *EnvoyDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error { Owns(&operatorv1alpha1.DiscoveryServiceCertificate{}). Owns(&policyv1.PodDisruptionBudget{}). Owns(&autoscalingv2.HorizontalPodAutoscaler{}). - Watches(&source.Kind{Type: &corev1.Secret{TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfig"}}}, r.EnvoyConfigHandler()). + Watches(&marin3rv1alpha1.EnvoyConfig{}, r.EnvoyConfigHandler()). + Watches(&operatorv1alpha1.DiscoveryService{}, r.DiscoveryServiceHandler()). Complete(r) } - -// EnvoyConfigHandler returns an EventHandler to watch for EnvoyConfigs -func (r *EnvoyDeploymentReconciler) EnvoyConfigHandler() handler.EventHandler { - return handler.EnqueueRequestsFromMapFunc( - func(o client.Object) []reconcile.Request { - edList := &operatorv1alpha1.EnvoyDeploymentList{} - if err := r.Client.List(context.TODO(), edList, client.InNamespace(o.GetNamespace())); err != nil { - r.Log.Error(err, "unable to retrieve the list of EnvoyDeployment resources in the namespace", - "Type", "EnvoyConfig", "Name", o.GetName(), "Namespace", o.GetNamespace()) - return []reconcile.Request{} - } - - // Return a reconcile event for all EnvoyDeployments that have a reference to this EnvoyConfig - req := []reconcile.Request{} - for _, ed := range edList.Items { - if ed.Spec.EnvoyConfigRef == o.GetName() { - req = append(req, reconcile.Request{ - NamespacedName: types.NamespacedName{Name: ed.GetName(), Namespace: ed.GetNamespace()}, - }) - } - } - - return req - }, - ) -} diff --git a/controllers/operator.marin3r/suite_test.go b/controllers/operator.marin3r/suite_test.go index 49ec5659..996a8047 100644 --- a/controllers/operator.marin3r/suite_test.go +++ b/controllers/operator.marin3r/suite_test.go @@ -36,6 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" // +kubebuilder:scaffold:imports ) @@ -89,7 +90,9 @@ var _ = BeforeSuite(func() { Scheme: scheme.Scheme, // Disable the metrics port to allow running the // test suite in parallel - MetricsBindAddress: "0", + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) Expect(err).ToNot(HaveOccurred()) diff --git a/go.mod b/go.mod index 13ca79a4..0b209d29 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/3scale-ops/marin3r go 1.20 require ( - github.com/3scale-ops/basereconciler v0.5.0 + github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608 github.com/MakeNowJust/heredoc v1.0.0 github.com/davecgh/go-spew v1.1.1 github.com/envoyproxy/go-control-plane v0.12.0 @@ -12,42 +12,45 @@ require ( github.com/go-test/deep v1.1.0 github.com/google/go-cmp v0.6.0 github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e - github.com/onsi/ginkgo/v2 v2.9.1 - github.com/onsi/gomega v1.27.3 + github.com/onsi/ginkgo/v2 v2.14.0 + github.com/onsi/gomega v1.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 - github.com/prometheus/client_golang v1.14.0 - github.com/prometheus/common v0.42.0 + github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/common v0.45.0 github.com/spf13/cobra v1.8.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.33.0 - k8s.io/api v0.26.2 - k8s.io/apimachinery v0.26.5 - k8s.io/client-go v0.26.2 - sigs.k8s.io/controller-runtime v0.14.5 + k8s.io/api v0.29.2 + k8s.io/apimachinery v0.29.2 + k8s.io/client-go v0.29.2 + sigs.k8s.io/controller-runtime v0.17.2 sigs.k8s.io/yaml v1.4.0 ) +// For local dev uncomment this and point it to the correct path in your system +// replace github.com/3scale-ops/basereconciler => /home/roi/github.com/3scale/basereconciler + require ( github.com/beorn7/perks v1.0.1 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230309165930-d61513b1440d // indirect github.com/google/uuid v1.3.0 // indirect @@ -56,41 +59,41 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/moby/spdystream v0.2.0 // 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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 // indirect github.com/ohler55/ojg v1.20.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/spf13/pflag v1.0.5 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.10.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.16.1 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect 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.26.2 // indirect - k8s.io/component-base v0.26.2 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect - k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect + k8s.io/apiextensions-apiserver v0.29.0 // indirect + k8s.io/component-base v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 5995bb7f..5f16d7db 100644 --- a/go.sum +++ b/go.sum @@ -1,28 +1,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/3scale-ops/basereconciler v0.5.0 h1:bw3jrtaG7a9O7MnQJcfgDpJvxv2P8xNS9bKW7gwEgfU= -github.com/3scale-ops/basereconciler v0.5.0/go.mod h1:QuHsnYMbPQYKZjXjKX93efNI2VH2jVio4emJVJy7sRg= +github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608 h1:p38EEPFlvAk4ALwln4ujq8SEhNXc4mMELegKy14JJX0= +github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608/go.mod h1:bLk2Jn6trasK88DBCAROnVs67wXP3/qxfY3AGbohHhw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -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 v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -30,44 +20,35 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= 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/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/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -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.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -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-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -79,26 +60,12 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -108,26 +75,21 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20230309165930-d61513b1440d h1:um9/pc7tKMINFfP1eE7Wv6PRGXlcCSJkVajF7KJw3uQ= github.com/google/pprof v0.0.0-20230309165930-d61513b1440d/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e h1:XmA6L9IPRdUr28a+SK/oMchGgQy159wvzXA5tJ7l+40= github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e/go.mod h1:AFIo+02s+12CEg8Gzz9kzhCbmbq6JcKNrhHffCGA9z4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 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/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -136,8 +98,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -147,130 +109,100 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 h1:dOYG7LS/WK00RWZc8XGgcUTlTxpp3mKhdR2Q9z9HbXM= github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= github.com/ohler55/ojg v1.20.3 h1:Z+fnElsA/GbI5oiT726qJaG4Ca9q5l7UO68Qd0PtkD4= github.com/ohler55/ojg v1.20.3/go.mod h1:uHcD1ErbErC27Zhb5Df2jUjbseLLcmOCo6oxSr3jZxo= -github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= -github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= -github.com/onsi/gomega v1.27.3 h1:5VwIwnBY3vbBDOJrNtA4rVdiTZCsq9B5F12pvy1Drmk= -github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/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-20210330210617-4fbd30eecc44/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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -278,97 +210,73 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm 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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/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= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= -k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= -k8s.io/apiextensions-apiserver v0.26.2 h1:/yTG2B9jGY2Q70iGskMf41qTLhL9XeNN2KhI0uDgwko= -k8s.io/apiextensions-apiserver v0.26.2/go.mod h1:Y7UPgch8nph8mGCuVk0SK83LnS8Esf3n6fUBgew8SH8= -k8s.io/apimachinery v0.26.5 h1:hTQVhJao2piX7vSgCn4Lwd6E0o/+TJIH4NqRf+q4EmE= -k8s.io/apimachinery v0.26.5/go.mod h1:HUvk6wrOP4v22AIYqeCGSQ6xWCHo41J9d6psb3temAg= -k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= -k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= -k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= -k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= -k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= -k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 h1:xMMXJlJbsU8w3V5N2FLDQ8YgU8s1EoULdbQBcAeNJkY= -k8s.io/utils v0.0.0-20230313181309-38a27ef9d749/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= -sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= +k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= +k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= +k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= +k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= +k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= +sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -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/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/reconcilers/marin3r/envoyconfig/reconcile_revisions_test.go b/pkg/reconcilers/marin3r/envoyconfig/reconcile_revisions_test.go index e02cde19..e1c27a4d 100644 --- a/pkg/reconcilers/marin3r/envoyconfig/reconcile_revisions_test.go +++ b/pkg/reconcilers/marin3r/envoyconfig/reconcile_revisions_test.go @@ -33,8 +33,10 @@ func init() { ) } -func testRevisionReconcilerBuilder(s *runtime.Scheme, instance *marin3rv1alpha1.EnvoyConfig, objs ...runtime.Object) RevisionReconciler { - return RevisionReconciler{context.TODO(), ctrl.Log.WithName("test"), fake.NewFakeClientWithScheme(s, objs...), s, instance, nil, nil, nil, nil} +func testRevisionReconcilerBuilder(s *runtime.Scheme, instance *marin3rv1alpha1.EnvoyConfig, objs ...client.Object) RevisionReconciler { + return RevisionReconciler{context.TODO(), ctrl.Log.WithName("test"), + fake.NewClientBuilder().WithScheme(s).WithObjects(objs...).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfig{}).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), + s, instance, nil, nil, nil, nil} } func TestNewRevisionReconciler(t *testing.T) { @@ -370,7 +372,7 @@ func TestRevisionReconciler_Reconcile(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, ec: &marin3rv1alpha1.EnvoyConfig{ TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfig", APIVersion: "v1alpha1"}, @@ -389,7 +391,7 @@ func TestRevisionReconciler_Reconcile(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfigRevision", APIVersion: "v1alpha1"}, ObjectMeta: metav1.ObjectMeta{ @@ -414,7 +416,10 @@ func TestRevisionReconciler_Reconcile(t *testing.T) { }, Spec: marin3rv1alpha1.EnvoyConfigRevisionSpec{}, }, - ), + ). + WithStatusSubresource(&marin3rv1alpha1.EnvoyConfig{}). + WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}). + Build(), scheme: s, ec: &marin3rv1alpha1.EnvoyConfig{ TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfig", APIVersion: "v1alpha1"}, @@ -434,7 +439,7 @@ func TestRevisionReconciler_Reconcile(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfigRevision", APIVersion: "v1alpha1"}, ObjectMeta: metav1.ObjectMeta{ @@ -447,7 +452,10 @@ func TestRevisionReconciler_Reconcile(t *testing.T) { }, Spec: marin3rv1alpha1.EnvoyConfigRevisionSpec{}, }, - ), + ). + WithStatusSubresource(&marin3rv1alpha1.EnvoyConfig{}). + WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}). + Build(), scheme: s, ec: &marin3rv1alpha1.EnvoyConfig{ TypeMeta: metav1.TypeMeta{Kind: "EnvoyConfig", APIVersion: "v1alpha1"}, diff --git a/pkg/reconcilers/marin3r/envoyconfig/revisions/crud_test.go b/pkg/reconcilers/marin3r/envoyconfig/revisions/crud_test.go index 7f72cb57..7063ff1c 100644 --- a/pkg/reconcilers/marin3r/envoyconfig/revisions/crud_test.go +++ b/pkg/reconcilers/marin3r/envoyconfig/revisions/crud_test.go @@ -33,7 +33,7 @@ func TestListRevisions(t *testing.T) { }{ { "Returns all EnvoyConfigRevisions for the nodeID", - fake.NewFakeClientWithScheme(s, + fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ Name: "ecr1", Namespace: "test", @@ -49,7 +49,7 @@ func TestListRevisions(t *testing.T) { Namespace: "test", Labels: map[string]string{filters.NodeIDTag: "other"}, }}, - ), + ).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test")}, 2, @@ -57,7 +57,7 @@ func TestListRevisions(t *testing.T) { }, { "Returns all EnvoyConfigRevisions for the nodeID and version", - fake.NewFakeClientWithScheme(s, + fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ Name: "ecr1", Namespace: "test", @@ -73,7 +73,7 @@ func TestListRevisions(t *testing.T) { Namespace: "test", Labels: map[string]string{filters.NodeIDTag: "test", filters.VersionTag: "3"}, }}, - ), + ).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test"), filters.ByVersion("1")}, 1, @@ -81,7 +81,7 @@ func TestListRevisions(t *testing.T) { }, { "Only returns revisions in the same Namespace", - fake.NewFakeClientWithScheme(s, + fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ Name: "ecr", Namespace: "test", @@ -92,7 +92,7 @@ func TestListRevisions(t *testing.T) { Namespace: "other", Labels: map[string]string{filters.NodeIDTag: "test"}, }}, - ), + ).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test")}, 1, @@ -100,7 +100,7 @@ func TestListRevisions(t *testing.T) { }, { "Returns an error if no revisions are found that match the provided filters", - fake.NewFakeClientWithScheme(s), + fake.NewClientBuilder().WithScheme(s).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test")}, 0, @@ -132,7 +132,7 @@ func TestGetRevision(t *testing.T) { }{ { "Returns all the EnvoyConfigRevisions that match the given filters", - fake.NewFakeClientWithScheme(s, + fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ Name: "ecr1", Namespace: "test", @@ -148,7 +148,7 @@ func TestGetRevision(t *testing.T) { Namespace: "test", Labels: map[string]string{filters.NodeIDTag: "test", filters.VersionTag: "3"}, }}, - ), + ).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test"), filters.ByVersion("1")}, &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ @@ -160,7 +160,7 @@ func TestGetRevision(t *testing.T) { }, { "Returns an error if API returns more than one EnvoyConfigRevision", - fake.NewFakeClientWithScheme(s, + fake.NewClientBuilder().WithScheme(s).WithObjects( &marin3rv1alpha1.EnvoyConfigRevision{ObjectMeta: metav1.ObjectMeta{ Name: "ecr1", Namespace: "test", @@ -176,7 +176,7 @@ func TestGetRevision(t *testing.T) { Namespace: "test", Labels: map[string]string{filters.NodeIDTag: "test", filters.VersionTag: "3"}, }}, - ), + ).WithStatusSubresource(&marin3rv1alpha1.EnvoyConfigRevision{}).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test"), filters.ByVersion("1")}, nil, @@ -184,7 +184,7 @@ func TestGetRevision(t *testing.T) { }, { "Returns an error if API returns no EnvoyConfigRevision", - fake.NewFakeClientWithScheme(s), + fake.NewClientBuilder().WithScheme(s).Build(), "test", []filters.RevisionFilter{filters.ByNodeID("test"), filters.ByVersion("1")}, nil, diff --git a/pkg/reconcilers/operator/discoveryservicecertificate/providers/marin3r/crud_test.go b/pkg/reconcilers/operator/discoveryservicecertificate/providers/marin3r/crud_test.go index 7e52a60d..ddbbc80e 100644 --- a/pkg/reconcilers/operator/discoveryservicecertificate/providers/marin3r/crud_test.go +++ b/pkg/reconcilers/operator/discoveryservicecertificate/providers/marin3r/crud_test.go @@ -46,14 +46,14 @@ func TestNewCertificateProvider(t *testing.T) { args: args{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, }, want: &CertificateProvider{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, }, @@ -86,7 +86,7 @@ func TestCertificateProvider_CreateCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -106,8 +106,8 @@ func TestCertificateProvider_CreateCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, &corev1. - Secret{ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}}), + client: fake.NewClientBuilder().WithScheme(s).WithObjects( + &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}}).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -159,13 +159,13 @@ func TestCertificateProvider_GetCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, &corev1. - Secret{ - ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}, - Data: map[string][]byte{ - tlsCertificateKey: []byte("xxxx"), - tlsPrivateKeyKey: []byte("xxxx"), - }}), + client: fake.NewClientBuilder().WithScheme(s).WithObjects( + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}, + Data: map[string][]byte{ + tlsCertificateKey: []byte("xxxx"), + tlsPrivateKeyKey: []byte("xxxx"), + }}).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -187,7 +187,7 @@ func TestCertificateProvider_GetCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -247,13 +247,13 @@ func TestCertificateProvider_UpdateCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, &corev1. - Secret{ - ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}, - Data: map[string][]byte{ - tlsCertificateKey: []byte("xxxx"), - tlsPrivateKeyKey: []byte("xxxx"), - }}), + client: fake.NewClientBuilder().WithScheme(s).WithObjects( + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}, + Data: map[string][]byte{ + tlsCertificateKey: []byte("xxxx"), + tlsPrivateKeyKey: []byte("xxxx"), + }}).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -273,7 +273,7 @@ func TestCertificateProvider_UpdateCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -324,7 +324,7 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{Name: "issuer", Namespace: "test"}, Data: map[string][]byte{ @@ -337,7 +337,7 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { tlsCertificateKey: test.TestValidCertificate(), tlsPrivateKeyKey: []byte("xxxx"), }}, - ), + ).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -356,7 +356,7 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{Name: "issuer", Namespace: "test"}, Data: map[string][]byte{ @@ -369,7 +369,7 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { tlsCertificateKey: test.TestExpiredCertificate(), tlsPrivateKeyKey: []byte("xxxx"), }}, - ), + ).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -388,14 +388,14 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{Name: "issuer", Namespace: "test"}, Data: map[string][]byte{ tlsCertificateKey: test.TestIssuerCertificate(), tlsPrivateKeyKey: test.TestIssuerKey(), }}, - ), + ).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -414,14 +414,14 @@ func TestCertificateProvider_VerifyCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, + client: fake.NewClientBuilder().WithScheme(s).WithObjects( &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{Name: "secret", Namespace: "test"}, Data: map[string][]byte{ tlsCertificateKey: test.TestExpiredCertificate(), tlsPrivateKeyKey: []byte("xxxx"), }}, - ), + ).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -472,15 +472,15 @@ func TestCertificateProvider_getIssuerCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s, &corev1. - Secret{ - ObjectMeta: metav1.ObjectMeta{Name: "issuer", Namespace: "test"}, - Type: corev1.SecretTypeTLS, - Data: map[string][]byte{ - tlsCertificateKey: test.TestIssuerCertificate(), - tlsPrivateKeyKey: test.TestIssuerKey(), - }, - }), + client: fake.NewClientBuilder().WithScheme(s).WithObjects( + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "issuer", Namespace: "test"}, + Type: corev1.SecretTypeTLS, + Data: map[string][]byte{ + tlsCertificateKey: test.TestIssuerCertificate(), + tlsPrivateKeyKey: test.TestIssuerKey(), + }, + }).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -510,7 +510,7 @@ func TestCertificateProvider_getIssuerCertificate(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -577,7 +577,7 @@ func TestCertificateProvider_genSecret(t *testing.T) { fields: fields{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ Spec: operatorv1alpha1.DiscoveryServiceCertificateSpec{ diff --git a/pkg/reconcilers/operator/discoveryservicecertificate/reconcile_certificate_test.go b/pkg/reconcilers/operator/discoveryservicecertificate/reconcile_certificate_test.go index ac3090d4..b5edebd0 100644 --- a/pkg/reconcilers/operator/discoveryservicecertificate/reconcile_certificate_test.go +++ b/pkg/reconcilers/operator/discoveryservicecertificate/reconcile_certificate_test.go @@ -101,7 +101,7 @@ func TestNewCertificateReconciler(t *testing.T) { args: args{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), s: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, provider: &testCertificateProvider{}, @@ -109,7 +109,7 @@ func TestNewCertificateReconciler(t *testing.T) { want: CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, provider: &testCertificateProvider{}, @@ -139,7 +139,7 @@ func TestCertificateReconciler_IsReady(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, ready: true, @@ -166,7 +166,7 @@ func TestCertificateReconciler_GetCertificateHash(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{}, hash: "xxxx", @@ -199,7 +199,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -237,7 +237,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -276,7 +276,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -317,7 +317,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -358,7 +358,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, @@ -407,7 +407,7 @@ func TestCertificateReconciler_Reconcile(t *testing.T) { r: &CertificateReconciler{ ctx: context.TODO(), logger: ctrl.Log.WithName("test"), - client: fake.NewFakeClientWithScheme(s), + client: fake.NewClientBuilder().WithScheme(s).Build(), scheme: s, dsc: &operatorv1alpha1.DiscoveryServiceCertificate{ ObjectMeta: metav1.ObjectMeta{Name: "dsc", Namespace: "test"}, diff --git a/pkg/webhooks/podv1mutator/handle.go b/pkg/webhooks/podv1mutator/handle.go index 4cfb2776..9393d7d9 100644 --- a/pkg/webhooks/podv1mutator/handle.go +++ b/pkg/webhooks/podv1mutator/handle.go @@ -23,16 +23,19 @@ const ( // PodMutator injects envoy containers into Pods type PodMutator struct { Client client.Client - decoder *admission.Decoder + Decoder *admission.Decoder } +// PodMutator Iimplements admission.Handler. +var _ admission.Handler = &PodMutator{} + //+kubebuilder:webhook:path=/pod-v1-mutate,mutating=true,failurePolicy=fail,sideEffects=None,groups=core,resources=pods,verbs=create,versions=v1,name=sidecar-injector.marin3r.3scale.net,admissionReviewVersions=v1 // Handle injects an envoy container in every incoming Pod func (a *PodMutator) Handle(ctx context.Context, req admission.Request) admission.Response { pod := &corev1.Pod{} - err := a.decoder.Decode(req, pod) + err := a.Decoder.Decode(req, pod) if err != nil { return admission.Errored(http.StatusBadRequest, err) } @@ -77,6 +80,6 @@ func (a *PodMutator) Handle(ctx context.Context, req admission.Request) admissio // InjectDecoder injects the decoder. func (a *PodMutator) InjectDecoder(d *admission.Decoder) error { - a.decoder = d + a.Decoder = d return nil } diff --git a/pkg/webhooks/podv1mutator/handle_test.go b/pkg/webhooks/podv1mutator/handle_test.go index 9acc90e1..718b64a2 100644 --- a/pkg/webhooks/podv1mutator/handle_test.go +++ b/pkg/webhooks/podv1mutator/handle_test.go @@ -42,11 +42,8 @@ func TestPodMutator_Handle(t *testing.T) { fields: fields{ Client: fake.NewClientBuilder().WithScheme(scheme.Scheme).WithObjects( &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "instance", Namespace: "default"}}, - ).Build(), - decoder: func() *admission.Decoder { - d, _ := admission.NewDecoder(scheme.Scheme) - return d - }(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), + decoder: admission.NewDecoder(scheme.Scheme), }, args: args{ ctx: context.TODO(), @@ -96,7 +93,7 @@ func TestPodMutator_Handle(t *testing.T) { t.Run(tt.name, func(t *testing.T) { a := &PodMutator{ Client: tt.fields.Client, - decoder: tt.fields.decoder, + Decoder: tt.fields.decoder, } got := a.Handle(tt.args.ctx, tt.args.req) sort.SliceStable(got.Patches, func(i, j int) bool { @@ -135,10 +132,7 @@ func TestPodMutator_InjectDecoder(t *testing.T) { decoder: nil, }, args: args{ - d: func() *admission.Decoder { - d, _ := admission.NewDecoder(scheme.Scheme) - return d - }(), + d: admission.NewDecoder(scheme.Scheme), }, wantErr: false, }, @@ -147,7 +141,7 @@ func TestPodMutator_InjectDecoder(t *testing.T) { t.Run(tt.name, func(t *testing.T) { a := &PodMutator{ Client: tt.fields.Client, - decoder: tt.fields.decoder, + Decoder: tt.fields.decoder, } if err := a.InjectDecoder(tt.args.d); (err != nil) != tt.wantErr { t.Errorf("PodMutator.InjectDecoder() error = %v, wantErr %v", err, tt.wantErr) diff --git a/pkg/webhooks/podv1mutator/sidecar_test.go b/pkg/webhooks/podv1mutator/sidecar_test.go index f6bb2ec9..67b9db20 100644 --- a/pkg/webhooks/podv1mutator/sidecar_test.go +++ b/pkg/webhooks/podv1mutator/sidecar_test.go @@ -47,7 +47,7 @@ func Test_envoySidecarConfig_PopulateFromAnnotation(t *testing.T) { ctx: context.TODO(), clnt: fake.NewClientBuilder().WithScheme(scheme.Scheme).WithObjects( &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "ds", Namespace: "test"}}, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{ "marin3r.3scale.net/node-id": "node-id", @@ -110,7 +110,7 @@ func Test_envoySidecarConfig_PopulateFromAnnotation(t *testing.T) { ctx: context.TODO(), clnt: fake.NewClientBuilder().WithObjects( &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "ds", Namespace: "test"}}, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{ "marin3r.3scale.net/node-id": "node-id", @@ -154,7 +154,7 @@ func Test_envoySidecarConfig_PopulateFromAnnotation(t *testing.T) { ctx: context.TODO(), clnt: fake.NewClientBuilder().WithObjects( &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "ds", Namespace: "test"}}, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{ "marin3r.3scale.net/node-id": "node-id", @@ -830,7 +830,7 @@ func Test_envoySidecarConfig_GetDiscoveryServiceAddress(t *testing.T) { }, }, }, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{ "marin3r.3scale.net/discovery-service.name": "ds", @@ -854,7 +854,7 @@ func Test_envoySidecarConfig_GetDiscoveryServiceAddress(t *testing.T) { }, }, }, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{}, }, @@ -883,7 +883,7 @@ func Test_envoySidecarConfig_GetDiscoveryServiceAddress(t *testing.T) { clnt: fake.NewClientBuilder().WithScheme(scheme.Scheme).WithObjects( &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "ds", Namespace: "test"}}, &operatorv1alpha1.DiscoveryService{ObjectMeta: metav1.ObjectMeta{Name: "other", Namespace: "test"}}, - ).Build(), + ).WithStatusSubresource(&operatorv1alpha1.DiscoveryService{}).Build(), namespace: "test", annotations: map[string]string{}, }, diff --git a/test/e2e/marin3r/suite_test.go b/test/e2e/marin3r/suite_test.go index ffbfe1bf..2302eee0 100644 --- a/test/e2e/marin3r/suite_test.go +++ b/test/e2e/marin3r/suite_test.go @@ -29,9 +29,10 @@ import ( . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" - ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" ) const ( @@ -61,7 +62,8 @@ func TestAPIs(t *testing.T) { var _ = BeforeSuite(func() { - logger = ctrl.Log.WithName("e2e") + logger := zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)) + logf.SetLogger(logger) seed := time.Now().UTC().UnixNano() nameGenerator = namegenerator.NewNameGenerator(seed) From d318db8f94ed2b7741a1cc2040822636670bef80 Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Thu, 21 Mar 2024 16:47:29 +0100 Subject: [PATCH 2/2] Bump alpha release --- .gitattributes | 2 + Makefile | 2 +- bundle.Dockerfile | 3 +- .../marin3r.clusterserviceversion.yaml | 10 +- ....marin3r.3scale.net_discoveryservices.yaml | 6 +- ...r.marin3r.3scale.net_envoydeployments.yaml | 195 ++++++++++++++++-- bundle/metadata/annotations.yaml | 3 +- config/manager/kustomization.yaml | 2 +- config/webhook/kustomization.yaml | 2 +- go.mod | 2 +- go.sum | 4 +- pkg/image/zz_generated.go | 2 +- pkg/version/zz_generated.go | 2 +- 13 files changed, 197 insertions(+), 38 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ec6a0371 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +bundle/** linguist-generated=true +bundle.Dockerfile linguist-generated=true diff --git a/Makefile b/Makefile index 76672889..7319ba22 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.12.3 +VERSION ?= 0.13.0-alpha.1 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") diff --git a/bundle.Dockerfile b/bundle.Dockerfile index be6900b1..60bde73e 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,8 +5,7 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=marin3r -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable -LABEL operators.operatorframework.io.bundle.channel.default.v1=stable +LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/marin3r.clusterserviceversion.yaml b/bundle/manifests/marin3r.clusterserviceversion.yaml index 7cb10f41..8a68cb7c 100644 --- a/bundle/manifests/marin3r.clusterserviceversion.yaml +++ b/bundle/manifests/marin3r.clusterserviceversion.yaml @@ -173,14 +173,14 @@ metadata: categories: Networking certified: "false" containerImage: quay.io/3scale/marin3r - createdAt: "2023-10-13T11:23:52Z" + createdAt: "2024-03-21T15:45:14Z" description: Lighweight, CRD based Envoy control plane for Kubernetes operators.operatorframework.io/builder: operator-sdk-v1.28.0 operators.operatorframework.io/internal-objects: '["envoyconfigrevisions.marin3r.3scale.net","discoveryservicecertificates.operator.marin3r.3scale.net"]' operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale-ops/marin3r support: Red Hat, Inc. - name: marin3r.v0.12.3 + name: marin3r.v0.13.0-alpha.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -919,7 +919,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/marin3r:v0.12.3 + image: quay.io/3scale/marin3r:v0.13.0-alpha.1 livenessProbe: httpGet: path: /healthz @@ -977,7 +977,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/marin3r:v0.12.3 + image: quay.io/3scale/marin3r:v0.13.0-alpha.1 livenessProbe: httpGet: path: /healthz @@ -1284,7 +1284,7 @@ spec: maturity: alpha provider: name: Red Hat - version: 0.12.3 + version: 0.13.0-alpha.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/manifests/operator.marin3r.3scale.net_discoveryservices.yaml b/bundle/manifests/operator.marin3r.3scale.net_discoveryservices.yaml index f00b9530..3e40550f 100644 --- a/bundle/manifests/operator.marin3r.3scale.net_discoveryservices.yaml +++ b/bundle/manifests/operator.marin3r.3scale.net_discoveryservices.yaml @@ -100,7 +100,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -136,7 +137,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceConfig: diff --git a/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml b/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml index 450bd529..f9e8cacc 100644 --- a/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml +++ b/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml @@ -279,7 +279,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -329,6 +330,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -439,7 +478,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -485,6 +525,43 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -588,7 +665,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -638,6 +716,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -748,7 +864,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -794,6 +911,43 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1048,18 +1202,18 @@ spec: which must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -1077,7 +1231,7 @@ spec: Max is used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than @@ -1105,18 +1259,18 @@ spec: which must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -1134,7 +1288,7 @@ spec: Max is used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than @@ -1357,15 +1511,16 @@ spec: of a object,such as kind,name apiVersion properties: apiVersion: - description: API version of the referent + description: apiVersion is the API version of + the referent type: string kind: - description: 'Kind of the referent; More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'kind is the kind of the referent; + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: - description: 'Name of the referent; More info: - http://kubernetes.io/docs/user-guide/identifiers#names' + description: 'name is the name of the referent; + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string required: - kind @@ -1688,7 +1843,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1724,7 +1880,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object shutdownManager: diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index dac1dc44..ae75f6eb 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,8 +4,7 @@ annotations: operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: marin3r - operators.operatorframework.io.bundle.channels.v1: alpha,stable - operators.operatorframework.io.bundle.channel.default.v1: stable + operators.operatorframework.io.bundle.channels.v1: alpha operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8f896e2f..0a38a50f 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,7 +13,7 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/marin3r - newTag: v0.12.3 + newTag: v0.13.0-alpha.1 patchesStrategicMerge: - custom/manager_patch.yaml diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml index a064f642..22a5c77a 100644 --- a/config/webhook/kustomization.yaml +++ b/config/webhook/kustomization.yaml @@ -10,7 +10,7 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/marin3r - newTag: v0.12.3 + newTag: v0.13.0-alpha.1 # [CUSTOM: pod mutating webhook config] This patch adds a label selector to the MutatingWebhookConfig patchesStrategicMerge: diff --git a/go.mod b/go.mod index 0b209d29..e2aafd8f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/3scale-ops/marin3r go 1.20 require ( - github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608 + github.com/3scale-ops/basereconciler v0.5.1 github.com/MakeNowJust/heredoc v1.0.0 github.com/davecgh/go-spew v1.1.1 github.com/envoyproxy/go-control-plane v0.12.0 diff --git a/go.sum b/go.sum index 5f16d7db..ed4186a7 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608 h1:p38EEPFlvAk4ALwln4ujq8SEhNXc4mMELegKy14JJX0= -github.com/3scale-ops/basereconciler v0.0.0-20240315170512-e51bc0f8a608/go.mod h1:bLk2Jn6trasK88DBCAROnVs67wXP3/qxfY3AGbohHhw= +github.com/3scale-ops/basereconciler v0.5.1 h1:0CaK3CyBAbO+HzrxnEQWIiKurvXebXjflqQNiv8iSfY= +github.com/3scale-ops/basereconciler v0.5.1/go.mod h1:bLk2Jn6trasK88DBCAROnVs67wXP3/qxfY3AGbohHhw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= diff --git a/pkg/image/zz_generated.go b/pkg/image/zz_generated.go index d3e97a44..3cbb1d5c 100644 --- a/pkg/image/zz_generated.go +++ b/pkg/image/zz_generated.go @@ -1,5 +1,5 @@ package image const ( - image string = "quay.io/3scale/marin3r:v0.12.3" + image string = "quay.io/3scale/marin3r:v0.13.0-alpha.1" ) diff --git a/pkg/version/zz_generated.go b/pkg/version/zz_generated.go index c671f8ad..83dc3824 100644 --- a/pkg/version/zz_generated.go +++ b/pkg/version/zz_generated.go @@ -1,5 +1,5 @@ package version const ( - version string = "v0.12.3" + version string = "v0.13.0-alpha.1" )