From 03e41601c85962bfaf24eaf3a0712502364fbfac Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 24 Apr 2023 10:56:27 +0200 Subject: [PATCH 01/19] added interface for resource retrieval Signed-off-by: Florian Bacher --- .../keptnwebhookcertificate_controller.go | 27 +++++++++++++++++++ .../resource_retriever.go | 11 ++++++++ 2 files changed, 38 insertions(+) create mode 100644 klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index 1ba14be41e..5bad143552 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -20,6 +20,33 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" ) +type ObservedObjects struct { + MutatingWebhooks []string + ValidatingWebhooks []string + CustomResourceDefinitions []string +} + +type CertificateReconcilerConfig struct { + WatchResources *ObservedObjects + MatchLabels labels.Set + Namespace string + Log logr.Logger + Client client.Client + Scheme *runtime.Scheme + CancelMgrFunc context.CancelFunc +} + +func NewKeptnWebhookCertificateReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateReconciler { + return &KeptnWebhookCertificateReconciler{ + Client: config.Client, + Scheme: config.Scheme, + CancelMgrFunc: config.CancelMgrFunc, + Log: config.Log, + Namespace: config.Namespace, + MatchLabels: config.MatchLabels, + } +} + // KeptnWebhookCertificateReconciler reconciles a KeptnWebhookCertificate object type KeptnWebhookCertificateReconciler struct { Client client.Client diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go new file mode 100644 index 0000000000..59111c00f7 --- /dev/null +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go @@ -0,0 +1,11 @@ +package keptnwebhookcontroller + +import ( + "context" +) + +type IResourceRetriever interface { + GetMutatingWebhooks(ctx context.Context) + GetValidatingWebhooks(ctx context.Context) + GetCRDs(ctx context.Context) +} From d8dbd8801d7dc6588cdd4b3122c98a2f01384ca4 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 24 Apr 2023 12:25:20 +0200 Subject: [PATCH 02/19] added implementation for resource retriever Signed-off-by: Florian Bacher --- .../resource_retriever.go | 87 ++++++++++++++++++- 1 file changed, 84 insertions(+), 3 deletions(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go index 59111c00f7..49647dabfd 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go @@ -2,10 +2,91 @@ package keptnwebhookcontroller import ( "context" + "github.com/go-logr/logr" + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + apiv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" ) type IResourceRetriever interface { - GetMutatingWebhooks(ctx context.Context) - GetValidatingWebhooks(ctx context.Context) - GetCRDs(ctx context.Context) + GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error) + GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error) + GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error) +} + +type LabelSelectorRetriever struct { + MatchLabels labels.Set + Client client.Client +} + +func (r LabelSelectorRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error) { + var mutatingWebhooks admissionregistrationv1.MutatingWebhookConfigurationList + + if err := r.Client.List(ctx, &mutatingWebhooks, client.MatchingLabels(r.MatchLabels)); err != nil { + return nil, err + } + return &mutatingWebhooks, nil +} + +func (r LabelSelectorRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error) { + var validatingWebhooks admissionregistrationv1.ValidatingWebhookConfigurationList + + if err := r.Client.List(ctx, &validatingWebhooks, client.MatchingLabels(r.MatchLabels)); err != nil { + return nil, err + } + return &validatingWebhooks, nil +} + +func (r LabelSelectorRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error) { + var crds apiv1.CustomResourceDefinitionList + opt := client.MatchingLabels(r.MatchLabels) + if err := r.Client.List(ctx, &crds, opt); err != nil { + return nil, err + } + + return &crds, nil +} + +type ResourceNameRetriever struct { + Client client.Client + WatchResources ObservedObjects + Log logr.Logger +} + +func (r ResourceNameRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error) { + result := &admissionregistrationv1.MutatingWebhookConfigurationList{ + Items: make([]admissionregistrationv1.MutatingWebhookConfiguration, len(r.WatchResources.MutatingWebhooks)), + } + for _, mwhName := range r.WatchResources.MutatingWebhooks { + mwh := &admissionregistrationv1.MutatingWebhookConfiguration{} + if err := r.Client.Get(ctx, client.ObjectKey{Name: mwhName}, mwh); err != nil { + r.Log.Error(err, "Could not retrieve MutatingWebhookConfiguration", "MutatingWebhookConfiguration", mwhName) + } else { + result.Items = append(result.Items, *mwh) + } + } + + return result, nil +} + +func (r ResourceNameRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error) { + result := &admissionregistrationv1.ValidatingWebhookConfigurationList{ + Items: make([]admissionregistrationv1.ValidatingWebhookConfiguration, len(r.WatchResources.ValidatingWebhooks)), + } + for _, vwhName := range r.WatchResources.ValidatingWebhooks { + vwh := &admissionregistrationv1.ValidatingWebhookConfiguration{} + if err := r.Client.Get(ctx, client.ObjectKey{Name: vwhName}, vwh); err != nil { + r.Log.Error(err, "Could not retrieve ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", vwhName) + } else { + result.Items = append(result.Items, *vwh) + } + } + + return result, nil +} + +func (r ResourceNameRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error) { + //TODO implement me + panic("implement me") } From 670f0808d3ab250e185f5f1b4f803b05feb3f26a Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 24 Apr 2023 15:33:39 +0200 Subject: [PATCH 03/19] implementation of resource name and label selector retrievers Signed-off-by: Florian Bacher --- .../keptnwebhookcertificate_controller.go | 26 +- .../resource_retriever.go | 33 +- .../resource_retriever_test.go | 456 ++++++++++++++++++ 3 files changed, 499 insertions(+), 16 deletions(-) create mode 100644 klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index 5bad143552..82f30065dd 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -38,23 +38,25 @@ type CertificateReconcilerConfig struct { func NewKeptnWebhookCertificateReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateReconciler { return &KeptnWebhookCertificateReconciler{ - Client: config.Client, - Scheme: config.Scheme, - CancelMgrFunc: config.CancelMgrFunc, - Log: config.Log, - Namespace: config.Namespace, - MatchLabels: config.MatchLabels, + Client: config.Client, + Scheme: config.Scheme, + CancelMgrFunc: config.CancelMgrFunc, + Log: config.Log, + Namespace: config.Namespace, + MatchLabels: config.MatchLabels, + ResourceRetriever: NewResourceRetriever(config), } } // KeptnWebhookCertificateReconciler reconciles a KeptnWebhookCertificate object type KeptnWebhookCertificateReconciler struct { - Client client.Client - Scheme *runtime.Scheme - CancelMgrFunc context.CancelFunc - Log logr.Logger - Namespace string - MatchLabels labels.Set + Client client.Client + Scheme *runtime.Scheme + CancelMgrFunc context.CancelFunc + Log logr.Logger + Namespace string + MatchLabels labels.Set + ResourceRetriever IResourceRetriever } //clusterrole diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go index 49647dabfd..36042210fd 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go @@ -15,6 +15,20 @@ type IResourceRetriever interface { GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error) } +func NewResourceRetriever(config CertificateReconcilerConfig) IResourceRetriever { + if config.WatchResources != nil { + return &ResourceNameRetriever{ + Client: config.Client, + WatchResources: *config.WatchResources, + Log: config.Log, + } + } + return &LabelSelectorRetriever{ + MatchLabels: config.MatchLabels, + Client: config.Client, + } +} + type LabelSelectorRetriever struct { MatchLabels labels.Set Client client.Client @@ -56,7 +70,7 @@ type ResourceNameRetriever struct { func (r ResourceNameRetriever) GetMutatingWebhooks(ctx context.Context) (*admissionregistrationv1.MutatingWebhookConfigurationList, error) { result := &admissionregistrationv1.MutatingWebhookConfigurationList{ - Items: make([]admissionregistrationv1.MutatingWebhookConfiguration, len(r.WatchResources.MutatingWebhooks)), + Items: []admissionregistrationv1.MutatingWebhookConfiguration{}, } for _, mwhName := range r.WatchResources.MutatingWebhooks { mwh := &admissionregistrationv1.MutatingWebhookConfiguration{} @@ -72,7 +86,7 @@ func (r ResourceNameRetriever) GetMutatingWebhooks(ctx context.Context) (*admiss func (r ResourceNameRetriever) GetValidatingWebhooks(ctx context.Context) (*admissionregistrationv1.ValidatingWebhookConfigurationList, error) { result := &admissionregistrationv1.ValidatingWebhookConfigurationList{ - Items: make([]admissionregistrationv1.ValidatingWebhookConfiguration, len(r.WatchResources.ValidatingWebhooks)), + Items: []admissionregistrationv1.ValidatingWebhookConfiguration{}, } for _, vwhName := range r.WatchResources.ValidatingWebhooks { vwh := &admissionregistrationv1.ValidatingWebhookConfiguration{} @@ -87,6 +101,17 @@ func (r ResourceNameRetriever) GetValidatingWebhooks(ctx context.Context) (*admi } func (r ResourceNameRetriever) GetCRDs(ctx context.Context) (*apiv1.CustomResourceDefinitionList, error) { - //TODO implement me - panic("implement me") + result := &apiv1.CustomResourceDefinitionList{ + Items: []apiv1.CustomResourceDefinition{}, + } + for _, crdName := range r.WatchResources.CustomResourceDefinitions { + crd := &apiv1.CustomResourceDefinition{} + if err := r.Client.Get(ctx, client.ObjectKey{Name: crdName}, crd); err != nil { + r.Log.Error(err, "Could not retrieve ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", crdName) + } else { + result.Items = append(result.Items, *crd) + } + } + + return result, nil } diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go new file mode 100644 index 0000000000..d0a5e30f49 --- /dev/null +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go @@ -0,0 +1,456 @@ +package keptnwebhookcontroller + +import ( + "context" + "github.com/go-logr/logr/testr" + "github.com/stretchr/testify/require" + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + apiv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "testing" +) + +func TestLabelSelectorRetriever_GetCRDs(t *testing.T) { + crd1 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + crd2 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + scheme := runtime.NewScheme() + apiv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + crds, err := retriever.GetCRDs(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, crds) + require.Len(t, crds.Items, 1) + require.Equal(t, "crd1", crds.Items[0].Name) +} + +func TestLabelSelectorRetriever_GetCRDs_ReturnEmptyListIfNothingMatches(t *testing.T) { + crd1 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd1", + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + scheme := runtime.NewScheme() + apiv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + crds, err := retriever.GetCRDs(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, crds) + require.Empty(t, crds.Items) +} + +func TestLabelSelectorRetriever_GetMutatingWebhooks(t *testing.T) { + mwh1 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + } + mwh2 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + mwhs, err := retriever.GetMutatingWebhooks(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, mwhs) + require.Len(t, mwhs.Items, 1) + require.Equal(t, "mwh1", mwhs.Items[0].Name) +} + +func TestLabelSelectorRetriever_GetMutatingWebhook_ReturnEmptyListIfNothingMatches(t *testing.T) { + mwh1 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh1", + }, + } + + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + mwhs, err := retriever.GetMutatingWebhooks(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, mwhs) + require.Empty(t, mwhs.Items) +} + +func TestLabelSelectorRetriever_GetValidatingWebhooks(t *testing.T) { + vwh1 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + } + vwh2 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1, vwh2).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + vwhs, err := retriever.GetValidatingWebhooks(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, vwhs) + require.Len(t, vwhs.Items, 1) + require.Equal(t, "vwh1", vwhs.Items[0].Name) +} + +func TestLabelSelectorRetriever_GetValidatingWebhook_ReturnEmptyListIfNothingMatches(t *testing.T) { + vwh1 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh1", + }, + } + + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1).Build() + + retriever := &LabelSelectorRetriever{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + Client: fakeClient, + } + + vwhs, err := retriever.GetValidatingWebhooks(context.Background()) + + require.Nil(t, err) + + require.NotNil(t, vwhs) + require.Empty(t, vwhs.Items) +} + +func TestNewResourceRetriever(t *testing.T) { + type args struct { + config CertificateReconcilerConfig + } + tests := []struct { + name string + args args + want IResourceRetriever + }{ + { + name: "label selector retriever", + args: args{ + config: CertificateReconcilerConfig{ + WatchResources: nil, + MatchLabels: nil, + }, + }, + want: &LabelSelectorRetriever{}, + }, + { + name: "resource name retriever", + args: args{ + config: CertificateReconcilerConfig{ + WatchResources: &ObservedObjects{}, + MatchLabels: nil, + }, + }, + want: &ResourceNameRetriever{}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + retriever := NewResourceRetriever(tt.args.config) + require.IsType(t, tt.want, retriever) + }) + } +} + +func TestResourceNameRetriever_GetCRDs(t *testing.T) { + crd1 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + crd2 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + scheme := runtime.NewScheme() + apiv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + CustomResourceDefinitions: []string{"crd1", "crd2"}, + }, + Log: testr.New(t), + } + + crds, err := retriever.GetCRDs(context.TODO()) + + require.Nil(t, err) + + require.Len(t, crds.Items, 2) +} + +func TestResourceNameRetriever_GetCRDs_ContinueIfOneNotFound(t *testing.T) { + crd1 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + crd2 := &apiv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "crd2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + Spec: apiv1.CustomResourceDefinitionSpec{}, + } + scheme := runtime.NewScheme() + apiv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + CustomResourceDefinitions: []string{"crdx", "crd2"}, + }, + Log: testr.New(t), + } + + crds, err := retriever.GetCRDs(context.TODO()) + + require.Nil(t, err) + + require.Len(t, crds.Items, 1) +} + +func TestResourceNameRetriever_GetMutatingWebhooks(t *testing.T) { + mwh1 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh1", + }, + } + mwh2 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh2", + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + MutatingWebhooks: []string{"mwh1", "mwh2"}, + }, + Log: testr.New(t), + } + + mwhs, err := retriever.GetMutatingWebhooks(context.TODO()) + + require.Nil(t, err) + + require.Len(t, mwhs.Items, 2) +} + +func TestResourceNameRetriever_GetMutatingWebhooks_ContinueIfOneNotFound(t *testing.T) { + mwh1 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh1", + Labels: map[string]string{ + "foo": "bar", + }, + }, + } + mwh2 := &admissionregistrationv1.MutatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "mwh2", + Labels: map[string]string{ + "foo": "foo", + }, + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + MutatingWebhooks: []string{"mwhx", "mwh2"}, + }, + Log: testr.New(t), + } + + mwhs, err := retriever.GetMutatingWebhooks(context.TODO()) + + require.Nil(t, err) + + require.Len(t, mwhs.Items, 1) +} + +func TestResourceNameRetriever_GetValidatingWebhooks(t *testing.T) { + vwh1 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh1", + }, + } + vwh2 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh2", + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1, vwh2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + ValidatingWebhooks: []string{"vwh1", "vwh2"}, + }, + Log: testr.New(t), + } + + vwhs, err := retriever.GetValidatingWebhooks(context.TODO()) + + require.Nil(t, err) + + require.Len(t, vwhs.Items, 2) +} + +func TestResourceNameRetriever_GetValidatingWebhooks_ContinueIfOneNotFound(t *testing.T) { + mwh1 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh1", + }, + } + mwh2 := &admissionregistrationv1.ValidatingWebhookConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vwh2", + }, + } + scheme := runtime.NewScheme() + admissionregistrationv1.AddToScheme(scheme) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() + + retriever := &ResourceNameRetriever{ + Client: fakeClient, + WatchResources: ObservedObjects{ + ValidatingWebhooks: []string{"vwhx", "vwh2"}, + }, + Log: testr.New(t), + } + + vwhs, err := retriever.GetValidatingWebhooks(context.TODO()) + + require.Nil(t, err) + + require.Len(t, vwhs.Items, 1) +} From 6b776d724a54c3dd98810f557dffe03c7b254e8d Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 24 Apr 2023 15:38:54 +0200 Subject: [PATCH 04/19] make use of new retriever interface in certificate controller Signed-off-by: Florian Bacher --- .../keptnwebhookcertificate_controller.go | 39 ++----------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index 82f30065dd..bd22ba63a8 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -36,7 +36,7 @@ type CertificateReconcilerConfig struct { CancelMgrFunc context.CancelFunc } -func NewKeptnWebhookCertificateReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateReconciler { +func NewReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateReconciler { return &KeptnWebhookCertificateReconciler{ Client: config.Client, Scheme: config.Scheme, @@ -76,17 +76,17 @@ func (r *KeptnWebhookCertificateReconciler) Reconcile(ctx context.Context, reque r.Log.Info("reconciling webhook certificates", "namespace", request.Namespace, "name", request.Name) - mutatingWebhookConfigurations, err := r.getMutatingWebhookConfigurations(ctx) + mutatingWebhookConfigurations, err := r.ResourceRetriever.GetMutatingWebhooks(ctx) if err != nil { r.Log.Error(err, "could not find mutating webhook configuration") } - validatingWebhookConfigurations, err := r.getValidatingWebhookConfigurations(ctx) + validatingWebhookConfigurations, err := r.ResourceRetriever.GetValidatingWebhooks(ctx) if err != nil { r.Log.Error(err, "could not find validating webhook configuration") } - crds, err := r.getCRDConfigurations(ctx) + crds, err := r.ResourceRetriever.GetCRDs(ctx) if err != nil { r.Log.Error(err, "could not find CRDs") } @@ -183,26 +183,6 @@ func (r *KeptnWebhookCertificateReconciler) cancelMgr() { } } -func (r *KeptnWebhookCertificateReconciler) getMutatingWebhookConfigurations(ctx context.Context) ( - *admissionregistrationv1.MutatingWebhookConfigurationList, error) { - var mutatingWebhooks admissionregistrationv1.MutatingWebhookConfigurationList - - if err := r.Client.List(ctx, &mutatingWebhooks, client.MatchingLabels(r.MatchLabels)); err != nil { - return nil, err - } - return &mutatingWebhooks, nil -} - -func (r *KeptnWebhookCertificateReconciler) getValidatingWebhookConfigurations(ctx context.Context) ( - *admissionregistrationv1.ValidatingWebhookConfigurationList, error) { - var validatingWebhooks admissionregistrationv1.ValidatingWebhookConfigurationList - - if err := r.Client.List(ctx, &validatingWebhooks, client.MatchingLabels(r.MatchLabels)); err != nil { - return nil, err - } - return &validatingWebhooks, nil -} - func (r *KeptnWebhookCertificateReconciler) updateClientConfigurations(ctx context.Context, bundle []byte, webhookClientConfigs []*admissionregistrationv1.WebhookClientConfig, webhookConfig client.Object) error { if webhookConfig == nil || reflect.ValueOf(webhookConfig).IsNil() { @@ -219,17 +199,6 @@ func (r *KeptnWebhookCertificateReconciler) updateClientConfigurations(ctx conte return nil } -func (r *KeptnWebhookCertificateReconciler) getCRDConfigurations(ctx context.Context) ( - *apiv1.CustomResourceDefinitionList, error) { - var crds apiv1.CustomResourceDefinitionList - opt := client.MatchingLabels(r.MatchLabels) - if err := r.Client.List(ctx, &crds, opt); err != nil { - return nil, err - } - - return &crds, nil -} - func (r *KeptnWebhookCertificateReconciler) updateCRDsConfiguration(ctx context.Context, crds *apiv1.CustomResourceDefinitionList, bundle []byte) error { fail := false for _, crd := range crds.Items { From c243dfd57ee65938ee9c47d6600fbb3987b5920e Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 24 Apr 2023 15:53:03 +0200 Subject: [PATCH 05/19] adapted unit tests Signed-off-by: Florian Bacher --- .../keptnwebhookcontroller/webhook_cert_controller_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go index 76b184d754..3395b5d06b 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go @@ -13,7 +13,6 @@ import ( corev1 "k8s.io/api/core/v1" apiv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -410,12 +409,12 @@ func createTestSecret(_ *testing.T, certData map[string][]byte) *corev1.Secret { } func prepareController(t *testing.T, clt client.Client) (*KeptnWebhookCertificateReconciler, reconcile.Request) { - rec := &KeptnWebhookCertificateReconciler{ + rec := NewReconciler(CertificateReconcilerConfig{ + MatchLabels: map[string]string{"app.kubernetes.io/part-of": "keptn-lifecycle-toolkit"}, Client: clt, Log: testr.New(t), Namespace: testnamespace, - MatchLabels: labels.Set(map[string]string{"app.kubernetes.io/part-of": "keptn-lifecycle-toolkit"}), - } + }) request := reconcile.Request{ NamespacedName: types.NamespacedName{ From 05b4eec449e344a990ff9674160414a054751ade Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 25 Apr 2023 09:51:24 +0200 Subject: [PATCH 06/19] added library for watching certificate secret and registering webhooks Signed-off-by: Florian Bacher --- .../certificate_secret.go | 5 +- .../keptnwebhookcontroller/config.go | 12 - .../keptnwebhookcertificate_controller.go | 7 +- .../webhook_cert_controller_test.go | 9 +- klt-cert-manager/go.mod | 50 +-- klt-cert-manager/go.sum | 286 +++++++++------- .../pkg/certificates/certificatehandler.go | 22 ++ .../fake/certificatehandler_mock.go | 116 +++++++ klt-cert-manager/pkg/certificates/watcher.go | 137 ++++++++ .../pkg/certificates/watcher_test.go | 323 ++++++++++++++++++ klt-cert-manager/pkg/common/config.go | 14 + klt-cert-manager/pkg/fake/manager_mock.go | 63 ++++ klt-cert-manager/pkg/webhook/builder.go | 86 +++++ klt-cert-manager/pkg/webhook/builder_test.go | 77 +++++ klt-cert-manager/pkg/webhook/manager.go | 51 +++ klt-cert-manager/pkg/webhook/manager_test.go | 54 +++ 16 files changed, 1138 insertions(+), 174 deletions(-) delete mode 100644 klt-cert-manager/controllers/keptnwebhookcontroller/config.go create mode 100644 klt-cert-manager/pkg/certificates/certificatehandler.go create mode 100644 klt-cert-manager/pkg/certificates/fake/certificatehandler_mock.go create mode 100644 klt-cert-manager/pkg/certificates/watcher.go create mode 100644 klt-cert-manager/pkg/certificates/watcher_test.go create mode 100644 klt-cert-manager/pkg/common/config.go create mode 100644 klt-cert-manager/pkg/fake/manager_mock.go create mode 100644 klt-cert-manager/pkg/webhook/builder.go create mode 100644 klt-cert-manager/pkg/webhook/builder_test.go create mode 100644 klt-cert-manager/pkg/webhook/manager.go create mode 100644 klt-cert-manager/pkg/webhook/manager_test.go diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go b/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go index 92be74356a..82cdbf4507 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "reflect" "time" @@ -76,7 +77,7 @@ func (certSecret *certificateSecret) setCertificates(namespace string) error { } func buildSecretName() string { - return secretName + return common.SecretName } func getDomain(namespace string) string { @@ -117,7 +118,7 @@ func (certSecret *certificateSecret) createOrUpdateIfNecessary(ctx context.Conte func (certSecret *certificateSecret) loadCombinedBundle() ([]byte, error) { data, hasData := certSecret.secret.Data[RootCert] if !hasData { - return nil, errors.New(certificatesSecretEmptyErr) + return nil, errors.New(common.CertificatesSecretEmptyErr) } if oldData, hasOldData := certSecret.secret.Data[RootCertOld]; hasOldData { diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/config.go b/klt-cert-manager/controllers/keptnwebhookcontroller/config.go deleted file mode 100644 index 11789fef01..0000000000 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/config.go +++ /dev/null @@ -1,12 +0,0 @@ -package keptnwebhookcontroller - -import ( - "time" -) - -const ( - successDuration = 3 * time.Hour - secretName = "klt-certs" - certificatesSecretEmptyErr = "certificates secret is empty" - couldNotUpdateCRDErr = "could not update crd config" -) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index bd22ba63a8..b84c5f738d 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -3,6 +3,7 @@ package keptnwebhookcontroller import ( "context" "fmt" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "reflect" "github.com/go-logr/logr" @@ -109,7 +110,7 @@ func (r *KeptnWebhookCertificateReconciler) Reconcile(ctx context.Context, reque if isCertSecretRecent && areMutatingWebhookConfigsValid && areValidatingWebhookConfigsValid && areCRDConversionsConfigValid { r.Log.Info("secret for certificates up to date, skipping update") r.cancelMgr() - return reconcile.Result{RequeueAfter: successDuration}, nil + return reconcile.Result{RequeueAfter: common.SuccessDuration}, nil } if err = r.updateConfigurations(ctx, certSecret, crds, mutatingWebhookConfigs, mutatingWebhookConfigurations, validatingWebhookConfigs, validatingWebhookConfigurations); err != nil { @@ -117,7 +118,7 @@ func (r *KeptnWebhookCertificateReconciler) Reconcile(ctx context.Context, reque } r.cancelMgr() - return reconcile.Result{RequeueAfter: successDuration}, nil + return reconcile.Result{RequeueAfter: common.SuccessDuration}, nil } // SetupWithManager sets up the controller with the Manager. @@ -208,7 +209,7 @@ func (r *KeptnWebhookCertificateReconciler) updateCRDsConfiguration(ctx context. } if fail { - return fmt.Errorf(couldNotUpdateCRDErr) + return common.ErrCouldNotUpdateCRD } return nil } diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go index 3395b5d06b..beef246c45 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go @@ -2,6 +2,7 @@ package keptnwebhookcontroller import ( "context" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "testing" "time" @@ -20,7 +21,7 @@ import ( const ( testDomain = "my-domain." + testnamespace + ".svc" - expectedSecretName = secretName + expectedSecretName = common.SecretName strategyWebhook = "webhook" testBytes = 123 testnamespace = "keptn-ns" @@ -34,7 +35,7 @@ func TestReconcileCertificate_Create(t *testing.T) { res, err := controller.Reconcile(context.TODO(), request) require.NoError(t, err) assert.NotNil(t, res) - assert.Equal(t, successDuration, res.RequeueAfter) + assert.Equal(t, common.SuccessDuration, res.RequeueAfter) secret := &corev1.Secret{} err = clt.Get(context.TODO(), client.ObjectKey{Name: expectedSecretName, Namespace: testnamespace}, secret) @@ -61,7 +62,7 @@ func TestReconcileCertificate_Update(t *testing.T) { res, err := controller.Reconcile(context.TODO(), request) require.NoError(t, err) assert.NotNil(t, res) - assert.Equal(t, successDuration, res.RequeueAfter) + assert.Equal(t, common.SuccessDuration, res.RequeueAfter) secret := &corev1.Secret{} err = clt.Get(context.TODO(), client.ObjectKey{Name: expectedSecretName, Namespace: testnamespace}, secret) @@ -88,7 +89,7 @@ func TestReconcileCertificate_ExistingSecretWithValidCertificate(t *testing.T) { res, err := controller.Reconcile(context.TODO(), request) require.NoError(t, err) assert.NotNil(t, res) - assert.Equal(t, successDuration, res.RequeueAfter) + assert.Equal(t, common.SuccessDuration, res.RequeueAfter) secret := &corev1.Secret{} err = clt.Get(context.TODO(), client.ObjectKey{Name: expectedSecretName, Namespace: testnamespace}, secret) diff --git a/klt-cert-manager/go.mod b/klt-cert-manager/go.mod index 19b447b052..ceddbcd121 100644 --- a/klt-cert-manager/go.mod +++ b/klt-cert-manager/go.mod @@ -5,7 +5,9 @@ go 1.19 require ( github.com/go-logr/logr v1.2.4 github.com/kelseyhightower/envconfig v1.4.0 + github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230424084105-706292aeb3d8 github.com/pkg/errors v0.9.1 + github.com/spf13/afero v1.9.5 github.com/stretchr/testify v1.8.2 k8s.io/api v0.26.4 k8s.io/apiextensions-apiserver v0.26.4 @@ -16,54 +18,58 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // 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/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/swag v0.22.3 // 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.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_golang v1.15.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.opentelemetry.io/otel v1.11.2 // indirect + go.opentelemetry.io/otel/metric v0.34.0 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // 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/component-base v0.26.4 // indirect - k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect diff --git a/klt-cert-manager/go.sum b/klt-cert-manager/go.sum index acdd37b8e3..6163cf3a40 100644 --- a/klt-cert-manager/go.sum +++ b/klt-cert-manager/go.sum @@ -3,6 +3,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -13,6 +14,9 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -30,62 +34,59 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +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/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= 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/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/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.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -94,10 +95,9 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +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-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -128,12 +128,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD 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 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +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/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= @@ -141,15 +142,17 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -157,117 +160,99 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= 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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4 h1:LI+iOb7v1zIAtHQum79CbV+4HB1PCAim+TuCCRRsW7o= +github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4/go.mod h1:8rQ1flqblBWy43k4xJnoaMUA7e50zP95QIab3z6NCw4= +github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230424084105-706292aeb3d8 h1:VaHaIzAGWiBSqaZuVP50hXlCvALs2M2Hm9m1h5s8b0o= +github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230424084105-706292aeb3d8/go.mod h1:kCTPXzUdnnXRmDPFKgEOmqqz4QqvjkX8VSHdhFoJkgY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/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= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= 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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -277,21 +262,32 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= +go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= +go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 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 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -314,6 +310,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -322,9 +319,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-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= @@ -332,7 +330,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -351,19 +348,26 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= 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= @@ -375,12 +379,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -389,7 +390,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -402,33 +402,36 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/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-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -476,7 +479,15 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= 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= @@ -499,6 +510,9 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -530,13 +544,21 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -549,6 +571,13 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 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= @@ -561,29 +590,24 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 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.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/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.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= @@ -603,8 +627,8 @@ k8s.io/client-go v0.26.4 h1:/7P/IbGBuT73A+G97trf44NTPSNqvuBREpOfdLbHvD4= k8s.io/client-go v0.26.4/go.mod h1:6qOItWm3EwxJdl/8p5t7FWtWUOwyMdA8N9ekbW4idpI= k8s.io/component-base v0.26.4 h1:Bg2xzyXNKL3eAuiTEu3XE198d6z22ENgFgGQv2GGOUk= k8s.io/component-base v0.26.4/go.mod h1:lTuWL1Xz/a4e80gmIC3YZG2JCO4xNwtKWHJWeJmsq20= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +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-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= diff --git a/klt-cert-manager/pkg/certificates/certificatehandler.go b/klt-cert-manager/pkg/certificates/certificatehandler.go new file mode 100644 index 0000000000..ba9450fad9 --- /dev/null +++ b/klt-cert-manager/pkg/certificates/certificatehandler.go @@ -0,0 +1,22 @@ +package certificates + +import ( + "crypto/x509" + "encoding/pem" +) + +//go:generate moq -pkg fake -skip-ensure -out ./fake/certificatehandler_mock.go . ICertificateHandler +type ICertificateHandler interface { + Decode(data []byte) (p *pem.Block, rest []byte) + Parse(der []byte) (*x509.Certificate, error) +} + +type defaultCertificateHandler struct { +} + +func (c defaultCertificateHandler) Decode(data []byte) (p *pem.Block, rest []byte) { + return pem.Decode(data) +} +func (c defaultCertificateHandler) Parse(der []byte) (*x509.Certificate, error) { + return x509.ParseCertificate(der) +} diff --git a/klt-cert-manager/pkg/certificates/fake/certificatehandler_mock.go b/klt-cert-manager/pkg/certificates/fake/certificatehandler_mock.go new file mode 100644 index 0000000000..45a5eacbae --- /dev/null +++ b/klt-cert-manager/pkg/certificates/fake/certificatehandler_mock.go @@ -0,0 +1,116 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fake + +import ( + "crypto/x509" + "encoding/pem" + "sync" +) + +// ICertificateHandlerMock is a mock implementation of certificates.ICertificateHandler. +// +// func TestSomethingThatUsesICertificateHandler(t *testing.T) { +// +// // make and configure a mocked certificates.ICertificateHandler +// mockedICertificateHandler := &ICertificateHandlerMock{ +// DecodeFunc: func(data []byte) (*pem.Block, []byte) { +// panic("mock out the Decode method") +// }, +// ParseFunc: func(der []byte) (*x509.Certificate, error) { +// panic("mock out the Parse method") +// }, +// } +// +// // use mockedICertificateHandler in code that requires certificates.ICertificateHandler +// // and then make assertions. +// +// } +type ICertificateHandlerMock struct { + // DecodeFunc mocks the Decode method. + DecodeFunc func(data []byte) (*pem.Block, []byte) + + // ParseFunc mocks the Parse method. + ParseFunc func(der []byte) (*x509.Certificate, error) + + // calls tracks calls to the methods. + calls struct { + // Decode holds details about calls to the Decode method. + Decode []struct { + // Data is the data argument value. + Data []byte + } + // Parse holds details about calls to the Parse method. + Parse []struct { + // Der is the der argument value. + Der []byte + } + } + lockDecode sync.RWMutex + lockParse sync.RWMutex +} + +// Decode calls DecodeFunc. +func (mock *ICertificateHandlerMock) Decode(data []byte) (*pem.Block, []byte) { + if mock.DecodeFunc == nil { + panic("ICertificateHandlerMock.DecodeFunc: method is nil but ICertificateHandler.Decode was just called") + } + callInfo := struct { + Data []byte + }{ + Data: data, + } + mock.lockDecode.Lock() + mock.calls.Decode = append(mock.calls.Decode, callInfo) + mock.lockDecode.Unlock() + return mock.DecodeFunc(data) +} + +// DecodeCalls gets all the calls that were made to Decode. +// Check the length with: +// +// len(mockedICertificateHandler.DecodeCalls()) +func (mock *ICertificateHandlerMock) DecodeCalls() []struct { + Data []byte +} { + var calls []struct { + Data []byte + } + mock.lockDecode.RLock() + calls = mock.calls.Decode + mock.lockDecode.RUnlock() + return calls +} + +// Parse calls ParseFunc. +func (mock *ICertificateHandlerMock) Parse(der []byte) (*x509.Certificate, error) { + if mock.ParseFunc == nil { + panic("ICertificateHandlerMock.ParseFunc: method is nil but ICertificateHandler.Parse was just called") + } + callInfo := struct { + Der []byte + }{ + Der: der, + } + mock.lockParse.Lock() + mock.calls.Parse = append(mock.calls.Parse, callInfo) + mock.lockParse.Unlock() + return mock.ParseFunc(der) +} + +// ParseCalls gets all the calls that were made to Parse. +// Check the length with: +// +// len(mockedICertificateHandler.ParseCalls()) +func (mock *ICertificateHandlerMock) ParseCalls() []struct { + Der []byte +} { + var calls []struct { + Der []byte + } + mock.lockParse.RLock() + calls = mock.calls.Parse + mock.lockParse.RUnlock() + return calls +} diff --git a/klt-cert-manager/pkg/certificates/watcher.go b/klt-cert-manager/pkg/certificates/watcher.go new file mode 100644 index 0000000000..ef7b67ae96 --- /dev/null +++ b/klt-cert-manager/pkg/certificates/watcher.go @@ -0,0 +1,137 @@ +package certificates + +import ( + "bytes" + "context" + "errors" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/go-logr/logr" + "github.com/spf13/afero" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const ( + certificateRenewalInterval = 6 * time.Hour + ServerKey = "tls.key" + ServerCert = "tls.crt" + CertThreshold = 5 * time.Minute +) + +//go:generate moq -pkg fake -skip-ensure -out ../fake/manager_mock.go . ICertificateWatcher:MockCertificateWatcher +type ICertificateWatcher interface { + WaitForCertificates() +} + +type CertificateWatcher struct { + apiReader client.Reader + fs afero.Fs + certificateDirectory string + namespace string + certificateSecretName string + certificateTreshold time.Duration + ICertificateHandler + Log logr.Logger +} + +func NewCertificateWatcher(reader client.Reader, certDir string, namespace string, secretName string, log logr.Logger) *CertificateWatcher { + return &CertificateWatcher{ + apiReader: reader, + fs: afero.NewOsFs(), + certificateDirectory: certDir, + namespace: namespace, + certificateSecretName: secretName, + ICertificateHandler: defaultCertificateHandler{}, + certificateTreshold: CertThreshold, + Log: log, + } +} + +func (watcher *CertificateWatcher) watchForCertificatesSecret() { + for { + <-time.After(certificateRenewalInterval) + watcher.Log.Info("checking for new certificates") + if err := watcher.updateCertificatesFromSecret(); err != nil { + watcher.Log.Error(err, "failed to update certificates") + } else { + watcher.Log.Info("updated certificate successfully") + } + } +} + +func (watcher *CertificateWatcher) updateCertificatesFromSecret() error { + var secret corev1.Secret + + err := watcher.apiReader.Get(context.TODO(), + client.ObjectKey{Name: watcher.certificateSecretName, Namespace: watcher.namespace}, &secret) + if err != nil { + return err + } + + watcher.Log.Info("checking dir", "watcher.certificateDirectory ", watcher.certificateDirectory) + if _, err = watcher.fs.Stat(watcher.certificateDirectory); os.IsNotExist(err) { + err = watcher.fs.MkdirAll(watcher.certificateDirectory, 0755) + if err != nil { + return fmt.Errorf("could not create cert directory: %w", err) + } + } + + for _, filename := range []string{ServerCert, ServerKey} { + if err = watcher.ensureCertificateFile(secret, filename); err != nil { + return err + } + } + isValid, err := watcher.ValidateCertificateExpiration(secret.Data[ServerCert], certificateRenewalInterval, time.Now()) + if err != nil { + return err + } else if !isValid { + return fmt.Errorf("certificate is outdated") + } + return nil +} + +func (watcher *CertificateWatcher) ensureCertificateFile(secret corev1.Secret, filename string) error { + f := filepath.Join(watcher.certificateDirectory, filename) + data, err := afero.ReadFile(watcher.fs, f) + if os.IsNotExist(err) || !bytes.Equal(data, secret.Data[filename]) { + return afero.WriteFile(watcher.fs, f, secret.Data[filename], 0666) + } + return err + +} + +func (watcher *CertificateWatcher) WaitForCertificates() { + for threshold := time.Now().Add(watcher.certificateTreshold); time.Now().Before(threshold); { + + if err := watcher.updateCertificatesFromSecret(); err != nil { + if k8serrors.IsNotFound(err) { + watcher.Log.Info("waiting for certificate secret to be available.") + } else { + watcher.Log.Error(err, "failed to update certificates") + } + time.Sleep(10 * time.Second) + continue + } + break + } + go watcher.watchForCertificatesSecret() +} + +func (watcher *CertificateWatcher) ValidateCertificateExpiration(certData []byte, renewalThreshold time.Duration, now time.Time) (bool, error) { + if block, _ := watcher.Decode(certData); block == nil { + watcher.Log.Error(errors.New("can't decode PEM file"), "failed to parse certificate") + return false, nil + } else if cert, err := watcher.Parse(block.Bytes); err != nil { + watcher.Log.Error(err, "failed to parse certificate") + return false, err + } else if now.After(cert.NotAfter.Add(-renewalThreshold)) { + watcher.Log.Info("certificate is outdated, waiting for new ones", "Valid until", cert.NotAfter.UTC()) + return false, nil + } + return true, nil +} diff --git a/klt-cert-manager/pkg/certificates/watcher_test.go b/klt-cert-manager/pkg/certificates/watcher_test.go new file mode 100644 index 0000000000..e9110ca4f0 --- /dev/null +++ b/klt-cert-manager/pkg/certificates/watcher_test.go @@ -0,0 +1,323 @@ +package certificates + +import ( + "bytes" + "crypto/x509" + "encoding/pem" + "os" + "path/filepath" + fakeClient "sigs.k8s.io/controller-runtime/pkg/client/fake" + "testing" + "time" + + "github.com/go-logr/logr/testr" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates/fake" + + "github.com/pkg/errors" + "github.com/spf13/afero" + "github.com/stretchr/testify/require" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const CACERT = `-----BEGIN CERTIFICATE----- +MIICPTCCAeKgAwIBAgIRAMIV/0UqFGHgKSYOWBdx/KcwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCQVQxCzAJBgNVBAgTAktMMRMwEQYDVQQHEwpLbGFnZW5mdXJ0MQ4w +DAYDVQQKEwVLZXB0bjEZMBcGA1UECxMQTGlmZWN5Y2xlVG9vbGtpdDEXMBUGA1UE +AwwOKi5rZXB0bi1ucy5zdmMwHhcNMjMwNDE5MTEwNDUzWhcNMjQwNDE4MTEwNDUz +WjBzMQswCQYDVQQGEwJBVDELMAkGA1UECBMCS0wxEzARBgNVBAcTCktsYWdlbmZ1 +cnQxDjAMBgNVBAoTBUtlcHRuMRkwFwYDVQQLExBMaWZlY3ljbGVUb29sa2l0MRcw +FQYDVQQDDA4qLmtlcHRuLW5zLnN2YzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BPxAP4JTJfwKz/P32dXuyfVi7kinQPebSYwF/gRAUcN0dCAi6GnxbI2OXlcU0guD +zHXv3VRh3EX2fiNszcfKaCajVzBVMA4GA1UdDwEB/wQEAwICpDATBgNVHSUEDDAK +BggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQUGe/8XYV1HsZs +nWsyrOCCGr/sQDAKBggqhkjOPQQDAgNJADBGAiEAkcPaCANDXW5Uillrof0VrnPw +ow49D22Gsrh7YM+vmTQCIQDU1L5IT0Zz+bdIyFSsDnEUXZDeydNv56DoSLh+358Y +aw== +-----END CERTIFICATE-----` + +const CAKEY = `-----BEGIN PRIVATE KEY----- +MHcCAQEEII5SAqBxINKatksyu2mTvLZZhfEOpNinYJDwlQjkfreboAoGCCqGSM49 +AwEHoUQDQgAE/EA/glMl/ArP8/fZ1e7J9WLuSKdA95tJjAX+BEBRw3R0ICLoafFs +jY5eVxTSC4PMde/dVGHcRfZ+I2zNx8poJg== +-----END PRIVATE KEY-----` + +const uniqueIDPEM = `-----BEGIN CERTIFICATE----- +MIIFsDCCBJigAwIBAgIIrOyC1ydafZMwDQYJKoZIhvcNAQEFBQAwgY4xgYswgYgG +A1UEAx6BgABNAGkAYwByAG8AcwBvAGYAdAAgAEYAbwByAGUAZgByAG8AbgB0ACAA +VABNAEcAIABIAFQAVABQAFMAIABJAG4AcwBwAGUAYwB0AGkAbwBuACAAQwBlAHIA +dABpAGYAaQBjAGEAdABpAG8AbgAgAEEAdQB0AGgAbwByAGkAdAB5MB4XDTE0MDEx +ODAwNDEwMFoXDTE1MTExNTA5Mzc1NlowgZYxCzAJBgNVBAYTAklEMRAwDgYDVQQI +EwdqYWthcnRhMRIwEAYDVQQHEwlJbmRvbmVzaWExHDAaBgNVBAoTE3N0aG9ub3Jl +aG90ZWxyZXNvcnQxHDAaBgNVBAsTE3N0aG9ub3JlaG90ZWxyZXNvcnQxJTAjBgNV +BAMTHG1haWwuc3Rob25vcmVob3RlbHJlc29ydC5jb20wggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCvuu0qpI+Ko2X84Twkf84cRD/rgp6vpgc5Ebejx/D4 +PEVON5edZkazrMGocK/oQqIlRxx/lefponN/chlGcllcVVPWTuFjs8k+Aat6T1qp +4iXxZekAqX+U4XZMIGJD3PckPL6G2RQSlF7/LhGCsRNRdKpMWSTbou2Ma39g52Kf +gsl3SK/GwLiWpxpcSkNQD1hugguEIsQYLxbeNwpcheXZtxbBGguPzQ7rH8c5vuKU +BkMOzaiNKLzHbBdFSrua8KWwCJg76Vdq/q36O9GlW6YgG3i+A4pCJjXWerI1lWwX +Ktk5V+SvUHGey1bkDuZKJ6myMk2pGrrPWCT7jP7WskChAgMBAAGBCQBCr1dgEleo +cKOCAfswggH3MIHDBgNVHREEgbswgbiCHG1haWwuc3Rob25vcmVob3RlbHJlc29y +dC5jb22CIGFzaGNoc3ZyLnN0aG9ub3JlaG90ZWxyZXNvcnQuY29tgiRBdXRvRGlz +Y292ZXIuc3Rob25vcmVob3RlbHJlc29ydC5jb22CHEF1dG9EaXNjb3Zlci5ob3Rl +bHJlc29ydC5jb22CCEFTSENIU1ZSghdzdGhvbm9yZWhvdGVscmVzb3J0LmNvbYIP +aG90ZWxyZXNvcnQuY29tMCEGCSsGAQQBgjcUAgQUHhIAVwBlAGIAUwBlAHIAdgBl +AHIwHQYDVR0OBBYEFMAC3UR4FwAdGekbhMgnd6lMejtbMAsGA1UdDwQEAwIFoDAT +BgNVHSUEDDAKBggrBgEFBQcDATAJBgNVHRMEAjAAMIG/BgNVHQEEgbcwgbSAFGfF +6xihk+gJJ5TfwvtWe1UFnHLQoYGRMIGOMYGLMIGIBgNVBAMegYAATQBpAGMAcgBv +AHMAbwBmAHQAIABGAG8AcgBlAGYAcgBvAG4AdAAgAFQATQBHACAASABUAFQAUABT +ACAASQBuAHMAcABlAGMAdABpAG8AbgAgAEMAZQByAHQAaQBmAGkAYwBhAHQAaQBv +AG4AIABBAHUAdABoAG8AcgBpAHQAeYIIcKhXEmBXr0IwDQYJKoZIhvcNAQEFBQAD +ggEBABlSxyCMr3+ANr+WmPSjyN5YCJBgnS0IFCwJAzIYP87bcTye/U8eQ2+E6PqG +Q7Huj7nfHEw9qnGo+HNyPp1ad3KORzXDb54c6xEoi+DeuPzYHPbn4c3hlH49I0aQ +eWW2w4RslSWpLvO6Y7Lboyz2/Thk/s2kd4RHxkkWpH2ltPqJuYYg3X6oM5+gIFHJ +WGnh+ojZ5clKvS5yXh3Wkj78M6sb32KfcBk0Hx6NkCYPt60ODYmWtvqwtw6r73u5 +TnTYWRNvo2svX69TriL+CkHY9O1Hkwf2It5zHl3gNiKTJVaak8AuEz/CKWZneovt +yYLwhUhg3PX5Co1VKYE+9TxloiE= +-----END CERTIFICATE-----` + +var ERR_BAD_CERT = errors.New("bad cert") + +var emptySecret = v1.Secret{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "my-cert", + }, +} + +var goodSecret = v1.Secret{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "my-cert", + }, + Data: map[string][]byte{ + ServerCert: []byte(CACERT), + ServerKey: []byte(CAKEY), + }, +} + +func TestCertificateWatcher_ValidateCertificateExpiration(t *testing.T) { + + tests := []struct { + name string + certHandler ICertificateHandler + certData []byte + renewalThreshold time.Duration + now time.Time + want bool + wantErr error + }{ + { + name: "certificate cannot be decoded", + certHandler: &fake.ICertificateHandlerMock{ + DecodeFunc: func(data []byte) (p *pem.Block, rest []byte) { + return nil, nil //fake a failure in the decoding + }, + ParseFunc: nil, + }, + want: false, + }, + { + name: "certificate cannot be parsed", + certHandler: &fake.ICertificateHandlerMock{ + DecodeFunc: func(data []byte) (p *pem.Block, rest []byte) { + return &pem.Block{Type: "test", Bytes: []byte("testdata")}, nil + }, + ParseFunc: func(der []byte) (*x509.Certificate, error) { + return nil, ERR_BAD_CERT + }, + }, + want: false, + wantErr: ERR_BAD_CERT, + }, + { + name: "good certificate - unexpired", + certData: []byte(uniqueIDPEM), + certHandler: defaultCertificateHandler{}, + want: true, + }, + { + name: "good certificate - expired", + certData: []byte(uniqueIDPEM), + now: time.Now(), //setting up now makes sure that the threshold is passed + certHandler: defaultCertificateHandler{}, + want: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + watcher := &CertificateWatcher{ + ICertificateHandler: tt.certHandler, + Log: testr.New(t), + } + got, err := watcher.ValidateCertificateExpiration(tt.certData, tt.renewalThreshold, tt.now) + if tt.wantErr != nil { + require.Error(t, err) + t.Log("want:", tt.wantErr, "got:", err) + require.True(t, errors.Is(tt.wantErr, err)) + } + require.Equal(t, got, tt.want) + }) + } +} + +func TestCertificateWatcher_ensureCertificateFile(t *testing.T) { + + certdir := t.TempDir() + f := filepath.Join(certdir, ServerCert) + err := os.WriteFile(f, goodSecret.Data[ServerCert], 0666) + require.Nil(t, err) + baddir := t.TempDir() + f = filepath.Join(baddir, ServerCert) + err = os.WriteFile(f, goodSecret.Data[ServerKey], 0666) + require.Nil(t, err) + tests := []struct { + name string + fs afero.Fs + secret v1.Secret + filename string + certDir string + wantErr bool + err string + }{ + { + name: "if good cert exist in fs no error", + secret: goodSecret, + certDir: certdir, + filename: ServerCert, + wantErr: false, + }, + + { + name: "if unexisting file name, we expect a file system error", + secret: emptySecret, + filename: "$%&/())=$§%/=", + certDir: baddir, + wantErr: true, + err: "no such file or directory", + }, + + { + name: "wrong file content is replaced with updated cert", + certDir: baddir, + secret: goodSecret, + filename: ServerCert, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + watcher := &CertificateWatcher{ + fs: afero.NewOsFs(), + certificateDirectory: tt.certDir, + } + err := watcher.ensureCertificateFile(tt.secret, tt.filename) + if !tt.wantErr { + require.Nil(t, err) + f = filepath.Join(tt.certDir, ServerCert) + data, err := os.ReadFile(f) + if err != nil { + panic(err) + } + if !bytes.Equal(data, tt.secret.Data[tt.filename]) { + t.Errorf("ensureCertificateFile()data %v was not replaced with %v", data, tt.secret.Data[tt.filename]) + } + } else { + require.Contains(t, err.Error(), tt.err) + } + }) + } +} + +func TestCertificateWatcher_updateCertificatesFromSecret(t *testing.T) { + + oldDir := t.TempDir() + os.Remove(oldDir) + + tests := []struct { + name string + apiReader client.Reader + certificateDirectory string + namespace string + certificateSecretName string + wantErr error + }{ + { + name: "certificate not found", + apiReader: newFakeClient(), + certificateDirectory: t.TempDir(), + namespace: "default", + certificateSecretName: "my-cert", + wantErr: errors.New("secrets \"my-cert\" not found"), + }, + { + name: "outdated certificate found, nothing in dir", + apiReader: newFakeClient(&emptySecret), + certificateDirectory: t.TempDir(), + namespace: "default", + certificateSecretName: "my-cert", + wantErr: errors.New("certificate is outdated"), + }, + + { + name: "outdated certificate found, not existing in dir", + apiReader: newFakeClient(&emptySecret), + certificateDirectory: oldDir, + namespace: "default", + certificateSecretName: "my-cert", + wantErr: errors.New("certificate is outdated"), + }, + { + name: "good certificate - not stored", + apiReader: newFakeClient(&goodSecret), + certificateDirectory: t.TempDir(), + namespace: "default", + certificateSecretName: "my-cert", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + watcher := &CertificateWatcher{ + apiReader: tt.apiReader, + fs: afero.NewOsFs(), + certificateDirectory: tt.certificateDirectory, + namespace: tt.namespace, + certificateSecretName: tt.certificateSecretName, + ICertificateHandler: defaultCertificateHandler{}, + Log: testr.New(t), + } + err := watcher.updateCertificatesFromSecret() + if tt.wantErr == nil { + require.Nil(t, err) + } else { + require.NotNil(t, err) + require.Contains(t, err.Error(), tt.wantErr.Error()) + } + }) + } +} + +func newFakeClient(objs ...client.Object) client.Reader { + return fakeClient.NewClientBuilder().WithObjects(objs...).Build() +} + +func TestNewCertificateWatcher(t *testing.T) { + logger := testr.New(t) + client := newFakeClient() + want := &CertificateWatcher{ + apiReader: client, + fs: afero.NewOsFs(), + namespace: "default", + certificateSecretName: "my-secret", + certificateDirectory: "test", + certificateTreshold: CertThreshold, + ICertificateHandler: defaultCertificateHandler{}, + Log: testr.New(t), + } + got := NewCertificateWatcher(client, "test", "default", "my-secret", logger) + require.EqualValues(t, got, want) + +} diff --git a/klt-cert-manager/pkg/common/config.go b/klt-cert-manager/pkg/common/config.go new file mode 100644 index 0000000000..9f9f91604a --- /dev/null +++ b/klt-cert-manager/pkg/common/config.go @@ -0,0 +1,14 @@ +package common + +import ( + "github.com/pkg/errors" + "time" +) + +const ( + SuccessDuration = 3 * time.Hour + SecretName = "klt-certs" + CertificatesSecretEmptyErr = "certificates secret is empty" +) + +var ErrCouldNotUpdateCRD = errors.New("could not update CRD config") diff --git a/klt-cert-manager/pkg/fake/manager_mock.go b/klt-cert-manager/pkg/fake/manager_mock.go new file mode 100644 index 0000000000..65697b6504 --- /dev/null +++ b/klt-cert-manager/pkg/fake/manager_mock.go @@ -0,0 +1,63 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fake + +import ( + "sync" +) + +// MockCertificateWatcher is a mock implementation of certificates.ICertificateWatcher. +// +// func TestSomethingThatUsesICertificateWatcher(t *testing.T) { +// +// // make and configure a mocked certificates.ICertificateWatcher +// mockedICertificateWatcher := &MockCertificateWatcher{ +// WaitForCertificatesFunc: func() { +// panic("mock out the WaitForCertificates method") +// }, +// } +// +// // use mockedICertificateWatcher in code that requires certificates.ICertificateWatcher +// // and then make assertions. +// +// } +type MockCertificateWatcher struct { + // WaitForCertificatesFunc mocks the WaitForCertificates method. + WaitForCertificatesFunc func() + + // calls tracks calls to the methods. + calls struct { + // WaitForCertificates holds details about calls to the WaitForCertificates method. + WaitForCertificates []struct { + } + } + lockWaitForCertificates sync.RWMutex +} + +// WaitForCertificates calls WaitForCertificatesFunc. +func (mock *MockCertificateWatcher) WaitForCertificates() { + if mock.WaitForCertificatesFunc == nil { + panic("MockCertificateWatcher.WaitForCertificatesFunc: method is nil but ICertificateWatcher.WaitForCertificates was just called") + } + callInfo := struct { + }{} + mock.lockWaitForCertificates.Lock() + mock.calls.WaitForCertificates = append(mock.calls.WaitForCertificates, callInfo) + mock.lockWaitForCertificates.Unlock() + mock.WaitForCertificatesFunc() +} + +// WaitForCertificatesCalls gets all the calls that were made to WaitForCertificates. +// Check the length with: +// +// len(mockedICertificateWatcher.WaitForCertificatesCalls()) +func (mock *MockCertificateWatcher) WaitForCertificatesCalls() []struct { +} { + var calls []struct { + } + mock.lockWaitForCertificates.RLock() + calls = mock.calls.WaitForCertificates + mock.lockWaitForCertificates.RUnlock() + return calls +} diff --git a/klt-cert-manager/pkg/webhook/builder.go b/klt-cert-manager/pkg/webhook/builder.go new file mode 100644 index 0000000000..b63f2c577b --- /dev/null +++ b/klt-cert-manager/pkg/webhook/builder.go @@ -0,0 +1,86 @@ +package webhook + +import ( + "flag" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/webhook" +) + +const ( + FlagCertificateDirectory = "certs-dir" + FlagCertificateFileName = "cert" + FlagCertificateKeyFileName = "cert-key" +) + +var ( + certificateDirectory string + certificateFileName string + certificateKeyFileName string +) + +type Builder struct { + managerProvider Provider + namespace string + podName string + certificateWatcher certificates.ICertificateWatcher +} + +func NewWebhookBuilder() Builder { + return Builder{} +} + +func (builder Builder) SetManagerProvider(provider Provider) Builder { + builder.managerProvider = provider + return builder +} + +func (builder Builder) SetNamespace(namespace string) Builder { + builder.namespace = namespace + return builder +} + +func (builder Builder) SetPodName(podName string) Builder { + builder.podName = podName + return builder +} + +func (builder Builder) SetCertificateWatcher(watcher certificates.ICertificateWatcher) Builder { + builder.certificateWatcher = watcher + return builder +} + +func (builder Builder) GetManagerProvider() Provider { + if builder.managerProvider == nil { + builder.managerProvider = NewWebhookManagerProvider(certificateDirectory, certificateKeyFileName, certificateFileName) + } + + return builder.managerProvider +} + +// Run ensures that the secret containing the certificate required for the webhooks is available, and then registers the +// given webhooks at the webhookManager's webhook server. +func (builder Builder) Run(webhookManager manager.Manager, webhooks map[string]*webhook.Admission) error { + + addFlags() + builder.GetManagerProvider().SetupWebhookServer(webhookManager) + + builder.certificateWatcher.WaitForCertificates() + + for path, admissionWebhook := range webhooks { + webhookManager.GetWebhookServer().Register(path, admissionWebhook) + } + + signalHandler := ctrl.SetupSignalHandler() + err := webhookManager.Start(signalHandler) + return errors.WithStack(err) +} + +func addFlags() { + flag.StringVar(&certificateDirectory, FlagCertificateDirectory, "/tmp/webhook/certs", "Directory to look certificates for.") + flag.StringVar(&certificateFileName, FlagCertificateFileName, "tls.crt", "File name for the public certificate.") + flag.StringVar(&certificateKeyFileName, FlagCertificateKeyFileName, "tls.key", "File name for the private key.") + flag.Parse() +} diff --git a/klt-cert-manager/pkg/webhook/builder_test.go b/klt-cert-manager/pkg/webhook/builder_test.go new file mode 100644 index 0000000000..0711692822 --- /dev/null +++ b/klt-cert-manager/pkg/webhook/builder_test.go @@ -0,0 +1,77 @@ +package webhook + +import ( + "context" + fake2 "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/fake" + "github.com/stretchr/testify/require" + "sigs.k8s.io/controller-runtime/pkg/client" + fakeClient "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + "testing" + + "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" + "github.com/stretchr/testify/assert" +) + +func TestWebhookCommandBuilder(t *testing.T) { + t.Run("set manager provider", func(t *testing.T) { + expectedProvider := &fake.MockWebhookManager{} + builder := NewWebhookBuilder().SetManagerProvider(expectedProvider) + + assert.Equal(t, expectedProvider, builder.managerProvider) + }) + t.Run("set namespace", func(t *testing.T) { + builder := NewWebhookBuilder().SetNamespace("namespace") + + assert.Equal(t, "namespace", builder.namespace) + }) + t.Run("set certificate watcher", func(t *testing.T) { + expectedCertificateWatcher := &fake2.MockCertificateWatcher{} + builder := NewWebhookBuilder().SetCertificateWatcher(expectedCertificateWatcher) + + assert.Equal(t, expectedCertificateWatcher, builder.certificateWatcher) + }) +} + +func TestBuilder_Run(t *testing.T) { + mockProvider := &fake.MockWebhookManager{} + + mockProvider.SetupWebhookServerFunc = func(mgr manager.Manager) {} + + mockManager := &fake.MockManager{} + + mockManager.GetAPIReaderFunc = func() client.Reader { + return newFakeClient() + } + webhookServer := &webhook.Server{} + mockManager.GetWebhookServerFunc = func() *webhook.Server { + return webhookServer + } + + mockManager.StartFunc = func(ctx context.Context) error { + return nil + } + + mockCertificateWatcher := &fake2.MockCertificateWatcher{} + mockCertificateWatcher.WaitForCertificatesFunc = func() {} + + builder := NewWebhookBuilder().SetManagerProvider(mockProvider).SetCertificateWatcher(mockCertificateWatcher) + + webhooks := map[string]*admission.Webhook{ + "/my-url": {}, + "/my-other-url": {}, + } + err := builder.Run(mockManager, webhooks) + + require.Nil(t, err) + + require.Len(t, mockProvider.SetupWebhookServerCalls(), 1) + require.Len(t, mockManager.GetWebhookServerCalls(), 2) + require.Len(t, mockCertificateWatcher.WaitForCertificatesCalls(), 1) +} + +func newFakeClient(objs ...client.Object) client.Reader { + return fakeClient.NewClientBuilder().WithObjects(objs...).Build() +} diff --git a/klt-cert-manager/pkg/webhook/manager.go b/klt-cert-manager/pkg/webhook/manager.go new file mode 100644 index 0000000000..704584333a --- /dev/null +++ b/klt-cert-manager/pkg/webhook/manager.go @@ -0,0 +1,51 @@ +package webhook + +import ( + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/manager" +) + +const ( + metricsBindAddress = ":8383" + port = 8443 +) + +//go:generate moq -pkg fake -skip-ensure -out ../fake/manager_mock.go . IManager:MockManager +type IManager manager.Manager + +//go:generate moq -pkg fake -skip-ensure -out ../fake/webhookmanager_mock.go . Provider:MockWebhookManager +type Provider interface { + SetupWebhookServer(mgr manager.Manager) +} + +type WebhookProvider struct { + certificateDirectory string + certificateFileName string + keyFileName string +} + +func NewWebhookManagerProvider(certificateDirectory string, keyFileName string, certificateFileName string) WebhookProvider { + return WebhookProvider{ + certificateDirectory: certificateDirectory, + certificateFileName: certificateFileName, + keyFileName: keyFileName, + } +} + +func (provider WebhookProvider) createOptions(scheme *runtime.Scheme, namespace string) ctrl.Options { + return ctrl.Options{ + Scheme: scheme, + MetricsBindAddress: metricsBindAddress, + Port: port, + Namespace: namespace, + } +} + +func (provider WebhookProvider) SetupWebhookServer(mgr manager.Manager) { + webhookServer := mgr.GetWebhookServer() + webhookServer.CertDir = provider.certificateDirectory + webhookServer.KeyName = provider.keyFileName + webhookServer.CertName = provider.certificateFileName + +} diff --git a/klt-cert-manager/pkg/webhook/manager_test.go b/klt-cert-manager/pkg/webhook/manager_test.go new file mode 100644 index 0000000000..3e0913648e --- /dev/null +++ b/klt-cert-manager/pkg/webhook/manager_test.go @@ -0,0 +1,54 @@ +package webhook + +import ( + "testing" + + "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" + cmdManager "github.com/keptn/lifecycle-toolkit/operator/cmd/manager" + "github.com/stretchr/testify/assert" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/webhook" +) + +func TestCreateOptions(t *testing.T) { + + t.Run("implements interface", func(t *testing.T) { + var provider cmdManager.Provider = NewWebhookManagerProvider("certs-dir", "key-file", "cert-file") + + providerImpl := provider.(WebhookProvider) + assert.Equal(t, "certs-dir", providerImpl.certificateDirectory) + assert.Equal(t, "key-file", providerImpl.keyFileName) + assert.Equal(t, "cert-file", providerImpl.certificateFileName) + }) + t.Run("creates options", func(t *testing.T) { + provider := WebhookProvider{} + options := provider.createOptions(scheme.Scheme, "test-namespace") + + assert.NotNil(t, options) + assert.Equal(t, "test-namespace", options.Namespace) + assert.Equal(t, scheme.Scheme, options.Scheme) + assert.Equal(t, metricsBindAddress, options.MetricsBindAddress) + assert.Equal(t, port, options.Port) + }) + t.Run("configures webhooks server", func(t *testing.T) { + provider := NewWebhookManagerProvider("certs-dir", "key-file", "cert-file") + expectedWebhookServer := &webhook.Server{} + + mgr := &fake.MockManager{ + GetWebhookServerFunc: func() *webhook.Server { + return expectedWebhookServer + }, + } + + provider.SetupWebhookServer(mgr) + + assert.Equal(t, "certs-dir", expectedWebhookServer.CertDir) + assert.Equal(t, "key-file", expectedWebhookServer.KeyName) + assert.Equal(t, "cert-file", expectedWebhookServer.CertName) + + mgrWebhookServer := mgr.GetWebhookServer() + assert.Equal(t, "certs-dir", mgrWebhookServer.CertDir) + assert.Equal(t, "key-file", mgrWebhookServer.KeyName) + assert.Equal(t, "cert-file", mgrWebhookServer.CertName) + }) +} From fbf4fdf40f4f62ecc7cbc737be6359b859ca6b4c Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 27 Apr 2023 08:19:33 +0200 Subject: [PATCH 07/19] fix linting issues Signed-off-by: Florian Bacher --- .../certificate_secret.go | 2 +- .../keptnwebhookcertificate_controller.go | 2 +- .../resource_retriever.go | 1 + .../resource_retriever_test.go | 40 +++++++++++++------ .../webhook_cert_controller_test.go | 2 +- .../pkg/certificates/watcher_test.go | 3 +- klt-cert-manager/pkg/common/config.go | 3 +- klt-cert-manager/pkg/webhook/builder.go | 1 + klt-cert-manager/pkg/webhook/builder_test.go | 8 ++-- 9 files changed, 39 insertions(+), 23 deletions(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go b/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go index 82cdbf4507..85f4b174d0 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/certificate_secret.go @@ -4,12 +4,12 @@ import ( "bytes" "context" "fmt" - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "reflect" "time" "github.com/go-logr/logr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/kubeutils" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "github.com/pkg/errors" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index b84c5f738d..4440b3b842 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -3,11 +3,11 @@ package keptnwebhookcontroller import ( "context" "fmt" - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "reflect" "github.com/go-logr/logr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/eventfilter" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "github.com/pkg/errors" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" appsv1 "k8s.io/api/apps/v1" diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go index 36042210fd..b860fabfe4 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever.go @@ -2,6 +2,7 @@ package keptnwebhookcontroller import ( "context" + "github.com/go-logr/logr" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" apiv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go index d0a5e30f49..e1f99ff237 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/resource_retriever_test.go @@ -1,7 +1,10 @@ +// nolint: dupl package keptnwebhookcontroller import ( "context" + "testing" + "github.com/go-logr/logr/testr" "github.com/stretchr/testify/require" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -9,7 +12,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "testing" ) func TestLabelSelectorRetriever_GetCRDs(t *testing.T) { @@ -32,7 +34,8 @@ func TestLabelSelectorRetriever_GetCRDs(t *testing.T) { Spec: apiv1.CustomResourceDefinitionSpec{}, } scheme := runtime.NewScheme() - apiv1.AddToScheme(scheme) + err := apiv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() @@ -60,7 +63,8 @@ func TestLabelSelectorRetriever_GetCRDs_ReturnEmptyListIfNothingMatches(t *testi Spec: apiv1.CustomResourceDefinitionSpec{}, } scheme := runtime.NewScheme() - apiv1.AddToScheme(scheme) + err := apiv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1).Build() @@ -97,7 +101,8 @@ func TestLabelSelectorRetriever_GetMutatingWebhooks(t *testing.T) { }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() @@ -125,7 +130,8 @@ func TestLabelSelectorRetriever_GetMutatingWebhook_ReturnEmptyListIfNothingMatch } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1).Build() @@ -162,7 +168,8 @@ func TestLabelSelectorRetriever_GetValidatingWebhooks(t *testing.T) { }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1, vwh2).Build() @@ -190,7 +197,8 @@ func TestLabelSelectorRetriever_GetValidatingWebhook_ReturnEmptyListIfNothingMat } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1).Build() @@ -267,7 +275,8 @@ func TestResourceNameRetriever_GetCRDs(t *testing.T) { Spec: apiv1.CustomResourceDefinitionSpec{}, } scheme := runtime.NewScheme() - apiv1.AddToScheme(scheme) + err := apiv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() @@ -306,7 +315,8 @@ func TestResourceNameRetriever_GetCRDs_ContinueIfOneNotFound(t *testing.T) { Spec: apiv1.CustomResourceDefinitionSpec{}, } scheme := runtime.NewScheme() - apiv1.AddToScheme(scheme) + err := apiv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(crd1, crd2).Build() @@ -337,7 +347,8 @@ func TestResourceNameRetriever_GetMutatingWebhooks(t *testing.T) { }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() @@ -374,7 +385,8 @@ func TestResourceNameRetriever_GetMutatingWebhooks_ContinueIfOneNotFound(t *test }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() @@ -405,7 +417,8 @@ func TestResourceNameRetriever_GetValidatingWebhooks(t *testing.T) { }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vwh1, vwh2).Build() @@ -436,7 +449,8 @@ func TestResourceNameRetriever_GetValidatingWebhooks_ContinueIfOneNotFound(t *te }, } scheme := runtime.NewScheme() - admissionregistrationv1.AddToScheme(scheme) + err := admissionregistrationv1.AddToScheme(scheme) + require.Nil(t, err) fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(mwh1, mwh2).Build() diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go index beef246c45..97650d707b 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/webhook_cert_controller_test.go @@ -2,12 +2,12 @@ package keptnwebhookcontroller import ( "context" - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "testing" "time" "github.com/go-logr/logr/testr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/fake" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" diff --git a/klt-cert-manager/pkg/certificates/watcher_test.go b/klt-cert-manager/pkg/certificates/watcher_test.go index e9110ca4f0..74077407be 100644 --- a/klt-cert-manager/pkg/certificates/watcher_test.go +++ b/klt-cert-manager/pkg/certificates/watcher_test.go @@ -6,19 +6,18 @@ import ( "encoding/pem" "os" "path/filepath" - fakeClient "sigs.k8s.io/controller-runtime/pkg/client/fake" "testing" "time" "github.com/go-logr/logr/testr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates/fake" - "github.com/pkg/errors" "github.com/spf13/afero" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" + fakeClient "sigs.k8s.io/controller-runtime/pkg/client/fake" ) const CACERT = `-----BEGIN CERTIFICATE----- diff --git a/klt-cert-manager/pkg/common/config.go b/klt-cert-manager/pkg/common/config.go index 9f9f91604a..aec7b570c3 100644 --- a/klt-cert-manager/pkg/common/config.go +++ b/klt-cert-manager/pkg/common/config.go @@ -1,8 +1,9 @@ package common import ( - "github.com/pkg/errors" "time" + + "github.com/pkg/errors" ) const ( diff --git a/klt-cert-manager/pkg/webhook/builder.go b/klt-cert-manager/pkg/webhook/builder.go index b63f2c577b..c1961d528b 100644 --- a/klt-cert-manager/pkg/webhook/builder.go +++ b/klt-cert-manager/pkg/webhook/builder.go @@ -2,6 +2,7 @@ package webhook import ( "flag" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates" "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" diff --git a/klt-cert-manager/pkg/webhook/builder_test.go b/klt-cert-manager/pkg/webhook/builder_test.go index 0711692822..fcbbdb7663 100644 --- a/klt-cert-manager/pkg/webhook/builder_test.go +++ b/klt-cert-manager/pkg/webhook/builder_test.go @@ -2,17 +2,17 @@ package webhook import ( "context" + "testing" + fake2 "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/fake" + "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "sigs.k8s.io/controller-runtime/pkg/client" fakeClient "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "testing" - - "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" - "github.com/stretchr/testify/assert" ) func TestWebhookCommandBuilder(t *testing.T) { From 06ed238419fe75c4f034cf9688977121633da124 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 27 Apr 2023 08:50:05 +0200 Subject: [PATCH 08/19] initialize reconciler using New() method Signed-off-by: Florian Bacher --- klt-cert-manager/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/klt-cert-manager/main.go b/klt-cert-manager/main.go index 6c21ca6370..34e9059295 100644 --- a/klt-cert-manager/main.go +++ b/klt-cert-manager/main.go @@ -85,7 +85,7 @@ func main() { setupLog.Error(err, "unable to start manager") os.Exit(1) } - if err = (&keptnwebhookcontroller.KeptnWebhookCertificateReconciler{ + certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), CancelMgrFunc: nil, @@ -94,7 +94,8 @@ func main() { MatchLabels: map[string]string{ env.KLTLabelSelectorKey: env.KLTLabelSelectorValue, }, - }).SetupWithManager(mgr); err != nil { + }) + if err = certificateReconciler.SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Deployment") os.Exit(1) } From 8797b1b7a13e2f9ce2a08679e39af1f7d711fd20 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 27 Apr 2023 12:17:36 +0200 Subject: [PATCH 09/19] adapt filter predicate Signed-off-by: Florian Bacher --- .../keptnwebhookcertificate_controller.go | 20 +++++++++++++++---- klt-cert-manager/eventfilter/eventfilter.go | 15 ++++++++++++++ .../eventfilter/eventfilter_test.go | 18 +++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index 4440b3b842..0dbcfb9fb3 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -3,8 +3,6 @@ package keptnwebhookcontroller import ( "context" "fmt" - "reflect" - "github.com/go-logr/logr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/eventfilter" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" @@ -16,8 +14,10 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "reflect" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) @@ -25,6 +25,7 @@ type ObservedObjects struct { MutatingWebhooks []string ValidatingWebhooks []string CustomResourceDefinitions []string + Deployments []string } type CertificateReconcilerConfig struct { @@ -45,10 +46,18 @@ func NewReconciler(config CertificateReconcilerConfig) *KeptnWebhookCertificateR Log: config.Log, Namespace: config.Namespace, MatchLabels: config.MatchLabels, + FilterPredicate: getFilterPredicate(config), ResourceRetriever: NewResourceRetriever(config), } } +func getFilterPredicate(config CertificateReconcilerConfig) predicate.Predicate { + if config.WatchResources != nil && len(config.WatchResources.Deployments) > 0 { + return eventfilter.ForNamesAndNamespace(config.WatchResources.Deployments, config.Namespace) + } + return eventfilter.ForLabelsAndNamespace(labels.SelectorFromSet(config.MatchLabels), config.Namespace) +} + // KeptnWebhookCertificateReconciler reconciles a KeptnWebhookCertificate object type KeptnWebhookCertificateReconciler struct { Client client.Client @@ -57,6 +66,7 @@ type KeptnWebhookCertificateReconciler struct { Log logr.Logger Namespace string MatchLabels labels.Set + FilterPredicate predicate.Predicate ResourceRetriever IResourceRetriever } @@ -123,12 +133,14 @@ func (r *KeptnWebhookCertificateReconciler) Reconcile(ctx context.Context, reque // SetupWithManager sets up the controller with the Manager. func (r *KeptnWebhookCertificateReconciler) SetupWithManager(mgr ctrl.Manager) error { + if r.FilterPredicate == nil { + return errors.New("KeptnWebhookCertificateReconciler requires a FilterPredicate to be set") + } return ctrl.NewControllerManagedBy(mgr). For(&appsv1.Deployment{}). - WithEventFilter(eventfilter.ForLabelsAndNamespace(labels.SelectorFromSet(r.MatchLabels), r.Namespace)). + WithEventFilter(r.FilterPredicate). Owns(&corev1.Secret{}). Complete(r) - } func (r *KeptnWebhookCertificateReconciler) setCertificates(ctx context.Context, certSecret *certificateSecret) error { diff --git a/klt-cert-manager/eventfilter/eventfilter.go b/klt-cert-manager/eventfilter/eventfilter.go index 72d2a90fb5..d827135133 100644 --- a/klt-cert-manager/eventfilter/eventfilter.go +++ b/klt-cert-manager/eventfilter/eventfilter.go @@ -12,6 +12,12 @@ func ForLabelsAndNamespace(labels labels.Selector, namespace string) predicate.P }) } +func ForNamesAndNamespace(names []string, namespace string) predicate.Predicate { + return predicate.NewPredicateFuncs(func(object client.Object) bool { + return isInNamespace(object, namespace) && matchesName(object, names) + }) +} + func matchesLabels(object client.Object, selector labels.Selector) bool { return selector.Matches(labels.Set(object.GetLabels())) } @@ -19,3 +25,12 @@ func matchesLabels(object client.Object, selector labels.Selector) bool { func isInNamespace(object client.Object, namespace string) bool { return object.GetNamespace() == namespace } + +func matchesName(object client.Object, names []string) bool { + for _, name := range names { + if object.GetName() == name { + return true + } + } + return false +} diff --git a/klt-cert-manager/eventfilter/eventfilter_test.go b/klt-cert-manager/eventfilter/eventfilter_test.go index 647e5aa58f..ce2db7e23c 100644 --- a/klt-cert-manager/eventfilter/eventfilter_test.go +++ b/klt-cert-manager/eventfilter/eventfilter_test.go @@ -58,3 +58,21 @@ func TestForNamespace(t *testing.T) { assert.False(t, isInNamespace(deployment, testNamespace1)) assert.True(t, isInNamespace(deployment, testNamespace2)) } + +func Test_matchesName(t *testing.T) { + deployment := &v1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-deployment", + }, + } + + assert.True(t, matchesName(deployment, []string{"my-deployment"})) + + deployment = &v1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-other-deployment", + }, + } + + assert.False(t, matchesName(deployment, []string{"my-deployment"})) +} From 2641231911edd5bb33b8935d77052190ab3d65f0 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 27 Apr 2023 12:34:45 +0200 Subject: [PATCH 10/19] fix linting error Signed-off-by: Florian Bacher --- .../keptnwebhookcertificate_controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index 0dbcfb9fb3..6588ef2af0 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -3,6 +3,8 @@ package keptnwebhookcontroller import ( "context" "fmt" + "reflect" + "github.com/go-logr/logr" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/eventfilter" "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/common" @@ -14,7 +16,6 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - "reflect" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/predicate" From b1d094f473efd4e130ad5c25a774e1df40b3f5e0 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 27 Apr 2023 14:03:20 +0200 Subject: [PATCH 11/19] adapted readme Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 243 ++++++++++++++++++++++++++++++++++++- 1 file changed, 242 insertions(+), 1 deletion(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index 071ddb370e..780678d624 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -1,6 +1,6 @@ # klt-cert-manager -The Keptn certificate manager ensures that the webhooks in the Lifecycle Toolkit operator can obtain a valid certificate +The Keptn certificate manager ensures that the webhooks of an operator can obtain a valid certificate to access the Kubernetes API server. ## Description @@ -9,6 +9,247 @@ This `klt-cert-manager` operator should only be installed when paired with the L or above. The TLS certificate is mounted as a volume in the LT operator pod and is renewed every 12 hours or every time the LT operator deployment changes. +THe `klt-cert-manager` retrieves all `MutatingWebhookConfigurations`, `ValidatingWebhookConfigurations` and +`CustomResourceDefinitions` based on a label selector that can be defined using the following environment variables: + +- `LABEL_SELECTOR_KEY`: Label key used or identifying resources for certificate injection. +Default: `keptn.sh/inject-cert` +- `LABEL_SELECTOR_VALUE`: Label value used for identifying resources for certificate injection. +Default: `true`. + +Using these label selectors, `MutatingWebhookConfigurations`, `ValidatingWebhookConfigurations` and +`CustomResourceDefinitions` can be enabled for certificate injection by adding the required labels to their metadata: + +````yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + keptn.sh/inject-cert: true + name: keptnconfigs.options.keptn.sh +```` + +## Using the klt-cert-manager library + +The functionality provided by this operator can also be added to other operators by using the `klt-cert-manager` as +a library. To do this, add the library as a dependency to your application: + +```shell +go get github.com/keptn/lifecycle-toolkit/klt-cert-manager +``` + +Then, in your operator's setup logic, an instance of the `KeptnWebhookCertificateReconciler` can be +created and registered to your operator's controller manager: + +```golang +package main + +import ( + "flag" + "log" + "os" + + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" + // +kubebuilder:scaffold:imports +) + +func main() { + // operator setup ... + certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), + Namespace: "my-namespace", + MatchLabels: map[string]string{ + "inject-cert": "true", + }, + }) + if err = certificateReconciler.SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Deployment") + os.Exit(1) + } + //... +} +``` + +Using this approach will require the following `ClusterRole` permissions to be bound to your operator's ServiceAccount: + +```yaml +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: certificate-operator-role +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: certificate-operator-role + namespace: my-operator-system +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +``` + +The required permissions can also be reduced by only allowing access to a specific set of resources, by providing +the `KeptnWebhookCertificateReconciler` with a list of resources that should by enabled for certificate injection, +instead of specifying the `MatchLabels`: + +```golang +package main + +import ( + "flag" + "log" + "os" + + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" + // +kubebuilder:scaffold:imports +) + +func main() { + // operator setup ... + certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), + Namespace: "my-namespace", + WatchResources: &keptnwebhookcontroller.ObservedObjects{ + MutatingWebhooks: []string{"my-mwh-1", "my-mwh-2"}, + ValidatingWebhooks: []string{"my-vwh-1", "my-vwh-2"}, + CustomResourceDefinitions: []string{"my-crd-1", "my-crd-2"}, + Deployments: []string{"my-operator-deployment"}, + }, + }) + if err = certificateReconciler.SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Deployment") + os.Exit(1) + } + //... +} +``` + +Using this configuration, you can limit the required permissions as follows: + +```yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: certificate-operator-role +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: + - get + - patch + - update + - watch + resourceNames: + - my-mwh-1 + - my-mwh-2 +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - patch + - update + - watch + resourceNames: + - my-vwh-1 + - my-vwh-2 +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - patch + - update + - watch + resourceNames: + - my-crd-1 + - my-crd-2 +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: certificate-operator-role + namespace: my-operator-system +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +``` ## Getting Started From 774a16f25a0b0a877abb5ea7155b6258f045cf0b Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 28 Apr 2023 10:19:22 +0200 Subject: [PATCH 12/19] clean up dependencies Signed-off-by: Florian Bacher --- klt-cert-manager/go.mod | 43 +- klt-cert-manager/go.sum | 250 +++--- .../pkg/certificates/fake/watcher_mock.go | 63 ++ klt-cert-manager/pkg/certificates/watcher.go | 2 +- klt-cert-manager/pkg/fake/manager_mock.go | 763 +++++++++++++++++- .../pkg/fake/webhookmanager_mock.go | 71 ++ klt-cert-manager/pkg/webhook/builder_test.go | 4 +- klt-cert-manager/pkg/webhook/manager_test.go | 5 +- 8 files changed, 1033 insertions(+), 168 deletions(-) create mode 100644 klt-cert-manager/pkg/certificates/fake/watcher_mock.go create mode 100644 klt-cert-manager/pkg/fake/webhookmanager_mock.go diff --git a/klt-cert-manager/go.mod b/klt-cert-manager/go.mod index fcf23b93e8..c1681b9e91 100644 --- a/klt-cert-manager/go.mod +++ b/klt-cert-manager/go.mod @@ -6,6 +6,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/kelseyhightower/envconfig v1.4.0 github.com/pkg/errors v0.9.1 + github.com/spf13/afero v1.9.5 github.com/stretchr/testify v1.8.2 k8s.io/api v0.26.4 k8s.io/apiextensions-apiserver v0.26.4 @@ -15,55 +16,59 @@ require ( ) require ( + github.com/benbjohnson/clock v1.3.3 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // 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/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/swag v0.22.3 // 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.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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/onsi/ginkgo/v2 v2.9.2 // indirect + github.com/onsi/gomega v1.27.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_golang v1.15.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // 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/component-base v0.26.4 // indirect - k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect diff --git a/klt-cert-manager/go.sum b/klt-cert-manager/go.sum index 75b2706ff4..804aded04b 100644 --- a/klt-cert-manager/go.sum +++ b/klt-cert-manager/go.sum @@ -3,6 +3,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -13,6 +14,9 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -30,58 +34,55 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +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/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/benbjohnson/clock v1.3.3 h1:g+rSsSaAzhHJYcIQE78hJ3AhyjjtQvleKDjlhdBnIhc= +github.com/benbjohnson/clock v1.3.3/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/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/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.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/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/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -94,10 +95,9 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +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-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -128,12 +128,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD 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 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +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/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= @@ -141,15 +142,17 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -157,117 +160,98 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= 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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/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= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= 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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -278,20 +262,25 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 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 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -314,6 +303,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -322,6 +312,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= @@ -331,9 +323,12 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= 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= @@ -347,12 +342,9 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -361,26 +353,28 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -394,6 +388,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -444,9 +441,17 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= 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= @@ -469,6 +474,9 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -500,13 +508,21 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -519,6 +535,13 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= 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= @@ -531,29 +554,24 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 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.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/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.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= @@ -573,8 +591,8 @@ k8s.io/client-go v0.26.4 h1:/7P/IbGBuT73A+G97trf44NTPSNqvuBREpOfdLbHvD4= k8s.io/client-go v0.26.4/go.mod h1:6qOItWm3EwxJdl/8p5t7FWtWUOwyMdA8N9ekbW4idpI= k8s.io/component-base v0.26.4 h1:Bg2xzyXNKL3eAuiTEu3XE198d6z22ENgFgGQv2GGOUk= k8s.io/component-base v0.26.4/go.mod h1:lTuWL1Xz/a4e80gmIC3YZG2JCO4xNwtKWHJWeJmsq20= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +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-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= diff --git a/klt-cert-manager/pkg/certificates/fake/watcher_mock.go b/klt-cert-manager/pkg/certificates/fake/watcher_mock.go new file mode 100644 index 0000000000..65697b6504 --- /dev/null +++ b/klt-cert-manager/pkg/certificates/fake/watcher_mock.go @@ -0,0 +1,63 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fake + +import ( + "sync" +) + +// MockCertificateWatcher is a mock implementation of certificates.ICertificateWatcher. +// +// func TestSomethingThatUsesICertificateWatcher(t *testing.T) { +// +// // make and configure a mocked certificates.ICertificateWatcher +// mockedICertificateWatcher := &MockCertificateWatcher{ +// WaitForCertificatesFunc: func() { +// panic("mock out the WaitForCertificates method") +// }, +// } +// +// // use mockedICertificateWatcher in code that requires certificates.ICertificateWatcher +// // and then make assertions. +// +// } +type MockCertificateWatcher struct { + // WaitForCertificatesFunc mocks the WaitForCertificates method. + WaitForCertificatesFunc func() + + // calls tracks calls to the methods. + calls struct { + // WaitForCertificates holds details about calls to the WaitForCertificates method. + WaitForCertificates []struct { + } + } + lockWaitForCertificates sync.RWMutex +} + +// WaitForCertificates calls WaitForCertificatesFunc. +func (mock *MockCertificateWatcher) WaitForCertificates() { + if mock.WaitForCertificatesFunc == nil { + panic("MockCertificateWatcher.WaitForCertificatesFunc: method is nil but ICertificateWatcher.WaitForCertificates was just called") + } + callInfo := struct { + }{} + mock.lockWaitForCertificates.Lock() + mock.calls.WaitForCertificates = append(mock.calls.WaitForCertificates, callInfo) + mock.lockWaitForCertificates.Unlock() + mock.WaitForCertificatesFunc() +} + +// WaitForCertificatesCalls gets all the calls that were made to WaitForCertificates. +// Check the length with: +// +// len(mockedICertificateWatcher.WaitForCertificatesCalls()) +func (mock *MockCertificateWatcher) WaitForCertificatesCalls() []struct { +} { + var calls []struct { + } + mock.lockWaitForCertificates.RLock() + calls = mock.calls.WaitForCertificates + mock.lockWaitForCertificates.RUnlock() + return calls +} diff --git a/klt-cert-manager/pkg/certificates/watcher.go b/klt-cert-manager/pkg/certificates/watcher.go index ef7b67ae96..572deb154a 100644 --- a/klt-cert-manager/pkg/certificates/watcher.go +++ b/klt-cert-manager/pkg/certificates/watcher.go @@ -23,7 +23,7 @@ const ( CertThreshold = 5 * time.Minute ) -//go:generate moq -pkg fake -skip-ensure -out ../fake/manager_mock.go . ICertificateWatcher:MockCertificateWatcher +//go:generate moq -pkg fake -skip-ensure -out ./fake/watcher_mock.go . ICertificateWatcher:MockCertificateWatcher type ICertificateWatcher interface { WaitForCertificates() } diff --git a/klt-cert-manager/pkg/fake/manager_mock.go b/klt-cert-manager/pkg/fake/manager_mock.go index 65697b6504..d136251930 100644 --- a/klt-cert-manager/pkg/fake/manager_mock.go +++ b/klt-cert-manager/pkg/fake/manager_mock.go @@ -4,60 +4,769 @@ package fake import ( + "context" + "github.com/go-logr/logr" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/record" + "net/http" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1" + "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/webhook" "sync" ) -// MockCertificateWatcher is a mock implementation of certificates.ICertificateWatcher. +// MockManager is a mock implementation of webhook.IManager. // -// func TestSomethingThatUsesICertificateWatcher(t *testing.T) { +// func TestSomethingThatUsesIManager(t *testing.T) { // -// // make and configure a mocked certificates.ICertificateWatcher -// mockedICertificateWatcher := &MockCertificateWatcher{ -// WaitForCertificatesFunc: func() { -// panic("mock out the WaitForCertificates method") +// // make and configure a mocked webhook.IManager +// mockedIManager := &MockManager{ +// AddFunc: func(runnable manager.Runnable) error { +// panic("mock out the Add method") +// }, +// AddHealthzCheckFunc: func(name string, check healthz.Checker) error { +// panic("mock out the AddHealthzCheck method") +// }, +// AddMetricsExtraHandlerFunc: func(path string, handler http.Handler) error { +// panic("mock out the AddMetricsExtraHandler method") +// }, +// AddReadyzCheckFunc: func(name string, check healthz.Checker) error { +// panic("mock out the AddReadyzCheck method") +// }, +// ElectedFunc: func() <-chan struct{} { +// panic("mock out the Elected method") +// }, +// GetAPIReaderFunc: func() client.Reader { +// panic("mock out the GetAPIReader method") +// }, +// GetCacheFunc: func() cache.Cache { +// panic("mock out the GetCache method") +// }, +// GetClientFunc: func() client.Client { +// panic("mock out the GetClient method") +// }, +// GetConfigFunc: func() *rest.Config { +// panic("mock out the GetConfig method") +// }, +// GetControllerOptionsFunc: func() v1alpha1.ControllerConfigurationSpec { +// panic("mock out the GetControllerOptions method") +// }, +// GetEventRecorderForFunc: func(name string) record.EventRecorder { +// panic("mock out the GetEventRecorderFor method") +// }, +// GetFieldIndexerFunc: func() client.FieldIndexer { +// panic("mock out the GetFieldIndexer method") +// }, +// GetLoggerFunc: func() logr.Logger { +// panic("mock out the GetLogger method") +// }, +// GetRESTMapperFunc: func() meta.RESTMapper { +// panic("mock out the GetRESTMapper method") +// }, +// GetSchemeFunc: func() *runtime.Scheme { +// panic("mock out the GetScheme method") +// }, +// GetWebhookServerFunc: func() *webhook.Server { +// panic("mock out the GetWebhookServer method") +// }, +// SetFieldsFunc: func(ifaceVal interface{}) error { +// panic("mock out the SetFields method") +// }, +// StartFunc: func(ctx context.Context) error { +// panic("mock out the Start method") // }, // } // -// // use mockedICertificateWatcher in code that requires certificates.ICertificateWatcher +// // use mockedIManager in code that requires webhook.IManager // // and then make assertions. // // } -type MockCertificateWatcher struct { - // WaitForCertificatesFunc mocks the WaitForCertificates method. - WaitForCertificatesFunc func() +type MockManager struct { + // AddFunc mocks the Add method. + AddFunc func(runnable manager.Runnable) error + + // AddHealthzCheckFunc mocks the AddHealthzCheck method. + AddHealthzCheckFunc func(name string, check healthz.Checker) error + + // AddMetricsExtraHandlerFunc mocks the AddMetricsExtraHandler method. + AddMetricsExtraHandlerFunc func(path string, handler http.Handler) error + + // AddReadyzCheckFunc mocks the AddReadyzCheck method. + AddReadyzCheckFunc func(name string, check healthz.Checker) error + + // ElectedFunc mocks the Elected method. + ElectedFunc func() <-chan struct{} + + // GetAPIReaderFunc mocks the GetAPIReader method. + GetAPIReaderFunc func() client.Reader + + // GetCacheFunc mocks the GetCache method. + GetCacheFunc func() cache.Cache + + // GetClientFunc mocks the GetClient method. + GetClientFunc func() client.Client + + // GetConfigFunc mocks the GetConfig method. + GetConfigFunc func() *rest.Config + + // GetControllerOptionsFunc mocks the GetControllerOptions method. + GetControllerOptionsFunc func() v1alpha1.ControllerConfigurationSpec + + // GetEventRecorderForFunc mocks the GetEventRecorderFor method. + GetEventRecorderForFunc func(name string) record.EventRecorder + + // GetFieldIndexerFunc mocks the GetFieldIndexer method. + GetFieldIndexerFunc func() client.FieldIndexer + + // GetLoggerFunc mocks the GetLogger method. + GetLoggerFunc func() logr.Logger + + // GetRESTMapperFunc mocks the GetRESTMapper method. + GetRESTMapperFunc func() meta.RESTMapper + + // GetSchemeFunc mocks the GetScheme method. + GetSchemeFunc func() *runtime.Scheme + + // GetWebhookServerFunc mocks the GetWebhookServer method. + GetWebhookServerFunc func() *webhook.Server + + // SetFieldsFunc mocks the SetFields method. + SetFieldsFunc func(ifaceVal interface{}) error + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context) error // calls tracks calls to the methods. calls struct { - // WaitForCertificates holds details about calls to the WaitForCertificates method. - WaitForCertificates []struct { + // Add holds details about calls to the Add method. + Add []struct { + // Runnable is the runnable argument value. + Runnable manager.Runnable } + // AddHealthzCheck holds details about calls to the AddHealthzCheck method. + AddHealthzCheck []struct { + // Name is the name argument value. + Name string + // Check is the check argument value. + Check healthz.Checker + } + // AddMetricsExtraHandler holds details about calls to the AddMetricsExtraHandler method. + AddMetricsExtraHandler []struct { + // Path is the path argument value. + Path string + // Handler is the handler argument value. + Handler http.Handler + } + // AddReadyzCheck holds details about calls to the AddReadyzCheck method. + AddReadyzCheck []struct { + // Name is the name argument value. + Name string + // Check is the check argument value. + Check healthz.Checker + } + // Elected holds details about calls to the Elected method. + Elected []struct { + } + // GetAPIReader holds details about calls to the GetAPIReader method. + GetAPIReader []struct { + } + // GetCache holds details about calls to the GetCache method. + GetCache []struct { + } + // GetClient holds details about calls to the GetClient method. + GetClient []struct { + } + // GetConfig holds details about calls to the GetConfig method. + GetConfig []struct { + } + // GetControllerOptions holds details about calls to the GetControllerOptions method. + GetControllerOptions []struct { + } + // GetEventRecorderFor holds details about calls to the GetEventRecorderFor method. + GetEventRecorderFor []struct { + // Name is the name argument value. + Name string + } + // GetFieldIndexer holds details about calls to the GetFieldIndexer method. + GetFieldIndexer []struct { + } + // GetLogger holds details about calls to the GetLogger method. + GetLogger []struct { + } + // GetRESTMapper holds details about calls to the GetRESTMapper method. + GetRESTMapper []struct { + } + // GetScheme holds details about calls to the GetScheme method. + GetScheme []struct { + } + // GetWebhookServer holds details about calls to the GetWebhookServer method. + GetWebhookServer []struct { + } + // SetFields holds details about calls to the SetFields method. + SetFields []struct { + // IfaceVal is the ifaceVal argument value. + IfaceVal interface{} + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } + lockAdd sync.RWMutex + lockAddHealthzCheck sync.RWMutex + lockAddMetricsExtraHandler sync.RWMutex + lockAddReadyzCheck sync.RWMutex + lockElected sync.RWMutex + lockGetAPIReader sync.RWMutex + lockGetCache sync.RWMutex + lockGetClient sync.RWMutex + lockGetConfig sync.RWMutex + lockGetControllerOptions sync.RWMutex + lockGetEventRecorderFor sync.RWMutex + lockGetFieldIndexer sync.RWMutex + lockGetLogger sync.RWMutex + lockGetRESTMapper sync.RWMutex + lockGetScheme sync.RWMutex + lockGetWebhookServer sync.RWMutex + lockSetFields sync.RWMutex + lockStart sync.RWMutex +} + +// Add calls AddFunc. +func (mock *MockManager) Add(runnable manager.Runnable) error { + if mock.AddFunc == nil { + panic("MockManager.AddFunc: method is nil but IManager.Add was just called") + } + callInfo := struct { + Runnable manager.Runnable + }{ + Runnable: runnable, + } + mock.lockAdd.Lock() + mock.calls.Add = append(mock.calls.Add, callInfo) + mock.lockAdd.Unlock() + return mock.AddFunc(runnable) +} + +// AddCalls gets all the calls that were made to Add. +// Check the length with: +// +// len(mockedIManager.AddCalls()) +func (mock *MockManager) AddCalls() []struct { + Runnable manager.Runnable +} { + var calls []struct { + Runnable manager.Runnable + } + mock.lockAdd.RLock() + calls = mock.calls.Add + mock.lockAdd.RUnlock() + return calls +} + +// AddHealthzCheck calls AddHealthzCheckFunc. +func (mock *MockManager) AddHealthzCheck(name string, check healthz.Checker) error { + if mock.AddHealthzCheckFunc == nil { + panic("MockManager.AddHealthzCheckFunc: method is nil but IManager.AddHealthzCheck was just called") + } + callInfo := struct { + Name string + Check healthz.Checker + }{ + Name: name, + Check: check, + } + mock.lockAddHealthzCheck.Lock() + mock.calls.AddHealthzCheck = append(mock.calls.AddHealthzCheck, callInfo) + mock.lockAddHealthzCheck.Unlock() + return mock.AddHealthzCheckFunc(name, check) +} + +// AddHealthzCheckCalls gets all the calls that were made to AddHealthzCheck. +// Check the length with: +// +// len(mockedIManager.AddHealthzCheckCalls()) +func (mock *MockManager) AddHealthzCheckCalls() []struct { + Name string + Check healthz.Checker +} { + var calls []struct { + Name string + Check healthz.Checker + } + mock.lockAddHealthzCheck.RLock() + calls = mock.calls.AddHealthzCheck + mock.lockAddHealthzCheck.RUnlock() + return calls +} + +// AddMetricsExtraHandler calls AddMetricsExtraHandlerFunc. +func (mock *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error { + if mock.AddMetricsExtraHandlerFunc == nil { + panic("MockManager.AddMetricsExtraHandlerFunc: method is nil but IManager.AddMetricsExtraHandler was just called") + } + callInfo := struct { + Path string + Handler http.Handler + }{ + Path: path, + Handler: handler, + } + mock.lockAddMetricsExtraHandler.Lock() + mock.calls.AddMetricsExtraHandler = append(mock.calls.AddMetricsExtraHandler, callInfo) + mock.lockAddMetricsExtraHandler.Unlock() + return mock.AddMetricsExtraHandlerFunc(path, handler) +} + +// AddMetricsExtraHandlerCalls gets all the calls that were made to AddMetricsExtraHandler. +// Check the length with: +// +// len(mockedIManager.AddMetricsExtraHandlerCalls()) +func (mock *MockManager) AddMetricsExtraHandlerCalls() []struct { + Path string + Handler http.Handler +} { + var calls []struct { + Path string + Handler http.Handler + } + mock.lockAddMetricsExtraHandler.RLock() + calls = mock.calls.AddMetricsExtraHandler + mock.lockAddMetricsExtraHandler.RUnlock() + return calls +} + +// AddReadyzCheck calls AddReadyzCheckFunc. +func (mock *MockManager) AddReadyzCheck(name string, check healthz.Checker) error { + if mock.AddReadyzCheckFunc == nil { + panic("MockManager.AddReadyzCheckFunc: method is nil but IManager.AddReadyzCheck was just called") + } + callInfo := struct { + Name string + Check healthz.Checker + }{ + Name: name, + Check: check, + } + mock.lockAddReadyzCheck.Lock() + mock.calls.AddReadyzCheck = append(mock.calls.AddReadyzCheck, callInfo) + mock.lockAddReadyzCheck.Unlock() + return mock.AddReadyzCheckFunc(name, check) +} + +// AddReadyzCheckCalls gets all the calls that were made to AddReadyzCheck. +// Check the length with: +// +// len(mockedIManager.AddReadyzCheckCalls()) +func (mock *MockManager) AddReadyzCheckCalls() []struct { + Name string + Check healthz.Checker +} { + var calls []struct { + Name string + Check healthz.Checker + } + mock.lockAddReadyzCheck.RLock() + calls = mock.calls.AddReadyzCheck + mock.lockAddReadyzCheck.RUnlock() + return calls +} + +// Elected calls ElectedFunc. +func (mock *MockManager) Elected() <-chan struct{} { + if mock.ElectedFunc == nil { + panic("MockManager.ElectedFunc: method is nil but IManager.Elected was just called") + } + callInfo := struct { + }{} + mock.lockElected.Lock() + mock.calls.Elected = append(mock.calls.Elected, callInfo) + mock.lockElected.Unlock() + return mock.ElectedFunc() +} + +// ElectedCalls gets all the calls that were made to Elected. +// Check the length with: +// +// len(mockedIManager.ElectedCalls()) +func (mock *MockManager) ElectedCalls() []struct { +} { + var calls []struct { + } + mock.lockElected.RLock() + calls = mock.calls.Elected + mock.lockElected.RUnlock() + return calls +} + +// GetAPIReader calls GetAPIReaderFunc. +func (mock *MockManager) GetAPIReader() client.Reader { + if mock.GetAPIReaderFunc == nil { + panic("MockManager.GetAPIReaderFunc: method is nil but IManager.GetAPIReader was just called") + } + callInfo := struct { + }{} + mock.lockGetAPIReader.Lock() + mock.calls.GetAPIReader = append(mock.calls.GetAPIReader, callInfo) + mock.lockGetAPIReader.Unlock() + return mock.GetAPIReaderFunc() +} + +// GetAPIReaderCalls gets all the calls that were made to GetAPIReader. +// Check the length with: +// +// len(mockedIManager.GetAPIReaderCalls()) +func (mock *MockManager) GetAPIReaderCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAPIReader.RLock() + calls = mock.calls.GetAPIReader + mock.lockGetAPIReader.RUnlock() + return calls +} + +// GetCache calls GetCacheFunc. +func (mock *MockManager) GetCache() cache.Cache { + if mock.GetCacheFunc == nil { + panic("MockManager.GetCacheFunc: method is nil but IManager.GetCache was just called") + } + callInfo := struct { + }{} + mock.lockGetCache.Lock() + mock.calls.GetCache = append(mock.calls.GetCache, callInfo) + mock.lockGetCache.Unlock() + return mock.GetCacheFunc() +} + +// GetCacheCalls gets all the calls that were made to GetCache. +// Check the length with: +// +// len(mockedIManager.GetCacheCalls()) +func (mock *MockManager) GetCacheCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCache.RLock() + calls = mock.calls.GetCache + mock.lockGetCache.RUnlock() + return calls +} + +// GetClient calls GetClientFunc. +func (mock *MockManager) GetClient() client.Client { + if mock.GetClientFunc == nil { + panic("MockManager.GetClientFunc: method is nil but IManager.GetClient was just called") + } + callInfo := struct { + }{} + mock.lockGetClient.Lock() + mock.calls.GetClient = append(mock.calls.GetClient, callInfo) + mock.lockGetClient.Unlock() + return mock.GetClientFunc() +} + +// GetClientCalls gets all the calls that were made to GetClient. +// Check the length with: +// +// len(mockedIManager.GetClientCalls()) +func (mock *MockManager) GetClientCalls() []struct { +} { + var calls []struct { + } + mock.lockGetClient.RLock() + calls = mock.calls.GetClient + mock.lockGetClient.RUnlock() + return calls +} + +// GetConfig calls GetConfigFunc. +func (mock *MockManager) GetConfig() *rest.Config { + if mock.GetConfigFunc == nil { + panic("MockManager.GetConfigFunc: method is nil but IManager.GetConfig was just called") + } + callInfo := struct { + }{} + mock.lockGetConfig.Lock() + mock.calls.GetConfig = append(mock.calls.GetConfig, callInfo) + mock.lockGetConfig.Unlock() + return mock.GetConfigFunc() +} + +// GetConfigCalls gets all the calls that were made to GetConfig. +// Check the length with: +// +// len(mockedIManager.GetConfigCalls()) +func (mock *MockManager) GetConfigCalls() []struct { +} { + var calls []struct { + } + mock.lockGetConfig.RLock() + calls = mock.calls.GetConfig + mock.lockGetConfig.RUnlock() + return calls +} + +// GetControllerOptions calls GetControllerOptionsFunc. +func (mock *MockManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec { + if mock.GetControllerOptionsFunc == nil { + panic("MockManager.GetControllerOptionsFunc: method is nil but IManager.GetControllerOptions was just called") + } + callInfo := struct { + }{} + mock.lockGetControllerOptions.Lock() + mock.calls.GetControllerOptions = append(mock.calls.GetControllerOptions, callInfo) + mock.lockGetControllerOptions.Unlock() + return mock.GetControllerOptionsFunc() +} + +// GetControllerOptionsCalls gets all the calls that were made to GetControllerOptions. +// Check the length with: +// +// len(mockedIManager.GetControllerOptionsCalls()) +func (mock *MockManager) GetControllerOptionsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetControllerOptions.RLock() + calls = mock.calls.GetControllerOptions + mock.lockGetControllerOptions.RUnlock() + return calls +} + +// GetEventRecorderFor calls GetEventRecorderForFunc. +func (mock *MockManager) GetEventRecorderFor(name string) record.EventRecorder { + if mock.GetEventRecorderForFunc == nil { + panic("MockManager.GetEventRecorderForFunc: method is nil but IManager.GetEventRecorderFor was just called") + } + callInfo := struct { + Name string + }{ + Name: name, + } + mock.lockGetEventRecorderFor.Lock() + mock.calls.GetEventRecorderFor = append(mock.calls.GetEventRecorderFor, callInfo) + mock.lockGetEventRecorderFor.Unlock() + return mock.GetEventRecorderForFunc(name) +} + +// GetEventRecorderForCalls gets all the calls that were made to GetEventRecorderFor. +// Check the length with: +// +// len(mockedIManager.GetEventRecorderForCalls()) +func (mock *MockManager) GetEventRecorderForCalls() []struct { + Name string +} { + var calls []struct { + Name string + } + mock.lockGetEventRecorderFor.RLock() + calls = mock.calls.GetEventRecorderFor + mock.lockGetEventRecorderFor.RUnlock() + return calls +} + +// GetFieldIndexer calls GetFieldIndexerFunc. +func (mock *MockManager) GetFieldIndexer() client.FieldIndexer { + if mock.GetFieldIndexerFunc == nil { + panic("MockManager.GetFieldIndexerFunc: method is nil but IManager.GetFieldIndexer was just called") + } + callInfo := struct { + }{} + mock.lockGetFieldIndexer.Lock() + mock.calls.GetFieldIndexer = append(mock.calls.GetFieldIndexer, callInfo) + mock.lockGetFieldIndexer.Unlock() + return mock.GetFieldIndexerFunc() +} + +// GetFieldIndexerCalls gets all the calls that were made to GetFieldIndexer. +// Check the length with: +// +// len(mockedIManager.GetFieldIndexerCalls()) +func (mock *MockManager) GetFieldIndexerCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFieldIndexer.RLock() + calls = mock.calls.GetFieldIndexer + mock.lockGetFieldIndexer.RUnlock() + return calls +} + +// GetLogger calls GetLoggerFunc. +func (mock *MockManager) GetLogger() logr.Logger { + if mock.GetLoggerFunc == nil { + panic("MockManager.GetLoggerFunc: method is nil but IManager.GetLogger was just called") + } + callInfo := struct { + }{} + mock.lockGetLogger.Lock() + mock.calls.GetLogger = append(mock.calls.GetLogger, callInfo) + mock.lockGetLogger.Unlock() + return mock.GetLoggerFunc() +} + +// GetLoggerCalls gets all the calls that were made to GetLogger. +// Check the length with: +// +// len(mockedIManager.GetLoggerCalls()) +func (mock *MockManager) GetLoggerCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLogger.RLock() + calls = mock.calls.GetLogger + mock.lockGetLogger.RUnlock() + return calls +} + +// GetRESTMapper calls GetRESTMapperFunc. +func (mock *MockManager) GetRESTMapper() meta.RESTMapper { + if mock.GetRESTMapperFunc == nil { + panic("MockManager.GetRESTMapperFunc: method is nil but IManager.GetRESTMapper was just called") + } + callInfo := struct { + }{} + mock.lockGetRESTMapper.Lock() + mock.calls.GetRESTMapper = append(mock.calls.GetRESTMapper, callInfo) + mock.lockGetRESTMapper.Unlock() + return mock.GetRESTMapperFunc() +} + +// GetRESTMapperCalls gets all the calls that were made to GetRESTMapper. +// Check the length with: +// +// len(mockedIManager.GetRESTMapperCalls()) +func (mock *MockManager) GetRESTMapperCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRESTMapper.RLock() + calls = mock.calls.GetRESTMapper + mock.lockGetRESTMapper.RUnlock() + return calls +} + +// GetScheme calls GetSchemeFunc. +func (mock *MockManager) GetScheme() *runtime.Scheme { + if mock.GetSchemeFunc == nil { + panic("MockManager.GetSchemeFunc: method is nil but IManager.GetScheme was just called") + } + callInfo := struct { + }{} + mock.lockGetScheme.Lock() + mock.calls.GetScheme = append(mock.calls.GetScheme, callInfo) + mock.lockGetScheme.Unlock() + return mock.GetSchemeFunc() +} + +// GetSchemeCalls gets all the calls that were made to GetScheme. +// Check the length with: +// +// len(mockedIManager.GetSchemeCalls()) +func (mock *MockManager) GetSchemeCalls() []struct { +} { + var calls []struct { } - lockWaitForCertificates sync.RWMutex + mock.lockGetScheme.RLock() + calls = mock.calls.GetScheme + mock.lockGetScheme.RUnlock() + return calls } -// WaitForCertificates calls WaitForCertificatesFunc. -func (mock *MockCertificateWatcher) WaitForCertificates() { - if mock.WaitForCertificatesFunc == nil { - panic("MockCertificateWatcher.WaitForCertificatesFunc: method is nil but ICertificateWatcher.WaitForCertificates was just called") +// GetWebhookServer calls GetWebhookServerFunc. +func (mock *MockManager) GetWebhookServer() *webhook.Server { + if mock.GetWebhookServerFunc == nil { + panic("MockManager.GetWebhookServerFunc: method is nil but IManager.GetWebhookServer was just called") } callInfo := struct { }{} - mock.lockWaitForCertificates.Lock() - mock.calls.WaitForCertificates = append(mock.calls.WaitForCertificates, callInfo) - mock.lockWaitForCertificates.Unlock() - mock.WaitForCertificatesFunc() + mock.lockGetWebhookServer.Lock() + mock.calls.GetWebhookServer = append(mock.calls.GetWebhookServer, callInfo) + mock.lockGetWebhookServer.Unlock() + return mock.GetWebhookServerFunc() +} + +// GetWebhookServerCalls gets all the calls that were made to GetWebhookServer. +// Check the length with: +// +// len(mockedIManager.GetWebhookServerCalls()) +func (mock *MockManager) GetWebhookServerCalls() []struct { +} { + var calls []struct { + } + mock.lockGetWebhookServer.RLock() + calls = mock.calls.GetWebhookServer + mock.lockGetWebhookServer.RUnlock() + return calls +} + +// SetFields calls SetFieldsFunc. +func (mock *MockManager) SetFields(ifaceVal interface{}) error { + if mock.SetFieldsFunc == nil { + panic("MockManager.SetFieldsFunc: method is nil but IManager.SetFields was just called") + } + callInfo := struct { + IfaceVal interface{} + }{ + IfaceVal: ifaceVal, + } + mock.lockSetFields.Lock() + mock.calls.SetFields = append(mock.calls.SetFields, callInfo) + mock.lockSetFields.Unlock() + return mock.SetFieldsFunc(ifaceVal) +} + +// SetFieldsCalls gets all the calls that were made to SetFields. +// Check the length with: +// +// len(mockedIManager.SetFieldsCalls()) +func (mock *MockManager) SetFieldsCalls() []struct { + IfaceVal interface{} +} { + var calls []struct { + IfaceVal interface{} + } + mock.lockSetFields.RLock() + calls = mock.calls.SetFields + mock.lockSetFields.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *MockManager) Start(ctx context.Context) error { + if mock.StartFunc == nil { + panic("MockManager.StartFunc: method is nil but IManager.Start was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + mock.lockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + mock.lockStart.Unlock() + return mock.StartFunc(ctx) } -// WaitForCertificatesCalls gets all the calls that were made to WaitForCertificates. +// StartCalls gets all the calls that were made to Start. // Check the length with: // -// len(mockedICertificateWatcher.WaitForCertificatesCalls()) -func (mock *MockCertificateWatcher) WaitForCertificatesCalls() []struct { +// len(mockedIManager.StartCalls()) +func (mock *MockManager) StartCalls() []struct { + Ctx context.Context } { var calls []struct { + Ctx context.Context } - mock.lockWaitForCertificates.RLock() - calls = mock.calls.WaitForCertificates - mock.lockWaitForCertificates.RUnlock() + mock.lockStart.RLock() + calls = mock.calls.Start + mock.lockStart.RUnlock() return calls } diff --git a/klt-cert-manager/pkg/fake/webhookmanager_mock.go b/klt-cert-manager/pkg/fake/webhookmanager_mock.go new file mode 100644 index 0000000000..5052c98c48 --- /dev/null +++ b/klt-cert-manager/pkg/fake/webhookmanager_mock.go @@ -0,0 +1,71 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fake + +import ( + "sigs.k8s.io/controller-runtime/pkg/manager" + "sync" +) + +// MockWebhookManager is a mock implementation of webhook.Provider. +// +// func TestSomethingThatUsesProvider(t *testing.T) { +// +// // make and configure a mocked webhook.Provider +// mockedProvider := &MockWebhookManager{ +// SetupWebhookServerFunc: func(mgr manager.Manager) { +// panic("mock out the SetupWebhookServer method") +// }, +// } +// +// // use mockedProvider in code that requires webhook.Provider +// // and then make assertions. +// +// } +type MockWebhookManager struct { + // SetupWebhookServerFunc mocks the SetupWebhookServer method. + SetupWebhookServerFunc func(mgr manager.Manager) + + // calls tracks calls to the methods. + calls struct { + // SetupWebhookServer holds details about calls to the SetupWebhookServer method. + SetupWebhookServer []struct { + // Mgr is the mgr argument value. + Mgr manager.Manager + } + } + lockSetupWebhookServer sync.RWMutex +} + +// SetupWebhookServer calls SetupWebhookServerFunc. +func (mock *MockWebhookManager) SetupWebhookServer(mgr manager.Manager) { + if mock.SetupWebhookServerFunc == nil { + panic("MockWebhookManager.SetupWebhookServerFunc: method is nil but Provider.SetupWebhookServer was just called") + } + callInfo := struct { + Mgr manager.Manager + }{ + Mgr: mgr, + } + mock.lockSetupWebhookServer.Lock() + mock.calls.SetupWebhookServer = append(mock.calls.SetupWebhookServer, callInfo) + mock.lockSetupWebhookServer.Unlock() + mock.SetupWebhookServerFunc(mgr) +} + +// SetupWebhookServerCalls gets all the calls that were made to SetupWebhookServer. +// Check the length with: +// +// len(mockedProvider.SetupWebhookServerCalls()) +func (mock *MockWebhookManager) SetupWebhookServerCalls() []struct { + Mgr manager.Manager +} { + var calls []struct { + Mgr manager.Manager + } + mock.lockSetupWebhookServer.RLock() + calls = mock.calls.SetupWebhookServer + mock.lockSetupWebhookServer.RUnlock() + return calls +} diff --git a/klt-cert-manager/pkg/webhook/builder_test.go b/klt-cert-manager/pkg/webhook/builder_test.go index fcbbdb7663..ed1223d859 100644 --- a/klt-cert-manager/pkg/webhook/builder_test.go +++ b/klt-cert-manager/pkg/webhook/builder_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - fake2 "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/fake" - "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" + fake2 "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/certificates/fake" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/fake" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/klt-cert-manager/pkg/webhook/manager_test.go b/klt-cert-manager/pkg/webhook/manager_test.go index 3e0913648e..97c39ee172 100644 --- a/klt-cert-manager/pkg/webhook/manager_test.go +++ b/klt-cert-manager/pkg/webhook/manager_test.go @@ -3,8 +3,7 @@ package webhook import ( "testing" - "github.com/keptn/lifecycle-toolkit/operator/cmd/fake" - cmdManager "github.com/keptn/lifecycle-toolkit/operator/cmd/manager" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/fake" "github.com/stretchr/testify/assert" "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -13,7 +12,7 @@ import ( func TestCreateOptions(t *testing.T) { t.Run("implements interface", func(t *testing.T) { - var provider cmdManager.Provider = NewWebhookManagerProvider("certs-dir", "key-file", "cert-file") + var provider Provider = NewWebhookManagerProvider("certs-dir", "key-file", "cert-file") providerImpl := provider.(WebhookProvider) assert.Equal(t, "certs-dir", providerImpl.certificateDirectory) From 7b30f07332eb22e90b31a75d8232bf653ee7a9e1 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 28 Apr 2023 11:08:58 +0200 Subject: [PATCH 13/19] adapted readme Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index 780678d624..b0ac6d8b6c 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -48,18 +48,20 @@ import ( "flag" "log" "os" - + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/webhook" // +kubebuilder:scaffold:imports ) func main() { // operator setup ... certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), - Namespace: "my-namespace", + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), + Namespace: "my-namespace", MatchLabels: map[string]string{ "inject-cert": "true", }, @@ -69,6 +71,19 @@ func main() { os.Exit(1) } //... + // register mutating/validating webhooks + webhookBuilder := webhook.NewWebhookBuilder(). + SetNamespace(env.PodNamespace). + SetPodName(env.PodName). + SetConfigProvider(cmdConfig.NewKubeConfigProvider()) + + setupLog.Info("starting webhook and manager") + if err := webhookBuilder.Run(mgr, map[string]*admission.Webhook{ + "/webhook-path": &webhook.Admission{}, + }}); err != nil { + setupLog.Error(err, "problem running manager") + os.Exit(1) + } } ``` From cd461b74b6d14dabeb6312c10ec11a0e4d6ca0d3 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 28 Apr 2023 11:13:22 +0200 Subject: [PATCH 14/19] markdown lint Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 77 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index b0ac6d8b6c..c600a9a3cc 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -12,7 +12,7 @@ operator deployment changes. THe `klt-cert-manager` retrieves all `MutatingWebhookConfigurations`, `ValidatingWebhookConfigurations` and `CustomResourceDefinitions` based on a label selector that can be defined using the following environment variables: -- `LABEL_SELECTOR_KEY`: Label key used or identifying resources for certificate injection. +- `LABEL_SELECTOR_KEY`: Label key used or identifying resources for certificate injection. Default: `keptn.sh/inject-cert` - `LABEL_SELECTOR_VALUE`: Label value used for identifying resources for certificate injection. Default: `true`. @@ -32,7 +32,8 @@ metadata: ## Using the klt-cert-manager library The functionality provided by this operator can also be added to other operators by using the `klt-cert-manager` as -a library. To do this, add the library as a dependency to your application: +a library. +To do this, add the library as a dependency to your application: ```shell go get github.com/keptn/lifecycle-toolkit/klt-cert-manager @@ -45,45 +46,45 @@ created and registered to your operator's controller manager: package main import ( - "flag" - "log" - "os" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/webhook" - // +kubebuilder:scaffold:imports + "flag" + "log" + "os" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/pkg/webhook" + // +kubebuilder:scaffold:imports ) func main() { - // operator setup ... - certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), - Namespace: "my-namespace", - MatchLabels: map[string]string{ - "inject-cert": "true", - }, - }) - if err = certificateReconciler.SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "Deployment") - os.Exit(1) - } - //... - // register mutating/validating webhooks - webhookBuilder := webhook.NewWebhookBuilder(). - SetNamespace(env.PodNamespace). - SetPodName(env.PodName). - SetConfigProvider(cmdConfig.NewKubeConfigProvider()) - - setupLog.Info("starting webhook and manager") - if err := webhookBuilder.Run(mgr, map[string]*admission.Webhook{ - "/webhook-path": &webhook.Admission{}, - }}); err != nil { - setupLog.Error(err, "problem running manager") - os.Exit(1) - } + // operator setup ... + certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), + Namespace: "my-namespace", + MatchLabels: map[string]string{ + "inject-cert": "true", + }, + }) + if err = certificateReconciler.SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Deployment") + os.Exit(1) + } + //... + // register mutating/validating webhooks + webhookBuilder := webhook.NewWebhookBuilder(). + SetNamespace(env.PodNamespace). + SetPodName(env.PodName). + SetConfigProvider(cmdConfig.NewKubeConfigProvider()) + + setupLog.Info("starting webhook and manager") + if err := webhookBuilder.Run(mgr, map[string]*admission.Webhook{ + "/webhook-path": &webhook.Admission{}, + }); err != nil { + setupLog.Error(err, "problem running manager") + os.Exit(1) + } } ``` From fe7bf2e216dcefedddc549d6e263821ac6b91642 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 28 Apr 2023 11:17:18 +0200 Subject: [PATCH 15/19] markdown lint Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index c600a9a3cc..e78462c52d 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -32,7 +32,7 @@ metadata: ## Using the klt-cert-manager library The functionality provided by this operator can also be added to other operators by using the `klt-cert-manager` as -a library. +a library. To do this, add the library as a dependency to your application: ```shell @@ -80,10 +80,10 @@ func main() { setupLog.Info("starting webhook and manager") if err := webhookBuilder.Run(mgr, map[string]*admission.Webhook{ - "/webhook-path": &webhook.Admission{}, + "/webhook-path": &webhook.Admission{}, }); err != nil { - setupLog.Error(err, "problem running manager") - os.Exit(1) + setupLog.Error(err, "problem running manager") + os.Exit(1) } } ``` @@ -173,24 +173,24 @@ import ( ) func main() { - // operator setup ... - certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), - Namespace: "my-namespace", - WatchResources: &keptnwebhookcontroller.ObservedObjects{ - MutatingWebhooks: []string{"my-mwh-1", "my-mwh-2"}, - ValidatingWebhooks: []string{"my-vwh-1", "my-vwh-2"}, - CustomResourceDefinitions: []string{"my-crd-1", "my-crd-2"}, - Deployments: []string{"my-operator-deployment"}, - }, - }) - if err = certificateReconciler.SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "Deployment") - os.Exit(1) - } - //... + // operator setup ... + certificateReconciler := keptnwebhookcontroller.NewReconciler(keptnwebhookcontroller.CertificateReconcilerConfig{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Log: ctrl.Log.WithName("KeptnWebhookCert Controller"), + Namespace: "my-namespace", + WatchResources: &keptnwebhookcontroller.ObservedObjects{ + MutatingWebhooks: []string{"my-mwh-1", "my-mwh-2"}, + ValidatingWebhooks: []string{"my-vwh-1", "my-vwh-2"}, + CustomResourceDefinitions: []string{"my-crd-1", "my-crd-2"}, + Deployments: []string{"my-operator-deployment"}, + }, + }) + if err = certificateReconciler.SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Deployment") + os.Exit(1) + } + //... } ``` From 534ea148aa2754b10c45cf5e59e1e6312f2aaa9d Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 28 Apr 2023 11:20:15 +0200 Subject: [PATCH 16/19] markdown lint Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index e78462c52d..aded83c615 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -164,12 +164,12 @@ instead of specifying the `MatchLabels`: package main import ( - "flag" - "log" - "os" - - "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" - // +kubebuilder:scaffold:imports + "flag" + "log" + "os" + + "github.com/keptn/lifecycle-toolkit/klt-cert-manager/controllers/keptnwebhookcontroller" + // +kubebuilder:scaffold:imports ) func main() { From 78ffedc4579a68b4dd5995fc5b2b402148ba8876 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Wed, 3 May 2023 12:31:55 +0200 Subject: [PATCH 17/19] updated dependencies Signed-off-by: Florian Bacher --- klt-cert-manager/go.mod | 1 + klt-cert-manager/go.sum | 111 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/klt-cert-manager/go.mod b/klt-cert-manager/go.mod index d98d822069..96316b35ba 100644 --- a/klt-cert-manager/go.mod +++ b/klt-cert-manager/go.mod @@ -6,6 +6,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/kelseyhightower/envconfig v1.4.0 github.com/pkg/errors v0.9.1 + github.com/spf13/afero v1.9.5 github.com/stretchr/testify v1.8.2 k8s.io/api v0.26.4 k8s.io/apiextensions-apiserver v0.26.4 diff --git a/klt-cert-manager/go.sum b/klt-cert-manager/go.sum index 8cd7a5ad6e..0d0b73d95f 100644 --- a/klt-cert-manager/go.sum +++ b/klt-cert-manager/go.sum @@ -39,15 +39,25 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.3 h1:g+rSsSaAzhHJYcIQE78hJ3AhyjjtQvleKDjlhdBnIhc= github.com/benbjohnson/clock v1.3.3/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/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/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -58,10 +68,13 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -72,6 +85,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -83,6 +98,14 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -95,9 +118,13 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -128,11 +155,14 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD 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 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 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/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -148,6 +178,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -176,62 +208,111 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= 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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/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.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= 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/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.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.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= 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.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= 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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= @@ -239,11 +320,14 @@ 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.1.1/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.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -264,17 +348,20 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= 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 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -327,6 +414,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -342,9 +432,12 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -353,6 +446,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -365,16 +459,21 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -516,6 +615,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -555,23 +655,32 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 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.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= @@ -591,6 +700,8 @@ k8s.io/client-go v0.26.4 h1:/7P/IbGBuT73A+G97trf44NTPSNqvuBREpOfdLbHvD4= k8s.io/client-go v0.26.4/go.mod h1:6qOItWm3EwxJdl/8p5t7FWtWUOwyMdA8N9ekbW4idpI= k8s.io/component-base v0.26.4 h1:Bg2xzyXNKL3eAuiTEu3XE198d6z22ENgFgGQv2GGOUk= k8s.io/component-base v0.26.4/go.mod h1:lTuWL1Xz/a4e80gmIC3YZG2JCO4xNwtKWHJWeJmsq20= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= 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-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= From 2990829f7a4f02663ace49a267f173f425770ecd Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Wed, 3 May 2023 12:50:40 +0200 Subject: [PATCH 18/19] added comment Signed-off-by: Florian Bacher --- .../keptnwebhookcontroller/keptnwebhookcertificate_controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go index a4ba2b4efd..a085394d88 100644 --- a/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go +++ b/klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go @@ -22,6 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" ) +// ObservedObjects contains information about which Kubernetes resources should be observed by the reconciler. type ObservedObjects struct { MutatingWebhooks []string ValidatingWebhooks []string From bd7d39c302e03488c850d5e061d42a96998425d1 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 4 May 2023 13:43:16 +0200 Subject: [PATCH 19/19] fix typo Co-authored-by: Giovanni Liva Signed-off-by: Florian Bacher --- klt-cert-manager/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index aded83c615..8842d2bc27 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -9,7 +9,7 @@ This `klt-cert-manager` operator should only be installed when paired with the L or above. The TLS certificate is mounted as a volume in the LT operator pod and is renewed every 12 hours or every time the LT operator deployment changes. -THe `klt-cert-manager` retrieves all `MutatingWebhookConfigurations`, `ValidatingWebhookConfigurations` and +The `klt-cert-manager` retrieves all `MutatingWebhookConfigurations`, `ValidatingWebhookConfigurations` and `CustomResourceDefinitions` based on a label selector that can be defined using the following environment variables: - `LABEL_SELECTOR_KEY`: Label key used or identifying resources for certificate injection.