From 4809eb7b8f9a6f029f6944f0937fe88d52045c13 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 14 Jul 2023 16:37:08 +0300 Subject: [PATCH 1/5] Bump CAPI to v1.5.0 Signed-off-by: Furkat Gofurov --- .gitignore | 4 + api/v1beta2/awscluster_webhook.go | 15 +- .../awsclustercontrolleridentity_webhook.go | 25 +-- api/v1beta2/awsclusterroleidentity_webhook.go | 23 +-- .../awsclusterstaticidentity_webhook.go | 21 +- api/v1beta2/awsclustertemplate_webhook.go | 15 +- api/v1beta2/awsmachine_webhook.go | 17 +- api/v1beta2/awsmachinetemplate_webhook.go | 20 +- .../eks/api/v1beta2/eksconfig_webhook.go | 13 +- .../api/v1beta2/eksconfigtemplate_webhook.go | 13 +- .../eks/controllers/eksconfig_controller.go | 14 +- controllers/awscluster_controller.go | 6 +- .../awscluster_controller_unit_test.go | 2 +- controllers/awsmachine_controller.go | 12 +- .../awsmachine_controller_unit_test.go | 4 +- controllers/awsmanagedcluster_controller.go | 8 +- .../v1beta2/awsmanagedcontrolplane_webhook.go | 19 +- .../awsmanagedcontrolplane_webhook_test.go | 8 +- .../awsmanagedcontrolplane_controller.go | 8 +- exp/api/v1beta2/awsfargateprofile_webhook.go | 19 +- .../v1beta2/awsfargateprofile_webhook_test.go | 8 +- exp/api/v1beta2/awsmachinepool_webhook.go | 17 +- .../v1beta2/awsmachinepool_webhook_test.go | 8 +- .../v1beta2/awsmanagedmachinepool_webhook.go | 19 +- .../awsmanagedmachinepool_webhook_test.go | 8 +- .../awscontrolleridentity_controller.go | 5 +- exp/controllers/awsfargatepool_controller.go | 7 +- exp/controllers/awsmachinepool_controller.go | 5 +- .../awsmanagedmachinepool_controller.go | 10 +- go.mod | 79 +++++--- go.sum | 187 +++++++++++------- main.go | 2 - pkg/cloud/services/gc/compose.go | 16 ++ pkg/cloud/services/wait/wait.go | 2 +- pkg/cloud/services/wait/wait_test.go | 4 +- pkg/internal/bytes/bytes_test.go | 2 +- test/e2e/data/e2e_conf.yaml | 18 +- test/e2e/data/e2e_eks_conf.yaml | 18 +- test/e2e/data/shared/v1beta1/metadata.yaml | 3 + test/e2e/shared/common.go | 10 + versions.mk | 2 +- 41 files changed, 404 insertions(+), 292 deletions(-) diff --git a/.gitignore b/.gitignore index e14eb42419..5c5e4e5642 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,10 @@ kubeconfig # vscode .vscode +# go.work files +go.work +go.work.sum + # goland .idea diff --git a/api/v1beta2/awscluster_webhook.go b/api/v1beta2/awscluster_webhook.go index 51d35f18ba..98b26c6a64 100644 --- a/api/v1beta2/awscluster_webhook.go +++ b/api/v1beta2/awscluster_webhook.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/annotations" @@ -48,7 +49,7 @@ var ( ) // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSCluster) ValidateCreate() error { +func (r *AWSCluster) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList allErrs = append(allErrs, r.Spec.Bastion.Validate()...) @@ -58,21 +59,21 @@ func (r *AWSCluster) ValidateCreate() error { allErrs = append(allErrs, r.validateNetwork()...) allErrs = append(allErrs, r.validateAdditionalIngressRules()...) - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) + return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSCluster) ValidateDelete() error { - return nil +func (r *AWSCluster) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSCluster) ValidateUpdate(old runtime.Object) error { +func (r *AWSCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { var allErrs field.ErrorList oldC, ok := old.(*AWSCluster) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected an AWSCluster but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSCluster but got a %T", old)) } if r.Spec.Region != oldC.Spec.Region { @@ -167,7 +168,7 @@ func (r *AWSCluster) ValidateUpdate(old runtime.Object) error { allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...) allErrs = append(allErrs, r.Spec.S3Bucket.Validate()...) - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) + return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } // Default satisfies the defaulting webhook interface. diff --git a/api/v1beta2/awsclustercontrolleridentity_webhook.go b/api/v1beta2/awsclustercontrolleridentity_webhook.go index b62ec17034..62724bfbc9 100644 --- a/api/v1beta2/awsclustercontrolleridentity_webhook.go +++ b/api/v1beta2/awsclustercontrolleridentity_webhook.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // log is for logging in this package. @@ -47,10 +48,10 @@ var ( ) // ValidateCreate will do any extra validation when creating an AWSClusterControllerIdentity. -func (r *AWSClusterControllerIdentity) ValidateCreate() error { +func (r *AWSClusterControllerIdentity) ValidateCreate() (admission.Warnings, error) { // Ensures AWSClusterControllerIdentity being singleton by only allowing "default" as name if r.Name != AWSClusterControllerIdentityName { - return field.Invalid(field.NewPath("name"), + return nil, field.Invalid(field.NewPath("name"), r.Name, "AWSClusterControllerIdentity is a singleton and only acceptable name is default") } @@ -58,31 +59,31 @@ func (r *AWSClusterControllerIdentity) ValidateCreate() error { if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // ValidateDelete allows you to add any extra validation when deleting an AWSClusterControllerIdentity. -func (r *AWSClusterControllerIdentity) ValidateDelete() error { - return nil +func (r *AWSClusterControllerIdentity) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate will do any extra validation when updating an AWSClusterControllerIdentity. -func (r *AWSClusterControllerIdentity) ValidateUpdate(old runtime.Object) error { +func (r *AWSClusterControllerIdentity) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldP, ok := old.(*AWSClusterControllerIdentity) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterControllerIdentity but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterControllerIdentity but got a %T", old)) } if !cmp.Equal(r.Spec, oldP.Spec) { - return errors.New("AWSClusterControllerIdentity is immutable") + return nil, errors.New("AWSClusterControllerIdentity is immutable") } if r.Name != oldP.Name { - return field.Invalid(field.NewPath("name"), + return nil, field.Invalid(field.NewPath("name"), r.Name, "AWSClusterControllerIdentity is a singleton and only acceptable name is default") } @@ -90,11 +91,11 @@ func (r *AWSClusterControllerIdentity) ValidateUpdate(old runtime.Object) error if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selectors"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selectors"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // Default will set default values for the AWSClusterControllerIdentity. diff --git a/api/v1beta2/awsclusterroleidentity_webhook.go b/api/v1beta2/awsclusterroleidentity_webhook.go index b39e9a93aa..c95622b16c 100644 --- a/api/v1beta2/awsclusterroleidentity_webhook.go +++ b/api/v1beta2/awsclusterroleidentity_webhook.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // log is for logging in this package. @@ -45,9 +46,9 @@ var ( ) // ValidateCreate will do any extra validation when creating an AWSClusterRoleIdentity. -func (r *AWSClusterRoleIdentity) ValidateCreate() error { +func (r *AWSClusterRoleIdentity) ValidateCreate() (admission.Warnings, error) { if r.Spec.SourceIdentityRef == nil { - return field.Invalid(field.NewPath("spec", "sourceIdentityRef"), + return nil, field.Invalid(field.NewPath("spec", "sourceIdentityRef"), r.Spec.SourceIdentityRef, "field cannot be set to nil") } @@ -55,28 +56,28 @@ func (r *AWSClusterRoleIdentity) ValidateCreate() error { if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // ValidateDelete allows you to add any extra validation when deleting an AWSClusterRoleIdentity. -func (r *AWSClusterRoleIdentity) ValidateDelete() error { - return nil +func (r *AWSClusterRoleIdentity) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate will do any extra validation when updating an AWSClusterRoleIdentity. -func (r *AWSClusterRoleIdentity) ValidateUpdate(old runtime.Object) error { +func (r *AWSClusterRoleIdentity) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldP, ok := old.(*AWSClusterRoleIdentity) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterRoleIdentity but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterRoleIdentity but got a %T", old)) } // If a SourceIdentityRef is set, do not allow removal of it. if oldP.Spec.SourceIdentityRef != nil && r.Spec.SourceIdentityRef == nil { - return field.Invalid(field.NewPath("spec", "sourceIdentityRef"), + return nil, field.Invalid(field.NewPath("spec", "sourceIdentityRef"), r.Spec.SourceIdentityRef, "field cannot be set to nil") } @@ -84,11 +85,11 @@ func (r *AWSClusterRoleIdentity) ValidateUpdate(old runtime.Object) error { if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // Default will set default values for the AWSClusterRoleIdentity. diff --git a/api/v1beta2/awsclusterstaticidentity_webhook.go b/api/v1beta2/awsclusterstaticidentity_webhook.go index a333c20d8e..e98b8dd343 100644 --- a/api/v1beta2/awsclusterstaticidentity_webhook.go +++ b/api/v1beta2/awsclusterstaticidentity_webhook.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // log is for logging in this package. @@ -45,32 +46,32 @@ var ( ) // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterStaticIdentity) ValidateCreate() error { +func (r *AWSClusterStaticIdentity) ValidateCreate() (admission.Warnings, error) { // Validate selector parses as Selector if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterStaticIdentity) ValidateDelete() error { - return nil +func (r *AWSClusterStaticIdentity) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterStaticIdentity) ValidateUpdate(old runtime.Object) error { +func (r *AWSClusterStaticIdentity) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldP, ok := old.(*AWSClusterStaticIdentity) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterStaticIdentity but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterStaticIdentity but got a %T", old)) } if oldP.Spec.SecretRef != r.Spec.SecretRef { - return field.Invalid(field.NewPath("spec", "secretRef"), + return nil, field.Invalid(field.NewPath("spec", "secretRef"), r.Spec.SecretRef, "field cannot be updated") } @@ -78,11 +79,11 @@ func (r *AWSClusterStaticIdentity) ValidateUpdate(old runtime.Object) error { if r.Spec.AllowedNamespaces != nil { _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector) if err != nil { - return field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) + return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error()) } } - return nil + return nil, nil } // Default should return the default AWSClusterStaticIdentity. diff --git a/api/v1beta2/awsclustertemplate_webhook.go b/api/v1beta2/awsclustertemplate_webhook.go index 59b582bb0c..95cab6c1cf 100644 --- a/api/v1beta2/awsclustertemplate_webhook.go +++ b/api/v1beta2/awsclustertemplate_webhook.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) func (r *AWSClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { @@ -43,26 +44,26 @@ func (r *AWSClusterTemplate) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterTemplate) ValidateCreate() error { +func (r *AWSClusterTemplate) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList allErrs = append(allErrs, r.Spec.Template.Spec.Bastion.Validate()...) allErrs = append(allErrs, validateSSHKeyName(r.Spec.Template.Spec.SSHKeyName)...) - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) + return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterTemplate) ValidateUpdate(oldRaw runtime.Object) error { +func (r *AWSClusterTemplate) ValidateUpdate(oldRaw runtime.Object) (admission.Warnings, error) { old := oldRaw.(*AWSClusterTemplate) if !cmp.Equal(r.Spec, old.Spec) { - return apierrors.NewBadRequest("AWSClusterTemplate.Spec is immutable") + return nil, apierrors.NewBadRequest("AWSClusterTemplate.Spec is immutable") } - return nil + return nil, nil } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSClusterTemplate) ValidateDelete() error { - return nil +func (r *AWSClusterTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } diff --git a/api/v1beta2/awsmachine_webhook.go b/api/v1beta2/awsmachine_webhook.go index 1a622669f3..cbf728fda4 100644 --- a/api/v1beta2/awsmachine_webhook.go +++ b/api/v1beta2/awsmachine_webhook.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api-provider-aws/v2/feature" ) @@ -46,7 +47,7 @@ var ( ) // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachine) ValidateCreate() error { +func (r *AWSMachine) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList allErrs = append(allErrs, r.validateCloudInitSecret()...) @@ -57,20 +58,20 @@ func (r *AWSMachine) ValidateCreate() error { allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...) allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...) - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) + return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachine) ValidateUpdate(old runtime.Object) error { +func (r *AWSMachine) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { newAWSMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(r) if err != nil { - return apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{ + return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{ field.InternalError(nil, errors.Wrap(err, "failed to convert new AWSMachine to unstructured object")), }) } oldAWSMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(old) if err != nil { - return apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{ + return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{ field.InternalError(nil, errors.Wrap(err, "failed to convert old AWSMachine to unstructured object")), }) } @@ -117,7 +118,7 @@ func (r *AWSMachine) ValidateUpdate(old runtime.Object) error { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "cannot be modified")) } - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) + return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } func (r *AWSMachine) validateCloudInitSecret() field.ErrorList { @@ -226,8 +227,8 @@ func (r *AWSMachine) validateNonRootVolumes() field.ErrorList { } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachine) ValidateDelete() error { - return nil +func (r *AWSMachine) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // Default implements webhook.Defaulter such that an empty CloudInit will be defined with a default diff --git a/api/v1beta2/awsmachinetemplate_webhook.go b/api/v1beta2/awsmachinetemplate_webhook.go index 98c3a5a7ec..30dee37458 100644 --- a/api/v1beta2/awsmachinetemplate_webhook.go +++ b/api/v1beta2/awsmachinetemplate_webhook.go @@ -176,11 +176,11 @@ func (r *AWSMachineTemplate) validateSSHKeyName() field.ErrorList { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachineTemplateWebhook) ValidateCreate(_ context.Context, raw runtime.Object) error { +func (r *AWSMachineTemplateWebhook) ValidateCreate(_ context.Context, raw runtime.Object) (admission.Warnings, error) { var allErrs field.ErrorList obj, ok := raw.(*AWSMachineTemplate) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a VSphereMachineTemplate but got a %T", raw)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a VSphereMachineTemplate but got a %T", raw)) } spec := obj.Spec.Template.Spec @@ -205,23 +205,23 @@ func (r *AWSMachineTemplateWebhook) ValidateCreate(_ context.Context, raw runtim allErrs = append(allErrs, obj.validateAdditionalSecurityGroups()...) allErrs = append(allErrs, obj.Spec.Template.Spec.AdditionalTags.Validate()...) - return aggregateObjErrors(obj.GroupVersionKind().GroupKind(), obj.Name, allErrs) + return nil, aggregateObjErrors(obj.GroupVersionKind().GroupKind(), obj.Name, allErrs) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldRaw runtime.Object, newRaw runtime.Object) error { +func (r *AWSMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldRaw runtime.Object, newRaw runtime.Object) (admission.Warnings, error) { newAWSMachineTemplate, ok := newRaw.(*AWSMachineTemplate) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", newRaw)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", newRaw)) } oldAWSMachineTemplate, ok := oldRaw.(*AWSMachineTemplate) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", oldRaw)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", oldRaw)) } req, err := admission.RequestFromContext(ctx) if err != nil { - return apierrors.NewBadRequest(fmt.Sprintf("expected a admission.Request inside context: %v", err)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a admission.Request inside context: %v", err)) } var allErrs field.ErrorList @@ -238,10 +238,10 @@ func (r *AWSMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldRaw r } } - return aggregateObjErrors(newAWSMachineTemplate.GroupVersionKind().GroupKind(), newAWSMachineTemplate.Name, allErrs) + return nil, aggregateObjErrors(newAWSMachineTemplate.GroupVersionKind().GroupKind(), newAWSMachineTemplate.Name, allErrs) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) error { - return nil +func (r *AWSMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) { + return nil, nil } diff --git a/bootstrap/eks/api/v1beta2/eksconfig_webhook.go b/bootstrap/eks/api/v1beta2/eksconfig_webhook.go index 834ea0063a..e1459ba1dd 100644 --- a/bootstrap/eks/api/v1beta2/eksconfig_webhook.go +++ b/bootstrap/eks/api/v1beta2/eksconfig_webhook.go @@ -20,6 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // SetupWebhookWithManager will setup the webhooks for the EKSConfig. @@ -36,18 +37,18 @@ var _ webhook.Defaulter = &EKSConfig{} var _ webhook.Validator = &EKSConfig{} // ValidateCreate will do any extra validation when creating a EKSConfig. -func (r *EKSConfig) ValidateCreate() error { - return nil +func (r *EKSConfig) ValidateCreate() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate will do any extra validation when updating a EKSConfig. -func (r *EKSConfig) ValidateUpdate(old runtime.Object) error { - return nil +func (r *EKSConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + return nil, nil } // ValidateDelete allows you to add any extra validation when deleting. -func (r *EKSConfig) ValidateDelete() error { - return nil +func (r *EKSConfig) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // Default will set default values for the EKSConfig. diff --git a/bootstrap/eks/api/v1beta2/eksconfigtemplate_webhook.go b/bootstrap/eks/api/v1beta2/eksconfigtemplate_webhook.go index 69027af663..fc2504eca4 100644 --- a/bootstrap/eks/api/v1beta2/eksconfigtemplate_webhook.go +++ b/bootstrap/eks/api/v1beta2/eksconfigtemplate_webhook.go @@ -20,6 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // SetupWebhookWithManager will setup the webhooks for the EKSConfigTemplate. @@ -36,18 +37,18 @@ var _ webhook.Defaulter = &EKSConfigTemplate{} var _ webhook.Validator = &EKSConfigTemplate{} // ValidateCreate will do any extra validation when creating a EKSConfigTemplate. -func (r *EKSConfigTemplate) ValidateCreate() error { - return nil +func (r *EKSConfigTemplate) ValidateCreate() (admission.Warnings, error) { + return nil, nil } // ValidateUpdate will do any extra validation when updating a EKSConfigTemplate. -func (r *EKSConfigTemplate) ValidateUpdate(old runtime.Object) error { - return nil +func (r *EKSConfigTemplate) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + return nil, nil } // ValidateDelete allows you to add any extra validation when deleting. -func (r *EKSConfigTemplate) ValidateDelete() error { - return nil +func (r *EKSConfigTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // Default will set default values for the EKSConfigTemplate. diff --git a/bootstrap/eks/controllers/eksconfig_controller.go b/bootstrap/eks/controllers/eksconfig_controller.go index 5c9a72b54a..4fbbfd46cc 100644 --- a/bootstrap/eks/controllers/eksconfig_controller.go +++ b/bootstrap/eks/controllers/eksconfig_controller.go @@ -79,7 +79,7 @@ func (r *EKSConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( log = log.WithValues("EKSConfig", config.GetName()) // check owner references and look up owning Machine object - configOwner, err := bsutil.GetConfigOwner(ctx, r.Client, config) + configOwner, err := bsutil.GetTypedConfigOwner(ctx, r.Client, config) if apierrors.IsNotFound(err) { // no error here, requeue until we find an owner log.Debug("eksconfig failed to look up owner reference, re-queueing") @@ -295,13 +295,13 @@ func (r *EKSConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Man WithOptions(option). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(logger.FromContext(ctx).GetLogger(), r.WatchFilterValue)). Watches( - &source.Kind{Type: &clusterv1.Machine{}}, + &clusterv1.Machine{}, handler.EnqueueRequestsFromMapFunc(r.MachineToBootstrapMapFunc), ) if feature.Gates.Enabled(feature.MachinePool) { b = b.Watches( - &source.Kind{Type: &expclusterv1.MachinePool{}}, + &expclusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(r.MachinePoolToBootstrapMapFunc), ) } @@ -312,7 +312,7 @@ func (r *EKSConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Man } err = c.Watch( - &source.Kind{Type: &clusterv1.Cluster{}}, + source.Kind(mgr.GetCache(), &clusterv1.Cluster{}), handler.EnqueueRequestsFromMapFunc((r.ClusterToEKSConfigs)), predicates.ClusterUnpausedAndInfrastructureReady(logger.FromContext(ctx).GetLogger()), ) @@ -363,7 +363,7 @@ func (r *EKSConfigReconciler) storeBootstrapData(ctx context.Context, cluster *c // MachineToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue requests // for EKSConfig reconciliation. -func (r *EKSConfigReconciler) MachineToBootstrapMapFunc(o client.Object) []ctrl.Request { +func (r *EKSConfigReconciler) MachineToBootstrapMapFunc(_ context.Context, o client.Object) []ctrl.Request { result := []ctrl.Request{} m, ok := o.(*clusterv1.Machine) @@ -379,7 +379,7 @@ func (r *EKSConfigReconciler) MachineToBootstrapMapFunc(o client.Object) []ctrl. // MachinePoolToBootstrapMapFunc is a handler.ToRequestsFunc to be uses to enqueue requests // for EKSConfig reconciliation. -func (r *EKSConfigReconciler) MachinePoolToBootstrapMapFunc(o client.Object) []ctrl.Request { +func (r *EKSConfigReconciler) MachinePoolToBootstrapMapFunc(_ context.Context, o client.Object) []ctrl.Request { result := []ctrl.Request{} m, ok := o.(*expclusterv1.MachinePool) @@ -397,7 +397,7 @@ func (r *EKSConfigReconciler) MachinePoolToBootstrapMapFunc(o client.Object) []c // ClusterToEKSConfigs is a handler.ToRequestsFunc to be used to enqueue requests for // EKSConfig reconciliation. -func (r *EKSConfigReconciler) ClusterToEKSConfigs(o client.Object) []ctrl.Request { +func (r *EKSConfigReconciler) ClusterToEKSConfigs(_ context.Context, o client.Object) []ctrl.Request { result := []ctrl.Request{} c, ok := o.(*clusterv1.Cluster) diff --git a/controllers/awscluster_controller.go b/controllers/awscluster_controller.go index 73f8ad1e41..ba792dc910 100644 --- a/controllers/awscluster_controller.go +++ b/controllers/awscluster_controller.go @@ -380,14 +380,14 @@ func (r *AWSClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma } return controller.Watch( - &source.Kind{Type: &clusterv1.Cluster{}}, + source.Kind(mgr.GetCache(), &clusterv1.Cluster{}), handler.EnqueueRequestsFromMapFunc(r.requeueAWSClusterForUnpausedCluster(ctx, log)), predicates.ClusterUnpaused(log.GetLogger()), ) } -func (r *AWSClusterReconciler) requeueAWSClusterForUnpausedCluster(ctx context.Context, log logger.Wrapper) handler.MapFunc { - return func(o client.Object) []ctrl.Request { +func (r *AWSClusterReconciler) requeueAWSClusterForUnpausedCluster(_ context.Context, log logger.Wrapper) handler.MapFunc { + return func(ctx context.Context, o client.Object) []ctrl.Request { c, ok := o.(*clusterv1.Cluster) if !ok { klog.Errorf("Expected a Cluster but got a %T", o) diff --git a/controllers/awscluster_controller_unit_test.go b/controllers/awscluster_controller_unit_test.go index 1123a8deb9..2bc74d4cd7 100644 --- a/controllers/awscluster_controller_unit_test.go +++ b/controllers/awscluster_controller_unit_test.go @@ -594,7 +594,7 @@ func TestAWSClusterReconcilerRequeueAWSClusterForUnpausedCluster(t *testing.T) { tc.ownerCluster.Namespace = ns.Name } handlerFunc := reconciler.requeueAWSClusterForUnpausedCluster(ctx, log) - result := handlerFunc(tc.ownerCluster) + result := handlerFunc(ctx, tc.ownerCluster) if tc.requeue { g.Expect(result).To(ContainElement(reconcile.Request{ NamespacedName: types.NamespacedName{ diff --git a/controllers/awsmachine_controller.go b/controllers/awsmachine_controller.go index 6a6da726b9..7456f17821 100644 --- a/controllers/awsmachine_controller.go +++ b/controllers/awsmachine_controller.go @@ -243,11 +243,11 @@ func (r *AWSMachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma WithOptions(options). For(&infrav1.AWSMachine{}). Watches( - &source.Kind{Type: &clusterv1.Machine{}}, + &clusterv1.Machine{}, handler.EnqueueRequestsFromMapFunc(util.MachineToInfrastructureMapFunc(infrav1.GroupVersion.WithKind("AWSMachine"))), ). Watches( - &source.Kind{Type: &infrav1.AWSCluster{}}, + &infrav1.AWSCluster{}, handler.EnqueueRequestsFromMapFunc(AWSClusterToAWSMachines), ). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log.GetLogger(), r.WatchFilterValue)). @@ -288,7 +288,7 @@ func (r *AWSMachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma requeueAWSMachinesForUnpausedCluster := r.requeueAWSMachinesForUnpausedCluster(log) return controller.Watch( - &source.Kind{Type: &clusterv1.Cluster{}}, + source.Kind(mgr.GetCache(), &clusterv1.Cluster{}), handler.EnqueueRequestsFromMapFunc(requeueAWSMachinesForUnpausedCluster), predicates.ClusterUnpausedAndInfrastructureReady(log.GetLogger()), ) @@ -957,7 +957,7 @@ func (r *AWSMachineReconciler) deregisterInstanceFromV2LB(machineScope *scope.Ma // AWSClusterToAWSMachines is a handler.ToRequestsFunc to be used to enqeue requests for reconciliation // of AWSMachines. func (r *AWSMachineReconciler) AWSClusterToAWSMachines(log logger.Wrapper) handler.MapFunc { - return func(o client.Object) []ctrl.Request { + return func(ctx context.Context, o client.Object) []ctrl.Request { c, ok := o.(*infrav1.AWSCluster) if !ok { klog.Errorf("Expected a AWSCluster but got a %T", o) @@ -971,7 +971,7 @@ func (r *AWSMachineReconciler) AWSClusterToAWSMachines(log logger.Wrapper) handl return nil } - cluster, err := util.GetOwnerCluster(context.TODO(), r.Client, c.ObjectMeta) + cluster, err := util.GetOwnerCluster(ctx, r.Client, c.ObjectMeta) switch { case apierrors.IsNotFound(err) || cluster == nil: log.Trace("Cluster for AWSCluster not found, skipping mapping.") @@ -986,7 +986,7 @@ func (r *AWSMachineReconciler) AWSClusterToAWSMachines(log logger.Wrapper) handl } func (r *AWSMachineReconciler) requeueAWSMachinesForUnpausedCluster(log logger.Wrapper) handler.MapFunc { - return func(o client.Object) []ctrl.Request { + return func(ctx context.Context, o client.Object) []ctrl.Request { c, ok := o.(*clusterv1.Cluster) if !ok { klog.Errorf("Expected a Cluster but got a %T", o) diff --git a/controllers/awsmachine_controller_unit_test.go b/controllers/awsmachine_controller_unit_test.go index bff3a180d1..644c16065e 100644 --- a/controllers/awsmachine_controller_unit_test.go +++ b/controllers/awsmachine_controller_unit_test.go @@ -2035,7 +2035,7 @@ func TestAWSMachineReconcilerAWSClusterToAWSMachines(t *testing.T) { g.Expect(testEnv.Cleanup(ctx, tc.awsCluster, ns)).To(Succeed()) }) - requests := reconciler.AWSClusterToAWSMachines(logger.NewLogger(klog.Background()))(tc.awsCluster) + requests := reconciler.AWSClusterToAWSMachines(logger.NewLogger(klog.Background()))(ctx, tc.awsCluster) if tc.requests != nil { if len(tc.requests) > 0 { tc.requests[0].Namespace = ns.Name @@ -2071,7 +2071,7 @@ func TestAWSMachineReconcilerRequeueAWSMachinesForUnpausedCluster(t *testing.T) Client: testEnv.Client, Log: klog.Background(), } - requests := reconciler.requeueAWSMachinesForUnpausedCluster(logger.NewLogger(klog.Background()))(tc.ownerCluster) + requests := reconciler.requeueAWSMachinesForUnpausedCluster(logger.NewLogger(klog.Background()))(ctx, tc.ownerCluster) if tc.requests != nil { g.Expect(requests).To(ConsistOf(tc.requests)) } else { diff --git a/controllers/awsmanagedcluster_controller.go b/controllers/awsmanagedcluster_controller.go index 4f93a9d8b9..ae69285aee 100644 --- a/controllers/awsmanagedcluster_controller.go +++ b/controllers/awsmanagedcluster_controller.go @@ -133,7 +133,7 @@ func (r *AWSManagedClusterReconciler) SetupWithManager(ctx context.Context, mgr // Add a watch for clusterv1.Cluster unpaise if err = controller.Watch( - &source.Kind{Type: &clusterv1.Cluster{}}, + source.Kind(mgr.GetCache(), &clusterv1.Cluster{}), handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, infrav1.GroupVersion.WithKind("AWSManagedCluster"), mgr.GetClient(), &infrav1.AWSManagedCluster{})), predicates.ClusterUnpaused(log.GetLogger()), ); err != nil { @@ -142,7 +142,7 @@ func (r *AWSManagedClusterReconciler) SetupWithManager(ctx context.Context, mgr // Add a watch for AWSManagedControlPlane if err = controller.Watch( - &source.Kind{Type: &ekscontrolplanev1.AWSManagedControlPlane{}}, + source.Kind(mgr.GetCache(), &ekscontrolplanev1.AWSManagedControlPlane{}), handler.EnqueueRequestsFromMapFunc(r.managedControlPlaneToManagedCluster(ctx, log)), ); err != nil { return fmt.Errorf("failed adding watch on AWSManagedControlPlane: %w", err) @@ -151,8 +151,8 @@ func (r *AWSManagedClusterReconciler) SetupWithManager(ctx context.Context, mgr return nil } -func (r *AWSManagedClusterReconciler) managedControlPlaneToManagedCluster(ctx context.Context, log *logger.Logger) handler.MapFunc { - return func(o client.Object) []ctrl.Request { +func (r *AWSManagedClusterReconciler) managedControlPlaneToManagedCluster(_ context.Context, log *logger.Logger) handler.MapFunc { + return func(ctx context.Context, o client.Object) []ctrl.Request { awsManagedControlPlane, ok := o.(*ekscontrolplanev1.AWSManagedControlPlane) if !ok { log.Error(errors.Errorf("expected an AWSManagedControlPlane, got %T instead", o), "failed to map AWSManagedControlPlane") diff --git a/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook.go b/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook.go index 83c7d984fc..ab3566f8c0 100644 --- a/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook.go +++ b/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook.go @@ -29,6 +29,7 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks" @@ -73,7 +74,7 @@ func parseEKSVersion(raw string) (*version.Version, error) { } // ValidateCreate will do any extra validation when creating a AWSManagedControlPlane. -func (r *AWSManagedControlPlane) ValidateCreate() error { +func (r *AWSManagedControlPlane) ValidateCreate() (admission.Warnings, error) { mcpLog.Info("AWSManagedControlPlane validate create", "control-plane", klog.KObj(r)) var allErrs field.ErrorList @@ -94,10 +95,10 @@ func (r *AWSManagedControlPlane) ValidateCreate() error { allErrs = append(allErrs, r.validateNetwork()...) if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -105,11 +106,11 @@ func (r *AWSManagedControlPlane) ValidateCreate() error { } // ValidateUpdate will do any extra validation when updating a AWSManagedControlPlane. -func (r *AWSManagedControlPlane) ValidateUpdate(old runtime.Object) error { +func (r *AWSManagedControlPlane) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { mcpLog.Info("AWSManagedControlPlane validate update", "control-plane", klog.KObj(r)) oldAWSManagedControlplane, ok := old.(*AWSManagedControlPlane) if !ok { - return apierrors.NewInvalid(GroupVersion.WithKind("AWSManagedControlPlane").GroupKind(), r.Name, field.ErrorList{ + return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSManagedControlPlane").GroupKind(), r.Name, field.ErrorList{ field.InternalError(nil, errors.New("failed to convert old AWSManagedControlPlane to object")), }) } @@ -164,10 +165,10 @@ func (r *AWSManagedControlPlane) ValidateUpdate(old runtime.Object) error { } if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -175,10 +176,10 @@ func (r *AWSManagedControlPlane) ValidateUpdate(old runtime.Object) error { } // ValidateDelete allows you to add any extra validation when deleting. -func (r *AWSManagedControlPlane) ValidateDelete() error { +func (r *AWSManagedControlPlane) ValidateDelete() (admission.Warnings, error) { mcpLog.Info("AWSManagedControlPlane validate delete", "control-plane", klog.KObj(r)) - return nil + return nil, nil } func (r *AWSManagedControlPlane) validateEKSClusterName() field.ErrorList { diff --git a/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook_test.go b/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook_test.go index 0b68d21705..665dd127f0 100644 --- a/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook_test.go +++ b/controlplane/eks/api/v1beta2/awsmanagedcontrolplane_webhook_test.go @@ -743,13 +743,15 @@ func TestValidatingWebhookCreateSecondaryCidr(t *testing.T) { if tc.cidrRange != "" { mcp.Spec.SecondaryCidrBlock = &tc.cidrRange } - err := mcp.ValidateCreate() + warn, err := mcp.ValidateCreate() if tc.expectError { g.Expect(err).ToNot(BeNil()) } else { g.Expect(err).To(BeNil()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } @@ -814,13 +816,15 @@ func TestValidatingWebhookUpdateSecondaryCidr(t *testing.T) { }, } - err := newMCP.ValidateUpdate(oldMCP) + warn, err := newMCP.ValidateUpdate(oldMCP) if tc.expectError { g.Expect(err).ToNot(BeNil()) } else { g.Expect(err).To(BeNil()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } diff --git a/controlplane/eks/controllers/awsmanagedcontrolplane_controller.go b/controlplane/eks/controllers/awsmanagedcontrolplane_controller.go index 562b60413c..938f31dadf 100644 --- a/controlplane/eks/controllers/awsmanagedcontrolplane_controller.go +++ b/controlplane/eks/controllers/awsmanagedcontrolplane_controller.go @@ -112,7 +112,7 @@ func (r *AWSManagedControlPlaneReconciler) SetupWithManager(ctx context.Context, } if err = c.Watch( - &source.Kind{Type: &clusterv1.Cluster{}}, + source.Kind(mgr.GetCache(), &clusterv1.Cluster{}), handler.EnqueueRequestsFromMapFunc(util.ClusterToInfrastructureMapFunc(ctx, awsManagedControlPlane.GroupVersionKind(), mgr.GetClient(), &ekscontrolplanev1.AWSManagedControlPlane{})), predicates.ClusterUnpausedAndInfrastructureReady(log.GetLogger()), ); err != nil { @@ -120,7 +120,7 @@ func (r *AWSManagedControlPlaneReconciler) SetupWithManager(ctx context.Context, } if err = c.Watch( - &source.Kind{Type: &infrav1.AWSManagedCluster{}}, + source.Kind(mgr.GetCache(), &infrav1.AWSManagedCluster{}), handler.EnqueueRequestsFromMapFunc(r.managedClusterToManagedControlPlane(ctx, log)), ); err != nil { return fmt.Errorf("failed adding a watch for AWSManagedCluster") @@ -423,8 +423,8 @@ func (r *AWSManagedControlPlaneReconciler) dependencyCount(ctx context.Context, return dependencies, nil } -func (r *AWSManagedControlPlaneReconciler) managedClusterToManagedControlPlane(ctx context.Context, log *logger.Logger) handler.MapFunc { - return func(o client.Object) []ctrl.Request { +func (r *AWSManagedControlPlaneReconciler) managedClusterToManagedControlPlane(_ context.Context, log *logger.Logger) handler.MapFunc { + return func(ctx context.Context, o client.Object) []ctrl.Request { awsManagedCluster, ok := o.(*infrav1.AWSManagedCluster) if !ok { log.Error(fmt.Errorf("expected a AWSManagedCluster but got a %T", o), "Expected AWSManagedCluster") diff --git a/exp/api/v1beta2/awsfargateprofile_webhook.go b/exp/api/v1beta2/awsfargateprofile_webhook.go index da67c9e1cc..8bb3197372 100644 --- a/exp/api/v1beta2/awsfargateprofile_webhook.go +++ b/exp/api/v1beta2/awsfargateprofile_webhook.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" @@ -68,11 +69,11 @@ func (r *AWSFargateProfile) Default() { } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSFargateProfile) ValidateUpdate(oldObj runtime.Object) error { +func (r *AWSFargateProfile) ValidateUpdate(oldObj runtime.Object) (admission.Warnings, error) { gv := r.GroupVersionKind().GroupKind() old, ok := oldObj.(*AWSFargateProfile) if !ok { - return apierrors.NewInvalid(gv, r.Name, field.ErrorList{ + return nil, apierrors.NewInvalid(gv, r.Name, field.ErrorList{ field.InternalError(nil, errors.Errorf("failed to convert old %s to object", gv.Kind)), }) } @@ -121,10 +122,10 @@ func (r *AWSFargateProfile) ValidateUpdate(oldObj runtime.Object) error { } if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( gv, r.Name, allErrs, @@ -132,15 +133,15 @@ func (r *AWSFargateProfile) ValidateUpdate(oldObj runtime.Object) error { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSFargateProfile) ValidateCreate() error { +func (r *AWSFargateProfile) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...) if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -148,6 +149,6 @@ func (r *AWSFargateProfile) ValidateCreate() error { } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AWSFargateProfile) ValidateDelete() error { - return nil +func (r *AWSFargateProfile) ValidateDelete() (admission.Warnings, error) { + return nil, nil } diff --git a/exp/api/v1beta2/awsfargateprofile_webhook_test.go b/exp/api/v1beta2/awsfargateprofile_webhook_test.go index 824ebb3554..881ad7e1e9 100644 --- a/exp/api/v1beta2/awsfargateprofile_webhook_test.go +++ b/exp/api/v1beta2/awsfargateprofile_webhook_test.go @@ -118,12 +118,14 @@ func TestAWSFargateProfileValidateRoleNameUpdate(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.fargateProfile.ValidateUpdate(tt.before.DeepCopy()) + warn, err := tt.fargateProfile.ValidateUpdate(tt.before.DeepCopy()) if tt.expectErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } @@ -178,12 +180,14 @@ func TestAWSFargateProfileValidateCreate(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.profile.ValidateCreate() + warn, err := tt.profile.ValidateCreate() if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } diff --git a/exp/api/v1beta2/awsmachinepool_webhook.go b/exp/api/v1beta2/awsmachinepool_webhook.go index 8ff20aa8db..93893f306a 100644 --- a/exp/api/v1beta2/awsmachinepool_webhook.go +++ b/exp/api/v1beta2/awsmachinepool_webhook.go @@ -25,6 +25,7 @@ import ( "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" ) @@ -109,7 +110,7 @@ func (r *AWSMachinePool) validateAdditionalSecurityGroups() field.ErrorList { } // ValidateCreate will do any extra validation when creating a AWSMachinePool. -func (r *AWSMachinePool) ValidateCreate() error { +func (r *AWSMachinePool) ValidateCreate() (admission.Warnings, error) { log.Info("AWSMachinePool validate create", "machine-pool", klog.KObj(r)) var allErrs field.ErrorList @@ -121,10 +122,10 @@ func (r *AWSMachinePool) ValidateCreate() error { allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...) if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -132,7 +133,7 @@ func (r *AWSMachinePool) ValidateCreate() error { } // ValidateUpdate will do any extra validation when updating a AWSMachinePool. -func (r *AWSMachinePool) ValidateUpdate(old runtime.Object) error { +func (r *AWSMachinePool) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { var allErrs field.ErrorList allErrs = append(allErrs, r.validateDefaultCoolDown()...) @@ -141,10 +142,10 @@ func (r *AWSMachinePool) ValidateUpdate(old runtime.Object) error { allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...) if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -152,8 +153,8 @@ func (r *AWSMachinePool) ValidateUpdate(old runtime.Object) error { } // ValidateDelete allows you to add any extra validation when deleting. -func (r *AWSMachinePool) ValidateDelete() error { - return nil +func (r *AWSMachinePool) ValidateDelete() (admission.Warnings, error) { + return nil, nil } // Default will set default values for the AWSMachinePool. diff --git a/exp/api/v1beta2/awsmachinepool_webhook_test.go b/exp/api/v1beta2/awsmachinepool_webhook_test.go index 486f6dcff7..be475382fa 100644 --- a/exp/api/v1beta2/awsmachinepool_webhook_test.go +++ b/exp/api/v1beta2/awsmachinepool_webhook_test.go @@ -142,12 +142,14 @@ func TestAWSMachinePoolValidateCreate(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.pool.ValidateCreate() + warn, err := tt.pool.ValidateCreate() if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } @@ -253,12 +255,14 @@ func TestAWSMachinePoolValidateUpdate(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.new.ValidateUpdate(tt.old.DeepCopy()) + warn, err := tt.new.ValidateUpdate(tt.old.DeepCopy()) if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } diff --git a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go index 00aeaec6ee..ccd85a4a1a 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go @@ -29,6 +29,7 @@ import ( "k8s.io/utils/pointer" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks" ) @@ -138,7 +139,7 @@ func (r *AWSManagedMachinePool) validateLaunchTemplate() field.ErrorList { } // ValidateCreate will do any extra validation when creating a AWSManagedMachinePool. -func (r *AWSManagedMachinePool) ValidateCreate() error { +func (r *AWSManagedMachinePool) ValidateCreate() (admission.Warnings, error) { mmpLog.Info("AWSManagedMachinePool validate create", "managed-machine-pool", klog.KObj(r)) var allErrs field.ErrorList @@ -162,10 +163,10 @@ func (r *AWSManagedMachinePool) ValidateCreate() error { allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...) if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -173,11 +174,11 @@ func (r *AWSManagedMachinePool) ValidateCreate() error { } // ValidateUpdate will do any extra validation when updating a AWSManagedMachinePool. -func (r *AWSManagedMachinePool) ValidateUpdate(old runtime.Object) error { +func (r *AWSManagedMachinePool) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { mmpLog.Info("AWSManagedMachinePool validate update", "managed-machine-pool", klog.KObj(r)) oldPool, ok := old.(*AWSManagedMachinePool) if !ok { - return apierrors.NewInvalid(GroupVersion.WithKind("AWSManagedMachinePool").GroupKind(), r.Name, field.ErrorList{ + return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSManagedMachinePool").GroupKind(), r.Name, field.ErrorList{ field.InternalError(nil, errors.New("failed to convert old AWSManagedMachinePool to object")), }) } @@ -197,10 +198,10 @@ func (r *AWSManagedMachinePool) ValidateUpdate(old runtime.Object) error { } if len(allErrs) == 0 { - return nil + return nil, nil } - return apierrors.NewInvalid( + return nil, apierrors.NewInvalid( r.GroupVersionKind().GroupKind(), r.Name, allErrs, @@ -208,10 +209,10 @@ func (r *AWSManagedMachinePool) ValidateUpdate(old runtime.Object) error { } // ValidateDelete allows you to add any extra validation when deleting. -func (r *AWSManagedMachinePool) ValidateDelete() error { +func (r *AWSManagedMachinePool) ValidateDelete() (admission.Warnings, error) { mmpLog.Info("AWSManagedMachinePool validate delete", "managed-machine-pool", klog.KObj(r)) - return nil + return nil, nil } func (r *AWSManagedMachinePool) validateImmutable(old *AWSManagedMachinePool) field.ErrorList { diff --git a/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go b/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go index f123d32a5e..05e743986d 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go @@ -142,12 +142,14 @@ func TestAWSManagedMachinePoolValidateCreate(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.pool.ValidateCreate() + warn, err := tt.pool.ValidateCreate() if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } @@ -256,12 +258,14 @@ func TestAWSManagedMachinePoolValidateUpdate(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tt.new.ValidateUpdate(tt.old.DeepCopy()) + warn, err := tt.new.ValidateUpdate(tt.old.DeepCopy()) if tt.wantErr { g.Expect(err).To(HaveOccurred()) } else { g.Expect(err).To(Succeed()) } + // Nothing emits warnings yet + g.Expect(warn).To(BeEmpty()) }) } } diff --git a/exp/controlleridentitycreator/awscontrolleridentity_controller.go b/exp/controlleridentitycreator/awscontrolleridentity_controller.go index 443c1b91a2..0060d712de 100644 --- a/exp/controlleridentitycreator/awscontrolleridentity_controller.go +++ b/exp/controlleridentitycreator/awscontrolleridentity_controller.go @@ -29,7 +29,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" ekscontrolplanev1 "sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/eks/api/v1beta2" @@ -139,7 +138,7 @@ func (r *AWSControllerIdentityReconciler) SetupWithManager(ctx context.Context, if feature.Gates.Enabled(feature.EKS) { controller.Watches( - &source.Kind{Type: &ekscontrolplanev1.AWSManagedControlPlane{}}, + &ekscontrolplanev1.AWSManagedControlPlane{}, handler.EnqueueRequestsFromMapFunc(r.managedControlPlaneMap), ) } @@ -147,7 +146,7 @@ func (r *AWSControllerIdentityReconciler) SetupWithManager(ctx context.Context, return controller.Complete(r) } -func (r *AWSControllerIdentityReconciler) managedControlPlaneMap(o client.Object) []ctrl.Request { +func (r *AWSControllerIdentityReconciler) managedControlPlaneMap(_ context.Context, o client.Object) []ctrl.Request { managedControlPlane, ok := o.(*ekscontrolplanev1.AWSManagedControlPlane) if !ok { klog.Errorf("Expected a managedControlPlane but got a %T", o) diff --git a/exp/controllers/awsfargatepool_controller.go b/exp/controllers/awsfargatepool_controller.go index ac145ddda9..29ab879e85 100644 --- a/exp/controllers/awsfargatepool_controller.go +++ b/exp/controllers/awsfargatepool_controller.go @@ -29,7 +29,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" ekscontrolplanev1 "sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/eks/api/v1beta2" expinfrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2" @@ -59,7 +58,7 @@ func (r *AWSFargateProfileReconciler) SetupWithManager(ctx context.Context, mgr WithOptions(options). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(logger.FromContext(ctx).GetLogger(), r.WatchFilterValue)). Watches( - &source.Kind{Type: &ekscontrolplanev1.AWSManagedControlPlane{}}, + &ekscontrolplanev1.AWSManagedControlPlane{}, handler.EnqueueRequestsFromMapFunc(managedControlPlaneToFargateProfileMap), ). Complete(r) @@ -183,9 +182,7 @@ func (r *AWSFargateProfileReconciler) reconcileDelete( } func managedControlPlaneToFargateProfileMapFunc(c client.Client, log logger.Wrapper) handler.MapFunc { - return func(o client.Object) []ctrl.Request { - ctx := context.Background() - + return func(ctx context.Context, o client.Object) []ctrl.Request { awsControlPlane, ok := o.(*ekscontrolplanev1.AWSManagedControlPlane) if !ok { klog.Errorf("Expected a AWSManagedControlPlane but got a %T", o) diff --git a/exp/controllers/awsmachinepool_controller.go b/exp/controllers/awsmachinepool_controller.go index 3507f24906..9995ca9f04 100644 --- a/exp/controllers/awsmachinepool_controller.go +++ b/exp/controllers/awsmachinepool_controller.go @@ -35,7 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" "sigs.k8s.io/cluster-api-provider-aws/v2/controllers" @@ -184,7 +183,7 @@ func (r *AWSMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctr WithOptions(options). For(&expinfrav1.AWSMachinePool{}). Watches( - &source.Kind{Type: &expclusterv1.MachinePool{}}, + &expclusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(machinePoolToInfrastructureMapFunc(expinfrav1.GroupVersion.WithKind("AWSMachinePool"))), ). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(logger.FromContext(ctx).GetLogger(), r.WatchFilterValue)). @@ -561,7 +560,7 @@ func getMachinePoolByName(ctx context.Context, c client.Client, namespace, name } func machinePoolToInfrastructureMapFunc(gvk schema.GroupVersionKind) handler.MapFunc { - return func(o client.Object) []reconcile.Request { + return func(ctx context.Context, o client.Object) []reconcile.Request { m, ok := o.(*expclusterv1.MachinePool) if !ok { klog.Error("Expected a MachinePool but got a %T", o) diff --git a/exp/controllers/awsmanagedmachinepool_controller.go b/exp/controllers/awsmanagedmachinepool_controller.go index 8e54e49c5b..47b8396a11 100644 --- a/exp/controllers/awsmanagedmachinepool_controller.go +++ b/exp/controllers/awsmanagedmachinepool_controller.go @@ -33,7 +33,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" ekscontrolplanev1 "sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/eks/api/v1beta2" expinfrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2" @@ -75,11 +74,11 @@ func (r *AWSManagedMachinePoolReconciler) SetupWithManager(ctx context.Context, WithOptions(options). WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(log.GetLogger(), r.WatchFilterValue)). Watches( - &source.Kind{Type: &expclusterv1.MachinePool{}}, + &expclusterv1.MachinePool{}, handler.EnqueueRequestsFromMapFunc(machinePoolToInfrastructureMapFunc(gvk)), ). Watches( - &source.Kind{Type: &ekscontrolplanev1.AWSManagedControlPlane{}}, + &ekscontrolplanev1.AWSManagedControlPlane{}, handler.EnqueueRequestsFromMapFunc(managedControlPlaneToManagedMachinePoolMap), ). Complete(r) @@ -306,8 +305,7 @@ func GetOwnerClusterKey(obj metav1.ObjectMeta) (*client.ObjectKey, error) { } func managedControlPlaneToManagedMachinePoolMapFunc(c client.Client, gvk schema.GroupVersionKind, log logger.Wrapper) handler.MapFunc { - return func(o client.Object) []reconcile.Request { - ctx := context.Background() + return func(ctx context.Context, o client.Object) []reconcile.Request { awsControlPlane, ok := o.(*ekscontrolplanev1.AWSManagedControlPlane) if !ok { klog.Errorf("Expected a AWSManagedControlPlane but got a %T", o) @@ -338,7 +336,7 @@ func managedControlPlaneToManagedMachinePoolMapFunc(c client.Client, gvk schema. var results []ctrl.Request for i := range managedPoolForClusterList.Items { - managedPool := mapFunc(&managedPoolForClusterList.Items[i]) + managedPool := mapFunc(ctx, &managedPoolForClusterList.Items[i]) results = append(results, managedPool...) } diff --git a/go.mod b/go.mod index 22fcd158fc..dbbccdd2de 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-aws/v2 go 1.20 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.4.4 +replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.5.0 require ( github.com/alessio/shellescape v1.4.2 @@ -29,18 +29,18 @@ require ( golang.org/x/crypto v0.12.0 golang.org/x/text v0.12.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.26.5 - k8s.io/apiextensions-apiserver v0.26.1 - k8s.io/apimachinery v0.26.5 - k8s.io/cli-runtime v0.26.5 - k8s.io/client-go v0.26.5 - k8s.io/component-base v0.26.1 + k8s.io/api v0.27.2 + k8s.io/apiextensions-apiserver v0.27.2 + k8s.io/apimachinery v0.27.2 + k8s.io/cli-runtime v0.27.2 + k8s.io/client-go v0.27.2 + k8s.io/component-base v0.27.2 k8s.io/klog/v2 v2.100.1 - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 + k8s.io/utils v0.0.0-20230209194617-a36077c30491 sigs.k8s.io/aws-iam-authenticator v0.6.12 - sigs.k8s.io/cluster-api v1.4.4 - sigs.k8s.io/cluster-api/test v1.4.4 - sigs.k8s.io/controller-runtime v0.14.6 + sigs.k8s.io/cluster-api v1.5.0 + sigs.k8s.io/cluster-api/test v1.5.0 + sigs.k8s.io/controller-runtime v0.15.0 sigs.k8s.io/kustomize/api v0.13.4 sigs.k8s.io/yaml v1.3.0 ) @@ -53,29 +53,35 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/adrg/xdg v0.4.0 // indirect github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chai2010/gettext-go v1.0.2 // indirect github.com/coredns/caddy v1.1.0 // indirect github.com/coredns/corefile-migration v1.0.20 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/daviddengcn/go-colortext v1.0.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v20.10.24+incompatible // indirect + github.com/docker/docker v24.0.5+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect + github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fvbommel/sortorder v1.0.1 // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -84,22 +90,27 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/cel-go v0.12.6 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-github/v48 v48.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f // indirect - github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jonboulle/clockwork v0.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect + github.com/lithammer/dedent v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -114,13 +125,17 @@ require ( github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/prometheus/client_model v0.3.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect github.com/rivo/uniseg v0.4.2 // indirect @@ -128,38 +143,42 @@ require ( github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.15.0 // indirect + github.com/spf13/viper v1.16.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/valyala/fastjson v1.6.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect + github.com/xlab/treeprint v1.1.0 // indirect + go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/net v0.12.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.26.1 // indirect - k8s.io/cluster-bootstrap v0.25.0 // indirect - k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect - k8s.io/kubectl v0.26.0 // indirect + k8s.io/apiserver v0.27.2 // indirect + k8s.io/cluster-bootstrap v0.27.2 // indirect + k8s.io/component-helpers v0.27.2 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/kubectl v0.27.2 // indirect + k8s.io/metrics v0.27.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kind v0.20.0 // indirect + sigs.k8s.io/kustomize/kustomize/v5 v5.0.1 // indirect sigs.k8s.io/kustomize/kyaml v0.14.2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/go.sum b/go.sum index 2f88abed10..cc533211ce 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,8 @@ github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBa github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= +github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/ajeddeloh/go-json v0.0.0-20160803184958-73d058cf8437/go.mod h1:otnto4/Icqn88WCcM4bhIJNSgsh9VLBuspyyCfvof9c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -98,6 +100,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA 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/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= +github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= 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= @@ -129,12 +133,14 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= 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/daviddengcn/go-colortext v1.0.0 h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX8ATG8oKsE= +github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= -github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= +github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -142,9 +148,8 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 h1:7QPwrLT79GlD5sizHf27aoY2RTvw62mO6x7mxkScNk0= github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= -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/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/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= @@ -152,11 +157,14 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y 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 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/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= @@ -164,11 +172,13 @@ github.com/flatcar/ignition v0.36.2 h1:xGHgScUe0P4Fkprjqv7L2CE58emiQgP833OCCn9z2 github.com/flatcar/ignition v0.36.2/go.mod h1:uk1tpzLFRXus4RrvzgMI+IqmmB8a/RGFSBlI+tMTbbA= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= @@ -180,11 +190,10 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 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-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/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= @@ -205,7 +214,7 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -239,8 +248,15 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS 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/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= +github.com/golangplus/bytes v1.0.0/go.mod h1:AdRaCFwmc/00ZzELMWb01soso6W1R/++O1XL80yAn+A= +github.com/golangplus/fmt v1.0.0/go.mod h1:zpM0OfbMCjPtd2qkTD/jX2MgiFCqklhSUFyDW44gVQE= +github.com/golangplus/testing v1.0.0 h1:+ZeeiKZENNOMkTTELoSySazi+XaEhVO0mb+eanrSEUQ= +github.com/golangplus/testing v1.0.0/go.mod h1:ZDreixUV3YzhoVraIDyOzHrr76p6NUh6k/pPg/Q3gYA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cel-go v0.12.6 h1:kjeKudqV0OygrAqA9fX6J55S8gj+Jre2tckIm5RoG4M= github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -281,11 +297,13 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf 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/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -295,6 +313,8 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc h1:f8eY6cV/x1x+HLjOp4r72s/31/V2aTUtg5oKRRPf8/Q= +github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -339,6 +359,8 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -364,6 +386,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -413,10 +436,14 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= 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/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -426,8 +453,9 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.2 h1:HFB2fbVIlhIfCfOW81bZFbiC/RvnpXSdhbF2/DJr134= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -445,8 +473,10 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -463,8 +493,8 @@ github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lF 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.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= @@ -480,7 +510,7 @@ github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -500,8 +530,6 @@ github.com/sigma/bdoor v0.0.0-20160202064022-babf2a4017b0/go.mod h1:WBu7REWbxC/s github.com/sigma/vmw-guestinfo v0.0.0-20160204083807-95dd4126d6e8/go.mod h1:JrRFFC0veyh0cibh0DAhriSY7/gV3kDdNaVUOmfx01U= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -509,12 +537,12 @@ github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -526,13 +554,14 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= 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 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= 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= @@ -542,8 +571,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -560,6 +590,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -575,18 +607,19 @@ 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.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -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/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -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= go4.org v0.0.0-20160314031811-03efcb870d84/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= @@ -600,7 +633,7 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= @@ -681,6 +714,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= 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.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= @@ -695,8 +729,8 @@ 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.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= 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= @@ -726,6 +760,7 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -760,8 +795,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -809,7 +844,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -847,6 +881,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f 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.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= @@ -854,8 +889,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -921,8 +956,8 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D 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/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= 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= @@ -942,8 +977,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 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/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= 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= @@ -957,8 +992,8 @@ 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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.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= @@ -991,7 +1026,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C 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= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -999,47 +1034,53 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.5 h1:Npao/+sMSng6nkEcNydgH3BNo4s5YoBg7iw35HM7Hcw= -k8s.io/api v0.26.5/go.mod h1:O7ICW7lj6+ZQQQ3cxekgCoW+fnGo5kWT0nTHkLZ5grc= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.5 h1:hTQVhJao2piX7vSgCn4Lwd6E0o/+TJIH4NqRf+q4EmE= -k8s.io/apimachinery v0.26.5/go.mod h1:HUvk6wrOP4v22AIYqeCGSQ6xWCHo41J9d6psb3temAg= -k8s.io/apiserver v0.26.1 h1:6vmnAqCDO194SVCPU3MU8NcDgSqsUA62tBUSWrFXhsc= -k8s.io/apiserver v0.26.1/go.mod h1:wr75z634Cv+sifswE9HlAo5FQ7UoUauIICRlOE+5dCg= -k8s.io/cli-runtime v0.26.5 h1:1YTQt6cWaiyA+6NptNMVqkGkh+BFN9cG+PESgz24//U= -k8s.io/cli-runtime v0.26.5/go.mod h1:iZMA8+AVNSownXlJ1h64s59C5/oHSA6hGBarfHjRDl8= -k8s.io/client-go v0.26.5 h1:e8Z44pafL/c6ayF/6qYEypbJoDSakaFxhJ9lqULEJEo= -k8s.io/client-go v0.26.5/go.mod h1:/CYyNt+ZLMvWqMF8h1SvkUXz2ujFWQLwdDrdiQlZ5X0= -k8s.io/cluster-bootstrap v0.25.0 h1:KJ2/r0dV+bLfTK5EBobAVKvjGel3N4Qqh3bvnzh9qPk= -k8s.io/cluster-bootstrap v0.25.0/go.mod h1:x/TCtY3EiuR/rODkA3SvVQT3uSssQLf9cXcmSjdDTe0= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= +k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= +k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= +k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= +k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= +k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/apiserver v0.27.2 h1:p+tjwrcQEZDrEorCZV2/qE8osGTINPuS5ZNqWAvKm5E= +k8s.io/apiserver v0.27.2/go.mod h1:EsOf39d75rMivgvvwjJ3OW/u9n1/BmUMK5otEOJrb1Y= +k8s.io/cli-runtime v0.27.2 h1:9HI8gfReNujKXt16tGOAnb8b4NZ5E+e0mQQHKhFGwYw= +k8s.io/cli-runtime v0.27.2/go.mod h1:9UecpyPDTkhiYY4d9htzRqN+rKomJgyb4wi0OfrmCjw= +k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= +k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= +k8s.io/cluster-bootstrap v0.27.2 h1:OL3onrOwrUD7NQxBUqQwTl1Uu2GQKCkw9BMHpc4PbiA= +k8s.io/cluster-bootstrap v0.27.2/go.mod h1:b++PF0mjUOiTKdPQFlDw7p4V2VquANZ8SfhAwzxZJFM= +k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= +k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= +k8s.io/component-helpers v0.27.2 h1:i9TgWJ6TH8lQ9x4ExHOwhVitrRpBOr7Wn8aZLbBWxkc= +k8s.io/component-helpers v0.27.2/go.mod h1:NwcpSKo1xzXtUtrUjj5NTSVWex84UPua/z0PYDcCzNo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= -k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0= -k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kubectl v0.27.2 h1:sSBM2j94MHBFRWfHIWtEXWCicViQzZsb177rNsKBhZg= +k8s.io/kubectl v0.27.2/go.mod h1:GCOODtxPcrjh+EC611MqREkU8RjYBh10ldQCQ6zpFKw= +k8s.io/metrics v0.27.2 h1:TD6z3dhhN9bgg5YkbTh72bPiC1BsxipBLPBWyC3VQAU= +k8s.io/metrics v0.27.2/go.mod h1:v3OT7U0DBvoAzWVzGZWQhdV4qsRJWchzs/LeVN8bhW4= +k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/aws-iam-authenticator v0.6.12 h1:XlW7djx+FqvyIysdBN60AIKBvHMr+MWVT87U0cG+Qlk= sigs.k8s.io/aws-iam-authenticator v0.6.12/go.mod h1:uh/d/yhtzJXBdevntKgTKRaabgD2T/JI/YdV+9IaycE= -sigs.k8s.io/cluster-api v1.4.4 h1:+V+mzDe+gsWYclosvWlH0wadC8vIUsBvZLcWOYnVWRA= -sigs.k8s.io/cluster-api v1.4.4/go.mod h1:/SeFds4NXJ+Gp2etqHyoNuO6yoxTfVq6Zmd2OGxd/qM= -sigs.k8s.io/cluster-api/test v1.4.4 h1:EhZqbMJ9uY0mptUnSax44FzaScphtCU91LxJq0qfCrI= -sigs.k8s.io/cluster-api/test v1.4.4/go.mod h1:wF8xhW4V0D+Gfrm5uZk57I0up+8WUQNpB2dNTJ1aTiI= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/cluster-api v1.5.0 h1:pwXvzScbAwnrB7EWHTApzW+VQfrj2OSrWAQDC9+bcbU= +sigs.k8s.io/cluster-api v1.5.0/go.mod h1:ZSEP01t8oT6104gB4ljsOwwp5uJcI8SWy8IFp2HUvrc= +sigs.k8s.io/cluster-api/test v1.5.0 h1:ePfrh7S+eaVWy+D0ca4AjzhBqrhXxRE9NTr5te4hCa0= +sigs.k8s.io/cluster-api/test v1.5.0/go.mod h1:Ii5Mh9oVq7QJEtiUkGg9mM2qojjWxvsqmL8TMlwZViM= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8= sigs.k8s.io/kind v0.20.0/go.mod h1:aBlbxg08cauDgZ612shr017/rZwqd7AS563FvpWKPVs= sigs.k8s.io/kustomize/api v0.13.4 h1:E38Hfx0G9R9v7vRgKshviPotJQETG0S2gD3JdHLCAsI= sigs.k8s.io/kustomize/api v0.13.4/go.mod h1:Bkaavz5RKK6ZzP0zgPrB7QbpbBJKiHuD3BB0KujY7Ls= +sigs.k8s.io/kustomize/kustomize/v5 v5.0.1 h1:HWXbyKDNwGqol+s/sMNr/vnfNME/EoMdEraP4ZkUQek= +sigs.k8s.io/kustomize/kustomize/v5 v5.0.1/go.mod h1:Q8o+soB41Pn1y26eXzG9cniuECDpTJe2eKOA1fENCU8= sigs.k8s.io/kustomize/kyaml v0.14.2 h1:9WSwztbzwGszG1bZTziQUmVMrJccnyrLb5ZMKpJGvXw= sigs.k8s.io/kustomize/kyaml v0.14.2/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/main.go b/main.go index dc727d4826..6119088a09 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,6 @@ import ( "errors" "flag" "fmt" - "math/rand" "net/http" _ "net/http/pprof" "os" @@ -113,7 +112,6 @@ var ( ) func main() { - rand.NewSource(time.Now().UnixNano()) initFlags(pflag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() diff --git a/pkg/cloud/services/gc/compose.go b/pkg/cloud/services/gc/compose.go index 395731b18d..08e0b59699 100644 --- a/pkg/cloud/services/gc/compose.go +++ b/pkg/cloud/services/gc/compose.go @@ -1,3 +1,19 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package gc import ( diff --git a/pkg/cloud/services/wait/wait.go b/pkg/cloud/services/wait/wait.go index 9561f3bf27..f9b9bf7a27 100644 --- a/pkg/cloud/services/wait/wait.go +++ b/pkg/cloud/services/wait/wait.go @@ -85,7 +85,7 @@ func WaitForWithRetryable(backoff wait.Backoff, condition wait.ConditionFunc, re }) // If the waitError is not a timeout error (nil or a non-retryable error), return it - if !errors.Is(waitErr, wait.ErrWaitTimeout) { + if !errors.Is(waitErr, wait.ErrorInterrupted(waitErr)) { return waitErr } diff --git a/pkg/cloud/services/wait/wait_test.go b/pkg/cloud/services/wait/wait_test.go index 194ad7efc2..284786915c 100644 --- a/pkg/cloud/services/wait/wait_test.go +++ b/pkg/cloud/services/wait/wait_test.go @@ -66,7 +66,7 @@ func TestWaitForWithRetryable(t *testing.T) { return false, nil }, retryableErrors: retryableErrorCodes, - expectedError: wait.ErrWaitTimeout, + expectedError: wait.ErrorInterrupted(errors.New("timed out waiting for the condition")), }, { name: "error occurred in conditionFunc, returns actual error", @@ -111,7 +111,7 @@ func TestWaitForWithRetryable(t *testing.T) { return false, nil }, retryableErrors: retryableErrorCodes, - expectedError: wait.ErrWaitTimeout, + expectedError: wait.ErrorInterrupted(errors.New("timed out waiting for the condition")), }, { name: "retryable error at first, success after that, returns nil", diff --git a/pkg/internal/bytes/bytes_test.go b/pkg/internal/bytes/bytes_test.go index 623c0a0983..b8d4da4de9 100644 --- a/pkg/internal/bytes/bytes_test.go +++ b/pkg/internal/bytes/bytes_test.go @@ -29,7 +29,7 @@ import ( ) func init() { - rand.NewSource(time.Now().Unix()) + rand.New(rand.NewSource(time.Now().Unix())) } func TestSplitBytes(t *testing.T) { diff --git a/test/e2e/data/e2e_conf.yaml b/test/e2e/data/e2e_conf.yaml index a0c6a388b0..b747b0411d 100644 --- a/test/e2e/data/e2e_conf.yaml +++ b/test/e2e/data/e2e_conf.yaml @@ -26,19 +26,19 @@ images: loadBehavior: tryLoad - name: quay.io/jetstack/cert-manager-controller:v1.12.2 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.5.0 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.5.0 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.5.0 loadBehavior: tryLoad providers: - name: cluster-api type: CoreProvider versions: - - name: v1.4.4 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/core-components.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/core-components.yaml" type: "url" contract: v1beta1 files: @@ -53,8 +53,8 @@ providers: files: - sourcePath: "./shared/v1beta1/metadata.yaml" versions: - - name: v1.4.4 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/bootstrap-components.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/bootstrap-components.yaml" type: "url" contract: v1beta1 files: @@ -69,8 +69,8 @@ providers: files: - sourcePath: "./shared/v1beta1/metadata.yaml" versions: - - name: v1.4.4 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/control-plane-components.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/control-plane-components.yaml" type: "url" contract: v1beta1 files: diff --git a/test/e2e/data/e2e_eks_conf.yaml b/test/e2e/data/e2e_eks_conf.yaml index 5fed6f95b6..41d0856169 100644 --- a/test/e2e/data/e2e_eks_conf.yaml +++ b/test/e2e/data/e2e_eks_conf.yaml @@ -23,19 +23,19 @@ images: loadBehavior: tryLoad - name: quay.io/jetstack/cert-manager-controller:v1.12.2 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.5.0 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.5.0 loadBehavior: tryLoad - - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.4.4 + - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.5.0 loadBehavior: tryLoad providers: - name: cluster-api type: CoreProvider versions: - - name: v1.4.4 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/core-components.yaml" + - name: v1.5.0 + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/core-components.yaml" type: "url" contract: v1beta1 files: @@ -50,8 +50,8 @@ providers: files: - sourcePath: "./shared/v1beta1/metadata.yaml" versions: - - name: v1.4.4 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/bootstrap-components.yaml" + - name: v1.5.0 + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/bootstrap-components.yaml" type: "url" contract: v1beta1 files: @@ -66,8 +66,8 @@ providers: files: - sourcePath: "./shared/v1beta1/metadata.yaml" versions: - - name: v1.4.4 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/control-plane-components.yaml" + - name: v1.5.0 + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/control-plane-components.yaml" type: "url" contract: v1beta1 files: diff --git a/test/e2e/data/shared/v1beta1/metadata.yaml b/test/e2e/data/shared/v1beta1/metadata.yaml index 0fef936953..50392cfd56 100644 --- a/test/e2e/data/shared/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/v1beta1/metadata.yaml @@ -5,6 +5,9 @@ # update this file only when a new major or minor version is released apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 releaseSeries: + - major: 1 + minor: 5 + contract: v1beta1 - major: 1 minor: 4 contract: v1beta1 diff --git a/test/e2e/shared/common.go b/test/e2e/shared/common.go index 978ca80d6f..8cc2d9a6b4 100644 --- a/test/e2e/shared/common.go +++ b/test/e2e/shared/common.go @@ -34,6 +34,7 @@ import ( crclient "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" "sigs.k8s.io/cluster-api/util" @@ -91,6 +92,15 @@ func DumpSpecResourcesAndCleanup(ctx context.Context, specName string, namespace delete(e2eCtx.Environment.Namespaces, namespace) } +type AWSStackLogCollector struct { + E2EContext *E2EContext +} + +// CollectInfrastructureLogs collects log from the infrastructure. +func (k AWSStackLogCollector) CollectInfrastructureLogs(ctx context.Context, managementClusterClient crclient.Client, c *clusterv1.Cluster, outputPath string) error { + return nil +} + func DumpMachines(ctx context.Context, e2eCtx *E2EContext, namespace *corev1.Namespace) { machines := MachinesForSpec(ctx, e2eCtx.Environment.BootstrapClusterProxy, namespace) instances, err := allMachines(ctx, e2eCtx) diff --git a/versions.mk b/versions.mk index 796610259c..742d7e27af 100644 --- a/versions.mk +++ b/versions.mk @@ -16,7 +16,7 @@ MDBOOK_VERSION := v0.4.5 PLANTUML_VERSION := 1.2020.16 GH_VERSION := 2.7.0 CERT_MANAGER_VERSION := v1.12.2 -CAPI_VERSION := v1.4.4 +CAPI_VERSION := v1.5.0 KPROMO_VERSION := v3.6.0 YQ_VERSION := v4.25.2 GOLANGCI_LINT_VERSION := v1.52.2 From 7d6abef85fd12738d41676e33a336f1442764741 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 14 Jul 2023 17:23:19 +0300 Subject: [PATCH 2/5] Bump golang to 1.20.6 Signed-off-by: Furkat Gofurov --- docs/book/src/development/development.md | 2 +- docs/triage-party/Dockerfile | 2 +- hack/ensure-go.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/book/src/development/development.md b/docs/book/src/development/development.md index 0816d4000f..2587204887 100644 --- a/docs/book/src/development/development.md +++ b/docs/book/src/development/development.md @@ -5,7 +5,7 @@ ### Install prerequisites 1. Install [go][go] - - Get the latest patch version for go v1.19. + - Get the latest patch version for go v1.20. 2. Install [jq][jq] - `brew install jq` on macOS. - `chocolatey install jq` on Windows. diff --git a/docs/triage-party/Dockerfile b/docs/triage-party/Dockerfile index 109dc11a66..2ddc982cfc 100644 --- a/docs/triage-party/Dockerfile +++ b/docs/triage-party/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. -FROM golang:1.20.5 as builder +FROM golang:1.20.6 as builder RUN go get github.com/google/triage-party/cmd/server RUN go install github.com/google/triage-party/cmd/server@latest diff --git a/hack/ensure-go.sh b/hack/ensure-go.sh index 5016956610..b6a763b6a8 100755 --- a/hack/ensure-go.sh +++ b/hack/ensure-go.sh @@ -31,7 +31,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(go version)" local minimum_go_version - minimum_go_version=go1.20.0 + minimum_go_version=go1.20.5 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then cat < Date: Fri, 21 Jul 2023 11:23:57 +0100 Subject: [PATCH 3/5] test: fix tests after bumping controller-runtime The tests where failing after upgrading controller-runtime due to changes in the fake client. Signed-off-by: Richard Case --- controllers/awscluster_controller_unit_test.go | 2 +- controllers/awsmachine_controller_unit_test.go | 6 +++--- controllers/helpers_test.go | 4 ++++ pkg/cloud/services/ec2/bastion_test.go | 13 +++---------- pkg/cloud/services/eks/oidc_test.go | 2 +- pkg/cloud/services/elb/loadbalancer_test.go | 8 ++------ pkg/cloud/services/network/natgateways_test.go | 6 ++---- pkg/cloud/services/network/vpc_test.go | 6 +++--- .../services/securitygroup/securitygroups_test.go | 6 +----- 9 files changed, 20 insertions(+), 33 deletions(-) diff --git a/controllers/awscluster_controller_unit_test.go b/controllers/awscluster_controller_unit_test.go index 2bc74d4cd7..0c5778d74a 100644 --- a/controllers/awscluster_controller_unit_test.go +++ b/controllers/awscluster_controller_unit_test.go @@ -157,7 +157,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { "SessionToken": []byte("session-token"), }, } - csClient := fake.NewClientBuilder().WithObjects(awsCluster, secret).Build() + csClient := fake.NewClientBuilder().WithObjects(awsCluster, secret).WithStatusSubresource(awsCluster).Build() mockCtrl = gomock.NewController(t) ec2Svc = mock_services.NewMockEC2Interface(mockCtrl) diff --git a/controllers/awsmachine_controller_unit_test.go b/controllers/awsmachine_controller_unit_test.go index 644c16065e..b133f4bc0b 100644 --- a/controllers/awsmachine_controller_unit_test.go +++ b/controllers/awsmachine_controller_unit_test.go @@ -105,7 +105,7 @@ func TestAWSMachineReconciler(t *testing.T) { }, } - client := fake.NewClientBuilder().WithObjects(awsMachine, secret, secretIgnition).Build() + client := fake.NewClientBuilder().WithObjects(awsMachine, secret, secretIgnition).WithStatusSubresource(awsMachine).Build() ms, err = scope.NewMachineScope( scope.MachineScopeParams{ Client: client, @@ -136,7 +136,7 @@ func TestAWSMachineReconciler(t *testing.T) { cs, err = scope.NewClusterScope( scope.ClusterScopeParams{ - Client: fake.NewClientBuilder().WithObjects(awsMachine, secret).Build(), + Client: fake.NewClientBuilder().WithObjects(awsMachine, secret).WithStatusSubresource(awsMachine).Build(), Cluster: &clusterv1.Cluster{}, AWSCluster: &infrav1.AWSCluster{ObjectMeta: metav1.ObjectMeta{Name: "test"}}, }, @@ -2495,7 +2495,7 @@ func TestAWSMachineReconcilerReconcileDefaultsToLoadBalancerTypeClassic(t *testi }, } - fakeClient := fake.NewClientBuilder().WithObjects(ownerCluster, awsCluster, ownerMachine, awsMachine, controllerIdentity).Build() + fakeClient := fake.NewClientBuilder().WithObjects(ownerCluster, awsCluster, ownerMachine, awsMachine, controllerIdentity).WithStatusSubresource(awsCluster, awsMachine).Build() recorder := record.NewFakeRecorder(10) reconciler := &AWSMachineReconciler{ diff --git a/controllers/helpers_test.go b/controllers/helpers_test.go index 5a89e21bcd..e998ff06e5 100644 --- a/controllers/helpers_test.go +++ b/controllers/helpers_test.go @@ -130,6 +130,10 @@ func expectAWSClusterConditions(g *WithT, m *infrav1.AWSCluster, expected []cond func getAWSCluster(name, namespace string) infrav1.AWSCluster { return infrav1.AWSCluster{ + TypeMeta: metav1.TypeMeta{ + Kind: "AWSCluster", + APIVersion: infrav1.GroupVersion.Identifier(), + }, ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, diff --git a/pkg/cloud/services/ec2/bastion_test.go b/pkg/cloud/services/ec2/bastion_test.go index 822361a51c..b1f8135992 100644 --- a/pkg/cloud/services/ec2/bastion_test.go +++ b/pkg/cloud/services/ec2/bastion_test.go @@ -17,7 +17,6 @@ limitations under the License. package ec2 import ( - "context" "fmt" "testing" @@ -186,9 +185,7 @@ func TestServiceDeleteBastion(t *testing.T) { }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() scope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ @@ -420,9 +417,7 @@ func TestServiceReconcileBastion(t *testing.T) { }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() scope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ @@ -655,9 +650,7 @@ func TestServiceReconcileBastionUSGOV(t *testing.T) { }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() scope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ diff --git a/pkg/cloud/services/eks/oidc_test.go b/pkg/cloud/services/eks/oidc_test.go index e4fd55b564..b864886351 100644 --- a/pkg/cloud/services/eks/oidc_test.go +++ b/pkg/cloud/services/eks/oidc_test.go @@ -151,7 +151,7 @@ func TestOIDCReconcile(t *testing.T) { "value": kubeConfig, }, } - client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(controlPlane, secret).Build() + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(controlPlane, secret).WithStatusSubresource(controlPlane).Build() scope, _ := scope.NewManagedControlPlaneScope(scope.ManagedControlPlaneScopeParams{ Client: client, Cluster: &clusterv1.Cluster{ diff --git a/pkg/cloud/services/elb/loadbalancer_test.go b/pkg/cloud/services/elb/loadbalancer_test.go index 2cd0312590..41ec7283ed 100644 --- a/pkg/cloud/services/elb/loadbalancer_test.go +++ b/pkg/cloud/services/elb/loadbalancer_test.go @@ -1744,9 +1744,7 @@ func TestDeleteAPIServerELB(t *testing.T) { }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() clusterScope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ @@ -1935,9 +1933,7 @@ func TestDeleteNLB(t *testing.T) { }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() clusterScope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ diff --git a/pkg/cloud/services/network/natgateways_test.go b/pkg/cloud/services/network/natgateways_test.go index cc223f1859..f8cb2cb155 100644 --- a/pkg/cloud/services/network/natgateways_test.go +++ b/pkg/cloud/services/network/natgateways_test.go @@ -17,7 +17,6 @@ limitations under the License. package network import ( - "context" "testing" "github.com/aws/aws-sdk-go/aws" @@ -381,9 +380,8 @@ func TestReconcileNatGateways(t *testing.T) { }, }, } - client := fake.NewClientBuilder().WithScheme(scheme).Build() - ctx := context.TODO() - client.Create(ctx, awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() + clusterScope, err := scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{Name: "test-cluster"}, diff --git a/pkg/cloud/services/network/vpc_test.go b/pkg/cloud/services/network/vpc_test.go index dada30a38c..3bd4163499 100644 --- a/pkg/cloud/services/network/vpc_test.go +++ b/pkg/cloud/services/network/vpc_test.go @@ -17,7 +17,6 @@ limitations under the License. package network import ( - "context" "testing" "github.com/aws/aws-sdk-go/aws" @@ -710,7 +709,7 @@ func TestDeleteVPC(t *testing.T) { func getClusterScope(vpcSpec *infrav1.VPCSpec, additionalTags map[string]string) (*scope.ClusterScope, error) { scheme := runtime.NewScheme() _ = infrav1.AddToScheme(scheme) - client := fake.NewClientBuilder().WithScheme(scheme).Build() + awsCluster := &infrav1.AWSCluster{ ObjectMeta: metav1.ObjectMeta{Name: "test"}, Spec: infrav1.AWSClusterSpec{ @@ -720,7 +719,8 @@ func getClusterScope(vpcSpec *infrav1.VPCSpec, additionalTags map[string]string) AdditionalTags: additionalTags, }, } - client.Create(context.TODO(), awsCluster) + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() + return scope.NewClusterScope(scope.ClusterScopeParams{ Cluster: &clusterv1.Cluster{ ObjectMeta: metav1.ObjectMeta{Name: "test-cluster"}, diff --git a/pkg/cloud/services/securitygroup/securitygroups_test.go b/pkg/cloud/services/securitygroup/securitygroups_test.go index aec3407191..03e279587e 100644 --- a/pkg/cloud/services/securitygroup/securitygroups_test.go +++ b/pkg/cloud/services/securitygroup/securitygroups_test.go @@ -1025,17 +1025,13 @@ func TestDeleteSecurityGroups(t *testing.T) { g.Expect(infrav1.AddToScheme(scheme)).NotTo(HaveOccurred()) awsCluster := &infrav1.AWSCluster{ - TypeMeta: metav1.TypeMeta{ - APIVersion: infrav1.GroupVersion.String(), - Kind: "AWSCluster", - }, ObjectMeta: metav1.ObjectMeta{Name: "test"}, Spec: infrav1.AWSClusterSpec{ NetworkSpec: *tc.input, }, } - client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).Build() + client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(awsCluster).WithStatusSubresource(awsCluster).Build() cs, err := scope.NewClusterScope(scope.ClusterScopeParams{ Client: client, From 7ca3a03cbb02b608866df0ea3bb0aaf27ef20322 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 21 Jul 2023 13:58:17 +0300 Subject: [PATCH 4/5] Bump golangci-lint to v1.53.3 and make necessary changes Signed-off-by: Furkat Gofurov --- .golangci.yml | 8 +++- api/v1beta2/awscluster_webhook_test.go | 2 +- api/v1beta2/bastion.go | 2 +- .../eks/controllers/eksconfig_controller.go | 24 +++++----- .../eksconfig_controller_reconciler_test.go | 15 ++---- .../controllers/eksconfig_controller_test.go | 7 +-- controllers/awscluster_controller.go | 18 +++---- controllers/awscluster_controller_test.go | 12 ++--- .../awscluster_controller_unit_test.go | 12 ++--- controllers/awsmachine_controller_test.go | 2 +- .../awsmachine_controller_unit_test.go | 2 +- .../awscontrolleridentity_controller_test.go | 2 +- exp/controllers/awsmachinepool_controller.go | 48 +++++++++---------- .../awsmachinepool_controller_test.go | 30 ++++++------ .../awsmanagedmachinepool_controller.go | 28 +++++------ .../awsinstancestate_controller_test.go | 6 +-- hack/tools/Makefile | 2 +- pkg/cloud/services/elb/loadbalancer_test.go | 4 +- .../unmanaged/unmanaged_functional_test.go | 2 +- versions.mk | 2 +- 20 files changed, 112 insertions(+), 116 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 1a9ca69fcc..1db8e247b0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -87,8 +87,6 @@ linters-settings: alias: apiextensionsv1 - pkg: k8s.io/apimachinery/pkg/apis/meta/v1 alias: metav1 - - pkg: k8s.io/apimachinery/pkg/api/errors - alias: apierrors - pkg: k8s.io/apimachinery/pkg/util/errors alias: kerrors - pkg: sigs.k8s.io/controller-runtime/pkg/conversion @@ -165,6 +163,12 @@ linters-settings: go: "1.20" stylecheck: go: "1.20" + depguard: + rules: + main: + deny: + - pkg: "io/ioutil" + desc: "ioutil is deprecated starting with Go 1.16" issues: max-same-issues: 0 max-issues-per-linter: 0 diff --git a/api/v1beta2/awscluster_webhook_test.go b/api/v1beta2/awscluster_webhook_test.go index dfce2b2c7c..cbc84b4630 100644 --- a/api/v1beta2/awscluster_webhook_test.go +++ b/api/v1beta2/awscluster_webhook_test.go @@ -364,7 +364,7 @@ func TestAWSClusterValidateCreate(t *testing.T) { g.Eventually(func() bool { err := testEnv.Get(ctx, key, c) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) if tt.expect != nil { tt.expect(g, c.Spec.ControlPlaneLoadBalancer) diff --git a/api/v1beta2/bastion.go b/api/v1beta2/bastion.go index b8b0aee65e..16c9295160 100644 --- a/api/v1beta2/bastion.go +++ b/api/v1beta2/bastion.go @@ -56,7 +56,7 @@ func validateSSHKeyName(sshKeyName *string) field.ErrorList { // nil is accepted case sshKeyName != nil && *sshKeyName == "": // empty string is accepted - case sshKeyName != nil && !sshKeyValidNameRegex.Match([]byte(*sshKeyName)): + case sshKeyName != nil && !sshKeyValidNameRegex.MatchString(*sshKeyName): allErrs = append(allErrs, field.Invalid(field.NewPath("sshKeyName"), sshKeyName, "Name is invalid. Must be specified in ASCII and must not start or end in whitespace")) } return allErrs diff --git a/bootstrap/eks/controllers/eksconfig_controller.go b/bootstrap/eks/controllers/eksconfig_controller.go index 4fbbfd46cc..3bfb5f7a32 100644 --- a/bootstrap/eks/controllers/eksconfig_controller.go +++ b/bootstrap/eks/controllers/eksconfig_controller.go @@ -143,7 +143,7 @@ func (r *EKSConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( } }() - return r.joinWorker(ctx, cluster, config, configOwner) + return ctrl.Result{}, r.joinWorker(ctx, cluster, config, configOwner) } func (r *EKSConfigReconciler) resolveFiles(ctx context.Context, cfg *eksbootstrapv1.EKSConfig) ([]eksbootstrapv1.File, error) { @@ -181,7 +181,7 @@ func (r *EKSConfigReconciler) resolveSecretFileContent(ctx context.Context, ns s return data, nil } -func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1.Cluster, config *eksbootstrapv1.EKSConfig, configOwner *bsutil.ConfigOwner) (ctrl.Result, error) { +func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1.Cluster, config *eksbootstrapv1.EKSConfig, configOwner *bsutil.ConfigOwner) error { log := logger.FromContext(ctx) // only need to reconcile the secret for Machine kinds once, but MachinePools need updates for new launch templates @@ -195,15 +195,15 @@ func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1 err := r.Client.Get(ctx, secretKey, existingSecret) switch { case err == nil: - return ctrl.Result{}, nil + return nil case !apierrors.IsNotFound(err): log.Error(err, "unable to check for existing bootstrap secret") - return ctrl.Result{}, err + return err } } if cluster.Spec.ControlPlaneRef == nil || cluster.Spec.ControlPlaneRef.Kind != "AWSManagedControlPlane" { - return ctrl.Result{}, errors.New("Cluster's controlPlaneRef needs to be an AWSManagedControlPlane in order to use the EKS bootstrap provider") + return errors.New("Cluster's controlPlaneRef needs to be an AWSManagedControlPlane in order to use the EKS bootstrap provider") } if !cluster.Status.InfrastructureReady { @@ -212,18 +212,18 @@ func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1 eksbootstrapv1.DataSecretAvailableCondition, eksbootstrapv1.WaitingForClusterInfrastructureReason, clusterv1.ConditionSeverityInfo, "") - return ctrl.Result{}, nil + return nil } if !conditions.IsTrue(cluster, clusterv1.ControlPlaneInitializedCondition) { log.Info("Control Plane has not yet been initialized") conditions.MarkFalse(config, eksbootstrapv1.DataSecretAvailableCondition, eksbootstrapv1.WaitingForControlPlaneInitializationReason, clusterv1.ConditionSeverityInfo, "") - return ctrl.Result{}, nil + return nil } controlPlane := &ekscontrolplanev1.AWSManagedControlPlane{} if err := r.Get(ctx, client.ObjectKey{Name: cluster.Spec.ControlPlaneRef.Name, Namespace: cluster.Spec.ControlPlaneRef.Namespace}, controlPlane); err != nil { - return ctrl.Result{}, err + return err } log.Info("Generating userdata") @@ -231,7 +231,7 @@ func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1 if err != nil { log.Info("Failed to resolve files for user data") conditions.MarkFalse(config, eksbootstrapv1.DataSecretAvailableCondition, eksbootstrapv1.DataSecretGenerationFailedReason, clusterv1.ConditionSeverityWarning, err.Error()) - return ctrl.Result{}, err + return err } nodeInput := &userdata.NodeInput{ @@ -276,17 +276,17 @@ func (r *EKSConfigReconciler) joinWorker(ctx context.Context, cluster *clusterv1 if err != nil { log.Error(err, "Failed to create a worker join configuration") conditions.MarkFalse(config, eksbootstrapv1.DataSecretAvailableCondition, eksbootstrapv1.DataSecretGenerationFailedReason, clusterv1.ConditionSeverityWarning, "") - return ctrl.Result{}, err + return err } // store userdata as secret if err := r.storeBootstrapData(ctx, cluster, config, userDataScript); err != nil { log.Error(err, "Failed to store bootstrap data") conditions.MarkFalse(config, eksbootstrapv1.DataSecretAvailableCondition, eksbootstrapv1.DataSecretGenerationFailedReason, clusterv1.ConditionSeverityWarning, "") - return ctrl.Result{}, err + return err } - return ctrl.Result{}, nil + return nil } func (r *EKSConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, option controller.Options) error { diff --git a/bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go b/bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go index 4b3667bc91..cdad8ed84b 100644 --- a/bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go +++ b/bootstrap/eks/controllers/eksconfig_controller_reconciler_test.go @@ -56,9 +56,8 @@ func TestEKSConfigReconciler(t *testing.T) { } t.Logf(fmt.Sprintf("Calling reconcile on cluster '%s' and config '%s' should requeue", cluster.Name, config.Name)) g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) + err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) gomega.Expect(err).NotTo(HaveOccurred()) - gomega.Expect(result.Requeue).To(BeFalse()) }).Should(Succeed()) t.Logf(fmt.Sprintf("Secret '%s' should exist and be correct", config.Name)) @@ -111,9 +110,8 @@ func TestEKSConfigReconciler(t *testing.T) { } t.Logf(fmt.Sprintf("Calling reconcile on cluster '%s' and config '%s' should requeue", cluster.Name, config.Name)) g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(ctx, cluster, config, configOwner("MachinePool")) + err := reconciler.joinWorker(ctx, cluster, config, configOwner("MachinePool")) gomega.Expect(err).NotTo(HaveOccurred()) - gomega.Expect(result.Requeue).To(BeFalse()) }).Should(Succeed()) t.Logf(fmt.Sprintf("Secret '%s' should exist and be correct", config.Name)) @@ -136,9 +134,8 @@ func TestEKSConfigReconciler(t *testing.T) { } t.Logf(dump("config", config)) g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(ctx, cluster, config, configOwner("MachinePool")) + err := reconciler.joinWorker(ctx, cluster, config, configOwner("MachinePool")) gomega.Expect(err).NotTo(HaveOccurred()) - gomega.Expect(result.Requeue).To(BeFalse()) }).Should(Succeed()) t.Logf(fmt.Sprintf("Secret '%s' should exist and be up to date", config.Name)) @@ -184,9 +181,8 @@ func TestEKSConfigReconciler(t *testing.T) { } t.Logf(fmt.Sprintf("Calling reconcile on cluster '%s' and config '%s' should requeue", cluster.Name, config.Name)) g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) + err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) gomega.Expect(err).NotTo(HaveOccurred()) - gomega.Expect(result.Requeue).To(BeFalse()) }).Should(Succeed()) t.Logf(fmt.Sprintf("Secret '%s' should exist and be out of date", config.Name)) @@ -258,9 +254,8 @@ func TestEKSConfigReconciler(t *testing.T) { } t.Logf(fmt.Sprintf("Calling reconcile on cluster '%s' and config '%s' should requeue", cluster.Name, config.Name)) g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) + err := reconciler.joinWorker(ctx, cluster, config, configOwner("Machine")) gomega.Expect(err).NotTo(HaveOccurred()) - gomega.Expect(result.Requeue).To(BeFalse()) }).Should(Succeed()) secretList := &corev1.SecretList{} diff --git a/bootstrap/eks/controllers/eksconfig_controller_test.go b/bootstrap/eks/controllers/eksconfig_controller_test.go index ebfd820dcd..bb82d14124 100644 --- a/bootstrap/eks/controllers/eksconfig_controller_test.go +++ b/bootstrap/eks/controllers/eksconfig_controller_test.go @@ -22,7 +22,6 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "sigs.k8s.io/controller-runtime/pkg/reconcile" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bsutil "sigs.k8s.io/cluster-api/bootstrap/util" @@ -44,8 +43,7 @@ func TestEKSConfigReconcilerReturnEarlyIfClusterInfraNotReady(t *testing.T) { } g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(context.Background(), cluster, config, configOwner("Machine")) - gomega.Expect(result).To(Equal(reconcile.Result{})) + err := reconciler.joinWorker(context.Background(), cluster, config, configOwner("Machine")) gomega.Expect(err).NotTo(HaveOccurred()) }).Should(Succeed()) } @@ -66,8 +64,7 @@ func TestEKSConfigReconcilerReturnEarlyIfClusterControlPlaneNotInitialized(t *te } g.Eventually(func(gomega Gomega) { - result, err := reconciler.joinWorker(context.Background(), cluster, config, configOwner("Machine")) - gomega.Expect(result).To(Equal(reconcile.Result{})) + err := reconciler.joinWorker(context.Background(), cluster, config, configOwner("Machine")) gomega.Expect(err).NotTo(HaveOccurred()) }).Should(Succeed()) } diff --git a/controllers/awscluster_controller.go b/controllers/awscluster_controller.go index ba792dc910..b9b669d685 100644 --- a/controllers/awscluster_controller.go +++ b/controllers/awscluster_controller.go @@ -191,14 +191,14 @@ func (r *AWSClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Handle deleted clusters if !awsCluster.DeletionTimestamp.IsZero() { - return r.reconcileDelete(ctx, clusterScope) + return ctrl.Result{}, r.reconcileDelete(ctx, clusterScope) } // Handle non-deleted clusters return r.reconcileNormal(clusterScope) } -func (r *AWSClusterReconciler) reconcileDelete(ctx context.Context, clusterScope *scope.ClusterScope) (reconcile.Result, error) { +func (r *AWSClusterReconciler) reconcileDelete(ctx context.Context, clusterScope *scope.ClusterScope) error { clusterScope.Info("Reconciling AWSCluster delete") ec2svc := r.getEC2Service(clusterScope) @@ -217,39 +217,39 @@ func (r *AWSClusterReconciler) reconcileDelete(ctx context.Context, clusterScope if err := elbsvc.DeleteLoadbalancers(); err != nil { clusterScope.Error(err, "error deleting load balancer") - return reconcile.Result{}, err + return err } if err := ec2svc.DeleteBastion(); err != nil { clusterScope.Error(err, "error deleting bastion") - return reconcile.Result{}, err + return err } if err := sgService.DeleteSecurityGroups(); err != nil { clusterScope.Error(err, "error deleting security groups") - return reconcile.Result{}, err + return err } if r.ExternalResourceGC { gcSvc := gc.NewService(clusterScope, gc.WithGCStrategy(r.AlternativeGCStrategy)) if gcErr := gcSvc.ReconcileDelete(ctx); gcErr != nil { - return reconcile.Result{}, fmt.Errorf("failed delete reconcile for gc service: %w", gcErr) + return fmt.Errorf("failed delete reconcile for gc service: %w", gcErr) } } if err := networkSvc.DeleteNetwork(); err != nil { clusterScope.Error(err, "error deleting network") - return reconcile.Result{}, err + return err } if err := s3Service.DeleteBucket(); err != nil { - return reconcile.Result{}, errors.Wrapf(err, "error deleting S3 Bucket") + return errors.Wrapf(err, "error deleting S3 Bucket") } // Cluster is deleted so remove the finalizer. controllerutil.RemoveFinalizer(clusterScope.AWSCluster, infrav1.ClusterFinalizer) - return reconcile.Result{}, nil + return nil } func (r *AWSClusterReconciler) reconcileNormal(clusterScope *scope.ClusterScope) (reconcile.Result, error) { diff --git a/controllers/awscluster_controller_test.go b/controllers/awscluster_controller_test.go index 581b74a362..be32935bef 100644 --- a/controllers/awscluster_controller_test.go +++ b/controllers/awscluster_controller_test.go @@ -98,7 +98,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { } err := testEnv.Get(ctx, key, cluster) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) defer teardown() defer t.Cleanup(func() { @@ -197,7 +197,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { } err := testEnv.Get(ctx, key, cluster) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) defer teardown() defer t.Cleanup(func() { @@ -303,7 +303,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { } err := testEnv.Get(ctx, key, cluster) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) defer t.Cleanup(func() { g.Expect(testEnv.Cleanup(ctx, &awsCluster, controllerIdentity, ns)).To(Succeed()) }) @@ -333,7 +333,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { _, err = reconciler.reconcileNormal(cs) g.Expect(err.Error()).To(ContainSubstring("The maximum number of VPCs has been reached")) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).To(BeNil()) }) t.Run("Should successfully delete AWSCluster with managed VPC", func(t *testing.T) { @@ -368,7 +368,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { } err := testEnv.Get(ctx, key, cluster) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) defer t.Cleanup(func() { g.Expect(testEnv.Cleanup(ctx, &awsCluster, controllerIdentity, ns)).To(Succeed()) @@ -410,7 +410,7 @@ func TestAWSClusterReconcilerIntegrationTests(t *testing.T) { return sgSvc } - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).To(BeNil()) expectAWSClusterConditions(g, cs.AWSCluster, []conditionAssertion{{infrav1.LoadBalancerReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, clusterv1.DeletedReason}, {infrav1.BastionHostReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, clusterv1.DeletedReason}, diff --git a/controllers/awscluster_controller_unit_test.go b/controllers/awscluster_controller_unit_test.go index 0c5778d74a..e074b4b072 100644 --- a/controllers/awscluster_controller_unit_test.go +++ b/controllers/awscluster_controller_unit_test.go @@ -412,7 +412,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { }, ) g.Expect(err).To(BeNil()) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).To(BeNil()) g.Expect(awsCluster.GetFinalizers()).ToNot(ContainElement(infrav1.ClusterFinalizer)) }) @@ -438,7 +438,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { }, ) g.Expect(err).To(BeNil()) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).ToNot(BeNil()) g.Expect(awsCluster.GetFinalizers()).To(ContainElement(infrav1.ClusterFinalizer)) }) @@ -461,7 +461,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { }, ) g.Expect(err).To(BeNil()) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).ToNot(BeNil()) g.Expect(awsCluster.GetFinalizers()).To(ContainElement(infrav1.ClusterFinalizer)) }) @@ -485,7 +485,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { }, ) g.Expect(err).To(BeNil()) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).ToNot(BeNil()) g.Expect(awsCluster.GetFinalizers()).To(ContainElement(infrav1.ClusterFinalizer)) }) @@ -510,7 +510,7 @@ func TestAWSClusterReconcileOperations(t *testing.T) { }, ) g.Expect(err).To(BeNil()) - _, err = reconciler.reconcileDelete(ctx, cs) + err = reconciler.reconcileDelete(ctx, cs) g.Expect(err).ToNot(BeNil()) g.Expect(awsCluster.GetFinalizers()).To(ContainElement(infrav1.ClusterFinalizer)) }) @@ -621,7 +621,7 @@ func createCluster(g *WithT, awsCluster *infrav1.AWSCluster, namespace string) { } err := testEnv.Get(ctx, key, cluster) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) } } diff --git a/controllers/awsmachine_controller_test.go b/controllers/awsmachine_controller_test.go index 6126469a57..0595c3dcc1 100644 --- a/controllers/awsmachine_controller_test.go +++ b/controllers/awsmachine_controller_test.go @@ -419,7 +419,7 @@ func createAWSMachine(g *WithT, awsMachine *infrav1.AWSMachine) { Namespace: awsMachine.Namespace, } return testEnv.Get(ctx, key, machine) == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) } func getAWSMachine() *infrav1.AWSMachine { diff --git a/controllers/awsmachine_controller_unit_test.go b/controllers/awsmachine_controller_unit_test.go index b133f4bc0b..6aa7ca7814 100644 --- a/controllers/awsmachine_controller_unit_test.go +++ b/controllers/awsmachine_controller_unit_test.go @@ -2338,7 +2338,7 @@ func TestAWSMachineReconcilerReconcile(t *testing.T) { } err = testEnv.Get(ctx, key, machine) return err == nil - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) result, err := reconciler.Reconcile(ctx, ctrl.Request{ NamespacedName: client.ObjectKey{ diff --git a/exp/controlleridentitycreator/awscontrolleridentity_controller_test.go b/exp/controlleridentitycreator/awscontrolleridentity_controller_test.go index a96130f0da..94415dbca3 100644 --- a/exp/controlleridentitycreator/awscontrolleridentity_controller_test.go +++ b/exp/controlleridentitycreator/awscontrolleridentity_controller_test.go @@ -54,6 +54,6 @@ func TestAWSControllerIdentityController(t *testing.T) { return true } return false - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) }) } diff --git a/exp/controllers/awsmachinepool_controller.go b/exp/controllers/awsmachinepool_controller.go index 9995ca9f04..831276cad2 100644 --- a/exp/controllers/awsmachinepool_controller.go +++ b/exp/controllers/awsmachinepool_controller.go @@ -163,16 +163,16 @@ func (r *AWSMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Reque switch infraScope := infraCluster.(type) { case *scope.ManagedControlPlaneScope: if !awsMachinePool.ObjectMeta.DeletionTimestamp.IsZero() { - return r.reconcileDelete(machinePoolScope, infraScope, infraScope) + return ctrl.Result{}, r.reconcileDelete(machinePoolScope, infraScope, infraScope) } - return r.reconcileNormal(ctx, machinePoolScope, infraScope, infraScope) + return ctrl.Result{}, r.reconcileNormal(ctx, machinePoolScope, infraScope, infraScope) case *scope.ClusterScope: if !awsMachinePool.ObjectMeta.DeletionTimestamp.IsZero() { - return r.reconcileDelete(machinePoolScope, infraScope, infraScope) + return ctrl.Result{}, r.reconcileDelete(machinePoolScope, infraScope, infraScope) } - return r.reconcileNormal(ctx, machinePoolScope, infraScope, infraScope) + return ctrl.Result{}, r.reconcileNormal(ctx, machinePoolScope, infraScope, infraScope) default: return ctrl.Result{}, errors.New("infraCluster has unknown type") } @@ -190,7 +190,7 @@ func (r *AWSMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctr Complete(r) } -func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machinePoolScope *scope.MachinePoolScope, clusterScope cloud.ClusterScoper, ec2Scope scope.EC2Scope) (ctrl.Result, error) { +func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machinePoolScope *scope.MachinePoolScope, clusterScope cloud.ClusterScoper, ec2Scope scope.EC2Scope) error { clusterScope.Info("Reconciling AWSMachinePool") // If the AWSMachine is in an error state, return early. @@ -199,28 +199,28 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP // TODO: If we are in a failed state, delete the secret regardless of instance state - return ctrl.Result{}, nil + return nil } // If the AWSMachinepool doesn't have our finalizer, add it if controllerutil.AddFinalizer(machinePoolScope.AWSMachinePool, expinfrav1.MachinePoolFinalizer) { // Register finalizer immediately to avoid orphaning AWS resources if err := machinePoolScope.PatchObject(); err != nil { - return ctrl.Result{}, err + return err } } if !machinePoolScope.Cluster.Status.InfrastructureReady { machinePoolScope.Info("Cluster infrastructure is not ready yet") conditions.MarkFalse(machinePoolScope.AWSMachinePool, expinfrav1.ASGReadyCondition, infrav1.WaitingForClusterInfrastructureReason, clusterv1.ConditionSeverityInfo, "") - return ctrl.Result{}, nil + return nil } // Make sure bootstrap data is available and populated if machinePoolScope.MachinePool.Spec.Template.Spec.Bootstrap.DataSecretName == nil { machinePoolScope.Info("Bootstrap data secret reference is not yet available") conditions.MarkFalse(machinePoolScope.AWSMachinePool, expinfrav1.ASGReadyCondition, infrav1.WaitingForBootstrapDataReason, clusterv1.ConditionSeverityInfo, "") - return ctrl.Result{}, nil + return nil } ec2Svc := r.getEC2Service(ec2Scope) @@ -253,7 +253,7 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP if err := ec2Svc.ReconcileLaunchTemplate(machinePoolScope, canUpdateLaunchTemplate, runPostLaunchTemplateUpdateOperation); err != nil { r.Recorder.Eventf(machinePoolScope.AWSMachinePool, corev1.EventTypeWarning, "FailedLaunchTemplateReconcile", "Failed to reconcile launch template: %v", err) machinePoolScope.Error(err, "failed to reconcile launch template") - return ctrl.Result{}, err + return err } // set the LaunchTemplateReady condition @@ -263,16 +263,16 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP asg, err := r.findASG(machinePoolScope, asgsvc) if err != nil { conditions.MarkUnknown(machinePoolScope.AWSMachinePool, expinfrav1.ASGReadyCondition, expinfrav1.ASGNotFoundReason, err.Error()) - return ctrl.Result{}, err + return err } if asg == nil { // Create new ASG if err := r.createPool(machinePoolScope, clusterScope); err != nil { conditions.MarkFalse(machinePoolScope.AWSMachinePool, expinfrav1.ASGReadyCondition, expinfrav1.ASGProvisionFailedReason, clusterv1.ConditionSeverityError, err.Error()) - return ctrl.Result{}, err + return err } - return ctrl.Result{}, nil + return nil } if scope.ReplicasExternallyManaged(machinePoolScope.MachinePool) { @@ -283,14 +283,14 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP "external", asg.DesiredCapacity) machinePoolScope.MachinePool.Spec.Replicas = asg.DesiredCapacity if err := machinePoolScope.PatchCAPIMachinePoolObject(ctx); err != nil { - return ctrl.Result{}, err + return err } } } if err := r.updatePool(machinePoolScope, clusterScope, asg); err != nil { machinePoolScope.Error(err, "error updating AWSMachinePool") - return ctrl.Result{}, err + return err } launchTemplateID := machinePoolScope.GetLaunchTemplateIDStatus() @@ -307,7 +307,7 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP } err = ec2Svc.ReconcileTags(machinePoolScope, resourceServiceToUpdate) if err != nil { - return ctrl.Result{}, errors.Wrap(err, "error updating tags") + return errors.Wrap(err, "error updating tags") } // Make sure Spec.ProviderID is always set. @@ -330,10 +330,10 @@ func (r *AWSMachinePoolReconciler) reconcileNormal(ctx context.Context, machineP machinePoolScope.Error(err, "failed updating instances", "instances", asg.Instances) } - return ctrl.Result{}, nil + return nil } -func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.MachinePoolScope, clusterScope cloud.ClusterScoper, ec2Scope scope.EC2Scope) (ctrl.Result, error) { +func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.MachinePoolScope, clusterScope cloud.ClusterScoper, ec2Scope scope.EC2Scope) error { clusterScope.Info("Handling deleted AWSMachinePool") ec2Svc := r.getEC2Service(ec2Scope) @@ -341,7 +341,7 @@ func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.Machi asg, err := r.findASG(machinePoolScope, asgSvc) if err != nil { - return ctrl.Result{}, err + return err } if asg == nil { @@ -360,7 +360,7 @@ func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.Machi machinePoolScope.Info("Deleting ASG", "id", asg.Name, "status", asg.Status) if err := asgSvc.DeleteASGAndWait(asg.Name); err != nil { r.Recorder.Eventf(machinePoolScope.AWSMachinePool, corev1.EventTypeWarning, "FailedDelete", "Failed to delete ASG %q: %v", asg.Name, err) - return ctrl.Result{}, errors.Wrap(err, "failed to delete ASG") + return errors.Wrap(err, "failed to delete ASG") } } } @@ -368,20 +368,20 @@ func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.Machi launchTemplateID := machinePoolScope.AWSMachinePool.Status.LaunchTemplateID launchTemplate, _, err := ec2Svc.GetLaunchTemplate(machinePoolScope.LaunchTemplateName()) if err != nil { - return ctrl.Result{}, err + return err } if launchTemplate == nil { machinePoolScope.Debug("Unable to locate launch template") r.Recorder.Eventf(machinePoolScope.AWSMachinePool, corev1.EventTypeNormal, expinfrav1.ASGNotFoundReason, "Unable to find matching ASG") controllerutil.RemoveFinalizer(machinePoolScope.AWSMachinePool, expinfrav1.MachinePoolFinalizer) - return ctrl.Result{}, nil + return nil } machinePoolScope.Info("deleting launch template", "name", launchTemplate.Name) if err := ec2Svc.DeleteLaunchTemplate(launchTemplateID); err != nil { r.Recorder.Eventf(machinePoolScope.AWSMachinePool, corev1.EventTypeWarning, "FailedDelete", "Failed to delete launch template %q: %v", launchTemplate.Name, err) - return ctrl.Result{}, errors.Wrap(err, "failed to delete ASG") + return errors.Wrap(err, "failed to delete ASG") } machinePoolScope.Info("successfully deleted AutoScalingGroup and Launch Template") @@ -389,7 +389,7 @@ func (r *AWSMachinePoolReconciler) reconcileDelete(machinePoolScope *scope.Machi // remove finalizer controllerutil.RemoveFinalizer(machinePoolScope.AWSMachinePool, expinfrav1.MachinePoolFinalizer) - return ctrl.Result{}, nil + return nil } func (r *AWSMachinePoolReconciler) updatePool(machinePoolScope *scope.MachinePoolScope, clusterScope cloud.ClusterScoper, existingASG *expinfrav1.AutoScalingGroup) error { diff --git a/exp/controllers/awsmachinepool_controller_test.go b/exp/controllers/awsmachinepool_controller_test.go index 7b832c0f6d..4a459bf707 100644 --- a/exp/controllers/awsmachinepool_controller_test.go +++ b/exp/controllers/awsmachinepool_controller_test.go @@ -199,7 +199,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - _, _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) + _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(buf).To(ContainSubstring("Error state detected, skipping reconciliation")) }) t.Run("should add our finalizer to the machinepool", func(t *testing.T) { @@ -210,7 +210,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { ec2Svc.EXPECT().ReconcileLaunchTemplate(gomock.Any(), gomock.Any(), gomock.Any()) - _, _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) + _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(ms.AWSMachinePool.Finalizers).To(ContainElement(expinfrav1.MachinePoolFinalizer)) }) @@ -225,7 +225,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(BeNil()) g.Expect(buf.String()).To(ContainSubstring("Cluster infrastructure is not ready yet")) expectConditions(g, ms.AWSMachinePool, []conditionAssertion{{expinfrav1.ASGReadyCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, infrav1.WaitingForClusterInfrastructureReason}}) @@ -240,7 +240,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(BeNil()) g.Expect(buf.String()).To(ContainSubstring("Bootstrap data secret reference is not yet available")) @@ -261,7 +261,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { expectedErr := errors.New("no connection available ") ec2Svc.EXPECT().ReconcileLaunchTemplate(gomock.Any(), gomock.Any(), gomock.Any()).Return(expectedErr) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(errors.Cause(err)).To(MatchError(expectedErr)) }) }) @@ -288,7 +288,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { }, nil) asgSvc.EXPECT().SuspendProcesses("name", []string{"Launch", "Terminate"}).Return(nil).AnyTimes().Times(0) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) }) @@ -324,7 +324,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { "ReplaceUnhealthy", })).Return(nil).AnyTimes().Times(1) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) }) @@ -356,7 +356,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { asgSvc.EXPECT().SuspendProcesses("name", []string{"Terminate"}).Return(nil).AnyTimes().Times(1) asgSvc.EXPECT().ResumeProcesses("name", []string{"process3"}).Return(nil).AnyTimes().Times(1) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) }) @@ -386,7 +386,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { g.Expect(testEnv.Create(ctx, ms.MachinePool)).To(Succeed()) - _, _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) + _ = reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(*ms.MachinePool.Spec.Replicas).To(Equal(int32(1))) }) t.Run("No need to update Asg because asgNeedsUpdates is false and no subnets change", func(t *testing.T) { @@ -417,7 +417,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet2", "subnet1"}, nil).Times(1) asgSvc.EXPECT().UpdateASG(gomock.Any()).Return(nil).Times(0) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) t.Run("update Asg due to subnet changes", func(t *testing.T) { @@ -435,7 +435,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet1"}, nil).Times(1) asgSvc.EXPECT().UpdateASG(gomock.Any()).Return(nil).Times(1) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) t.Run("update Asg due to asgNeedsUpdates returns true", func(t *testing.T) { @@ -453,7 +453,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{}, nil).Times(1) asgSvc.EXPECT().UpdateASG(gomock.Any()).Return(nil).Times(1) - _, err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) + err := reconciler.reconcileNormal(context.Background(), ms, cs, cs) g.Expect(err).To(Succeed()) }) }) @@ -476,7 +476,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { expectedErr := errors.New("no connection available ") asgSvc.EXPECT().GetASGByName(gomock.Any()).Return(nil, expectedErr).AnyTimes() - _, err := reconciler.reconcileDelete(ms, cs, cs) + err := reconciler.reconcileDelete(ms, cs, cs) g.Expect(errors.Cause(err)).To(MatchError(expectedErr)) }) t.Run("should log and remove finalizer when no machinepool exists", func(t *testing.T) { @@ -491,7 +491,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - _, err := reconciler.reconcileDelete(ms, cs, cs) + err := reconciler.reconcileDelete(ms, cs, cs) g.Expect(err).To(BeNil()) g.Expect(buf.String()).To(ContainSubstring("Unable to locate ASG")) g.Expect(ms.AWSMachinePool.Finalizers).To(ConsistOf(metav1.FinalizerDeleteDependents)) @@ -512,7 +512,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) { buf := new(bytes.Buffer) klog.SetOutput(buf) - _, err := reconciler.reconcileDelete(ms, cs, cs) + err := reconciler.reconcileDelete(ms, cs, cs) g.Expect(err).To(BeNil()) g.Expect(ms.AWSMachinePool.Status.Ready).To(BeFalse()) g.Eventually(recorder.Events).Should(Receive(ContainSubstring("DeletionInProgress"))) diff --git a/exp/controllers/awsmanagedmachinepool_controller.go b/exp/controllers/awsmanagedmachinepool_controller.go index 47b8396a11..259fc66f34 100644 --- a/exp/controllers/awsmanagedmachinepool_controller.go +++ b/exp/controllers/awsmanagedmachinepool_controller.go @@ -186,22 +186,22 @@ func (r *AWSManagedMachinePoolReconciler) Reconcile(ctx context.Context, req ctr }() if !awsPool.ObjectMeta.DeletionTimestamp.IsZero() { - return r.reconcileDelete(ctx, machinePoolScope, managedControlPlaneScope) + return ctrl.Result{}, r.reconcileDelete(ctx, machinePoolScope, managedControlPlaneScope) } - return r.reconcileNormal(ctx, machinePoolScope, managedControlPlaneScope) + return ctrl.Result{}, r.reconcileNormal(ctx, machinePoolScope, managedControlPlaneScope) } func (r *AWSManagedMachinePoolReconciler) reconcileNormal( ctx context.Context, machinePoolScope *scope.ManagedMachinePoolScope, ec2Scope scope.EC2Scope, -) (ctrl.Result, error) { +) error { machinePoolScope.Info("Reconciling AWSManagedMachinePool") if controllerutil.AddFinalizer(machinePoolScope.ManagedMachinePool, expinfrav1.ManagedMachinePoolFinalizer) { if err := machinePoolScope.PatchObject(); err != nil { - return ctrl.Result{}, err + return err } } @@ -219,7 +219,7 @@ func (r *AWSManagedMachinePoolReconciler) reconcileNormal( r.Recorder.Eventf(machinePoolScope.ManagedMachinePool, corev1.EventTypeWarning, "FailedLaunchTemplateReconcile", "Failed to reconcile launch template: %v", err) machinePoolScope.Error(err, "failed to reconcile launch template") conditions.MarkFalse(machinePoolScope.ManagedMachinePool, expinfrav1.LaunchTemplateReadyCondition, expinfrav1.LaunchTemplateReconcileFailedReason, clusterv1.ConditionSeverityError, "") - return ctrl.Result{}, err + return err } launchTemplateID := machinePoolScope.GetLaunchTemplateIDStatus() @@ -228,7 +228,7 @@ func (r *AWSManagedMachinePoolReconciler) reconcileNormal( ResourceService: ec2svc, }} if err := ec2svc.ReconcileTags(machinePoolScope, resourceServiceToUpdate); err != nil { - return ctrl.Result{}, errors.Wrap(err, "error updating tags") + return errors.Wrap(err, "error updating tags") } // set the LaunchTemplateReady condition @@ -236,44 +236,44 @@ func (r *AWSManagedMachinePoolReconciler) reconcileNormal( } if err := ekssvc.ReconcilePool(ctx); err != nil { - return reconcile.Result{}, errors.Wrapf(err, "failed to reconcile machine pool for AWSManagedMachinePool %s/%s", machinePoolScope.ManagedMachinePool.Namespace, machinePoolScope.ManagedMachinePool.Name) + return errors.Wrapf(err, "failed to reconcile machine pool for AWSManagedMachinePool %s/%s", machinePoolScope.ManagedMachinePool.Namespace, machinePoolScope.ManagedMachinePool.Name) } - return ctrl.Result{}, nil + return nil } func (r *AWSManagedMachinePoolReconciler) reconcileDelete( _ context.Context, machinePoolScope *scope.ManagedMachinePoolScope, ec2Scope scope.EC2Scope, -) (ctrl.Result, error) { +) error { machinePoolScope.Info("Reconciling deletion of AWSManagedMachinePool") ekssvc := eks.NewNodegroupService(machinePoolScope) ec2Svc := ec2.NewService(ec2Scope) if err := ekssvc.ReconcilePoolDelete(); err != nil { - return reconcile.Result{}, errors.Wrapf(err, "failed to reconcile machine pool deletion for AWSManagedMachinePool %s/%s", machinePoolScope.ManagedMachinePool.Namespace, machinePoolScope.ManagedMachinePool.Name) + return errors.Wrapf(err, "failed to reconcile machine pool deletion for AWSManagedMachinePool %s/%s", machinePoolScope.ManagedMachinePool.Namespace, machinePoolScope.ManagedMachinePool.Name) } if machinePoolScope.ManagedMachinePool.Spec.AWSLaunchTemplate != nil { launchTemplateID := machinePoolScope.ManagedMachinePool.Status.LaunchTemplateID launchTemplate, _, err := ec2Svc.GetLaunchTemplate(machinePoolScope.LaunchTemplateName()) if err != nil { - return ctrl.Result{}, err + return err } if launchTemplate == nil { machinePoolScope.Debug("Unable to find matching launch template") r.Recorder.Eventf(machinePoolScope.ManagedMachinePool, corev1.EventTypeNormal, "NoLaunchTemplateFound", "Unable to find matching launch template") controllerutil.RemoveFinalizer(machinePoolScope.ManagedMachinePool, expinfrav1.ManagedMachinePoolFinalizer) - return ctrl.Result{}, nil + return nil } machinePoolScope.Info("deleting launch template", "name", launchTemplate.Name) if err := ec2Svc.DeleteLaunchTemplate(*launchTemplateID); err != nil { r.Recorder.Eventf(machinePoolScope.ManagedMachinePool, corev1.EventTypeWarning, "FailedDelete", "Failed to delete launch template %q: %v", launchTemplate.Name, err) - return ctrl.Result{}, errors.Wrap(err, "failed to delete launch template") + return errors.Wrap(err, "failed to delete launch template") } machinePoolScope.Info("successfully deleted launch template") @@ -281,7 +281,7 @@ func (r *AWSManagedMachinePoolReconciler) reconcileDelete( controllerutil.RemoveFinalizer(machinePoolScope.ManagedMachinePool, expinfrav1.ManagedMachinePoolFinalizer) - return reconcile.Result{}, nil + return nil } // GetOwnerClusterKey returns only the Cluster name and namespace. diff --git a/exp/instancestate/awsinstancestate_controller_test.go b/exp/instancestate/awsinstancestate_controller_test.go index ebd9702c0d..981f2c3bd0 100644 --- a/exp/instancestate/awsinstancestate_controller_test.go +++ b/exp/instancestate/awsinstancestate_controller_test.go @@ -135,7 +135,7 @@ func TestAWSInstanceStateController(t *testing.T) { exist = exist && ok } return exist - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) deleteAWSCluster(g, "aws-cluster-2") t.Log("Ensuring we stop tracking deleted queue") @@ -153,7 +153,7 @@ func TestAWSInstanceStateController(t *testing.T) { exist = exist && ok } return exist - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) t.Log("Ensuring machine is labelled with correct instance state") g.Eventually(func() bool { @@ -166,7 +166,7 @@ func TestAWSInstanceStateController(t *testing.T) { labels := m.GetLabels() val := labels[Ec2InstanceStateLabelKey] return val == "shutting-down" - }, 10*time.Second).Should(Equal(true)) + }, 10*time.Second).Should(BeTrue()) }) } diff --git a/hack/tools/Makefile b/hack/tools/Makefile index 646bdc68b0..e323c3ea1b 100644 --- a/hack/tools/Makefile +++ b/hack/tools/Makefile @@ -45,7 +45,7 @@ ifeq ($(OS), windows) MDBOOK_EXTRACT_COMMAND := unzip -d /tmp endif -GOLANGCI_LINT_VERSION := v1.52.2 +GOLANGCI_LINT_VERSION := v1.53.3 ## -------------------------------------- ## Tooling Binaries ## -------------------------------------- diff --git a/pkg/cloud/services/elb/loadbalancer_test.go b/pkg/cloud/services/elb/loadbalancer_test.go index 41ec7283ed..0d40020188 100644 --- a/pkg/cloud/services/elb/loadbalancer_test.go +++ b/pkg/cloud/services/elb/loadbalancer_test.go @@ -238,7 +238,7 @@ func TestGetAPIServerClassicELBSpecControlPlaneLoadBalancer(t *testing.T) { expect: func(t *testing.T, g *WithT, res *infrav1.LoadBalancer) { t.Helper() expectedTarget := fmt.Sprintf("%v:%d", infrav1.ELBProtocolTCP, infrav1.DefaultAPIServerPort) - g.Expect(expectedTarget, res.HealthCheck.Target) + g.Expect(expectedTarget).To(Equal(res.HealthCheck.Target)) }, }, { @@ -248,7 +248,7 @@ func TestGetAPIServerClassicELBSpecControlPlaneLoadBalancer(t *testing.T) { expect: func(t *testing.T, g *WithT, res *infrav1.LoadBalancer) { t.Helper() expectedTarget := fmt.Sprintf("%v:%d", infrav1.ELBProtocolTCP, infrav1.DefaultAPIServerPort) - g.Expect(expectedTarget, res.HealthCheck.Target) + g.Expect(expectedTarget).NotTo(Equal(res.HealthCheck.Target)) }, }, } diff --git a/test/e2e/suites/unmanaged/unmanaged_functional_test.go b/test/e2e/suites/unmanaged/unmanaged_functional_test.go index 23e9811c73..9bc7de4a4c 100644 --- a/test/e2e/suites/unmanaged/unmanaged_functional_test.go +++ b/test/e2e/suites/unmanaged/unmanaged_functional_test.go @@ -646,7 +646,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() { machineList := getAWSMachinesForDeployment(ns2.Name, *md2[0]) labels := machineList.Items[0].GetLabels() return labels[instancestate.Ec2InstanceStateLabelKey] == string(infrav1.InstanceStateTerminated) - }, e2eCtx.E2EConfig.GetIntervals("", "wait-machine-status")...).Should(Equal(true)) + }, e2eCtx.E2EConfig.GetIntervals("", "wait-machine-status")...).Should(BeTrue()) ginkgo.By("Waiting for machine to reach Failed state") statusChecks := []framework.MachineStatusCheck{framework.MachinePhaseCheck(string(clusterv1.MachinePhaseFailed))} diff --git a/versions.mk b/versions.mk index 742d7e27af..8fc78a2d77 100644 --- a/versions.mk +++ b/versions.mk @@ -19,4 +19,4 @@ CERT_MANAGER_VERSION := v1.12.2 CAPI_VERSION := v1.5.0 KPROMO_VERSION := v3.6.0 YQ_VERSION := v4.25.2 -GOLANGCI_LINT_VERSION := v1.52.2 +GOLANGCI_LINT_VERSION := v1.53.3 From e758b8f839bc6d5f92391dee4cbb7752f49d78c1 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 21 Jul 2023 14:38:16 +0300 Subject: [PATCH 5/5] Bump controller tools dependancy to v0.12.1 and generate CRDs Signed-off-by: Furkat Gofurov --- ...bootstrap.cluster.x-k8s.io_eksconfigs.yaml | 3 +- ...p.cluster.x-k8s.io_eksconfigtemplates.yaml | 3 +- ...ster.x-k8s.io_awsmanagedcontrolplanes.yaml | 11 +++++- ...k8s.io_awsclustercontrolleridentities.yaml | 3 +- ...ter.x-k8s.io_awsclusterroleidentities.yaml | 3 +- ...tructure.cluster.x-k8s.io_awsclusters.yaml | 3 +- ...r.x-k8s.io_awsclusterstaticidentities.yaml | 3 +- ....cluster.x-k8s.io_awsclustertemplates.yaml | 3 +- ...e.cluster.x-k8s.io_awsfargateprofiles.yaml | 3 +- ...ture.cluster.x-k8s.io_awsmachinepools.yaml | 3 +- ...tructure.cluster.x-k8s.io_awsmachines.yaml | 3 +- ....cluster.x-k8s.io_awsmachinetemplates.yaml | 3 +- ...e.cluster.x-k8s.io_awsmanagedclusters.yaml | 3 +- ...uster.x-k8s.io_awsmanagedmachinepools.yaml | 3 +- config/rbac/role.yaml | 1 - config/webhook/manifests.yaml | 2 - hack/tools/go.mod | 15 ++++---- hack/tools/go.sum | 37 +++++++++---------- 18 files changed, 47 insertions(+), 58 deletions(-) diff --git a/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigs.yaml b/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigs.yaml index a1df338dc5..dbbaf5eda6 100644 --- a/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigs.yaml +++ b/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: eksconfigs.bootstrap.cluster.x-k8s.io spec: group: bootstrap.cluster.x-k8s.io diff --git a/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigtemplates.yaml b/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigtemplates.yaml index a6f98725ff..ac486be0a3 100644 --- a/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigtemplates.yaml +++ b/config/crd/bases/bootstrap.cluster.x-k8s.io_eksconfigtemplates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: eksconfigtemplates.bootstrap.cluster.x-k8s.io spec: group: bootstrap.cluster.x-k8s.io diff --git a/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml b/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml index 52f3aaa4e7..a30b036ec2 100644 --- a/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml +++ b/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmanagedcontrolplanes.controlplane.cluster.x-k8s.io spec: group: controlplane.cluster.x-k8s.io @@ -674,6 +673,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -692,6 +692,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -716,6 +717,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -736,6 +738,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2135,6 +2138,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -2153,6 +2157,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -2177,6 +2182,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -2197,6 +2203,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustercontrolleridentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustercontrolleridentities.yaml index de4644fa21..3431bbd772 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustercontrolleridentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustercontrolleridentities.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsclustercontrolleridentities.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterroleidentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterroleidentities.yaml index 69d54a9424..8d2e7713c7 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterroleidentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterroleidentities.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsclusterroleidentities.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml index 609fad7339..cd85b17c5e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterstaticidentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterstaticidentities.yaml index 647298c4c4..0b45da5fba 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterstaticidentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterstaticidentities.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsclusterstaticidentities.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml index 66f3927be0..2aaf9ebb06 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsfargateprofiles.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsfargateprofiles.yaml index 72bc32a16b..ba52c0591a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsfargateprofiles.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsfargateprofiles.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsfargateprofiles.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinepools.yaml index 6a0ba2d7e6..3c7404b893 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinepools.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmachinepools.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachines.yaml index f4716003d3..bf219b95a0 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachines.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml index ebbabbb90f..b2cdf7375f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmachinetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedclusters.yaml index 4705f5a3c4..722bf13ff3 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmanagedclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml index 0363f9906a..64270f8913 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.1 name: awsmanagedmachinepools.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index c6534e0ef4..afb778b2ad 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index d018ad5c46..9dd74404c2 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: @@ -272,7 +271,6 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/hack/tools/go.mod b/hack/tools/go.mod index 3e40fa1daa..07c6e16a60 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -11,12 +11,12 @@ require ( github.com/mikefarah/yq/v4 v4.35.1 github.com/spf13/pflag v1.0.5 k8s.io/apimachinery v0.27.2 - k8s.io/code-generator v0.26.1 + k8s.io/code-generator v0.27.1 k8s.io/gengo v0.0.0-20220902162205-c0856e24416d k8s.io/klog/v2 v2.100.1 sigs.k8s.io/cluster-api/hack/tools v0.0.0-20221121093230-b1688621953c sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211110210527-619e6b92dab9 - sigs.k8s.io/controller-tools v0.11.3 + sigs.k8s.io/controller-tools v0.12.1 sigs.k8s.io/kind v0.20.0 sigs.k8s.io/kustomize/kustomize/v4 v4.5.7 sigs.k8s.io/promo-tools/v4 v4.0.4 @@ -136,7 +136,7 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.14.0 // indirect - github.com/gobuffalo/flect v0.3.0 // indirect + github.com/gobuffalo/flect v1.0.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/goccy/go-yaml v1.11.0 // indirect @@ -200,7 +200,7 @@ require ( github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onsi/gomega v1.27.4 // indirect + github.com/onsi/gomega v1.27.6 // indirect github.com/open-policy-agent/opa v0.52.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc3 // indirect @@ -289,10 +289,9 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.1.0 // indirect - k8s.io/api v0.26.3 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/client-go v0.26.1 // indirect + k8s.io/api v0.27.1 // indirect + k8s.io/apiextensions-apiserver v0.27.1 // indirect + k8s.io/client-go v0.27.1 // indirect k8s.io/klog v0.2.0 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect diff --git a/hack/tools/go.sum b/hack/tools/go.sum index fd329e4a2a..46cec81270 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -455,8 +455,8 @@ github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-rod/rod v0.113.3 h1:oLiKZW721CCMwA5g7977cWfcAKQ+FuosP47Zf1QiDrA= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= @@ -466,8 +466,8 @@ github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSC github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= -github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= @@ -818,14 +818,14 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= -github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +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/open-policy-agent/opa v0.52.0 h1:Rv3F+VCDqsufaiYy/3S9/Iuk0yfcREK4iZmWbNsKZjA= github.com/open-policy-agent/opa v0.52.0/go.mod h1:2n99s7WY/BXZUWUOq10JdTgK+G6XM4FYGoe7kQ5Vg0s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -885,7 +885,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1577,8 +1577,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= -gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1587,16 +1586,16 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= -k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/api v0.27.1 h1:Z6zUGQ1Vd10tJ+gHcNNNgkV5emCyW+v2XTmn+CLjSd0= +k8s.io/api v0.27.1/go.mod h1:z5g/BpAiD+f6AArpqNjkY+cji8ueZDU/WV1jcj5Jk4E= +k8s.io/apiextensions-apiserver v0.27.1 h1:Hp7B3KxKHBZ/FxmVFVpaDiXI6CCSr49P1OJjxKO6o4g= +k8s.io/apiextensions-apiserver v0.27.1/go.mod h1:8jEvRDtKjVtWmdkhOqE84EcNWJt/uwF8PC4627UZghY= k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= -k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= -k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= -k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= +k8s.io/client-go v0.27.1 h1:oXsfhW/qncM1wDmWBIuDzRHNS2tLhK3BZv512Nc59W8= +k8s.io/client-go v0.27.1/go.mod h1:f8LHMUkVb3b9N8bWturc+EDtVVVwZ7ueTVquFAJb2vA= +k8s.io/code-generator v0.27.1 h1:GrfUeUrJ/RtPskIsnChcXOW6h0EGNqty0VxxQ9qYKlM= +k8s.io/code-generator v0.27.1/go.mod h1:iWtpm0ZMG6Gc4daWfITDSIu+WFhFJArYDhj242zcbnY= k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1616,8 +1615,8 @@ sigs.k8s.io/cluster-api/hack/tools v0.0.0-20221121093230-b1688621953c h1:DXSapcA sigs.k8s.io/cluster-api/hack/tools v0.0.0-20221121093230-b1688621953c/go.mod h1:7luenhlsUTb9obnAferuDFEvhtITw7JjHpXkiDmCmKY= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211110210527-619e6b92dab9 h1:ylYUI5uaq/guUFerFRVG81FHSA5/3+fERCE1RQbQUZ4= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211110210527-619e6b92dab9/go.mod h1:+sJcI1F0QI0Cv+8fp5rH5B2fK1LxzrAQqYnaPx9nY8I= -sigs.k8s.io/controller-tools v0.11.3 h1:T1xzLkog9saiyQSLz1XOImu4OcbdXWytc5cmYsBeBiE= -sigs.k8s.io/controller-tools v0.11.3/go.mod h1:qcfX7jfcfYD/b7lAhvqAyTbt/px4GpvN88WKLFFv7p8= +sigs.k8s.io/controller-tools v0.12.1 h1:GyQqxzH5wksa4n3YDIJdJJOopztR5VDM+7qsyg5yE4U= +sigs.k8s.io/controller-tools v0.12.1/go.mod h1:rXlpTfFHZMpZA8aGq9ejArgZiieHd+fkk/fTatY8A2M= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8=