diff --git a/.go-version b/.go-version index 88863fd8..da9594fd 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.21.11 +1.22.5 diff --git a/.golangci.yml b/.golangci.yml index 70196073..381be1f0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -104,9 +104,9 @@ linters-settings: - pkg: github.com/smartxworks/cluster-api-provider-elf/api/v1beta1 alias: infrav1 staticcheck: - go: "1.21" + go: "1.22" stylecheck: - go: "1.21" + go: "1.22" issues: max-same-issues: 0 max-issues-per-linter: 0 @@ -169,7 +169,7 @@ issues: run: timeout: 10m - go: "1.21" + go: "1.22" skip-files: - "zz_generated.*\\.go$" allow-parallel-runners: true diff --git a/Dockerfile b/Dockerfile index adb2bce1..2afcab0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG ARCH # Build the manager binary -FROM golang:1.21.11 as builder +FROM golang:1.22.5 as builder WORKDIR /workspace # Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy diff --git a/Makefile b/Makefile index 2d52c588..7d18a9de 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ VERSION ?= $(shell cat clusterctl-settings.json | jq .config.nextVersion -r) # # Go. # -GO_VERSION ?= 1.21.11 +GO_VERSION ?= 1.22.5 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -151,7 +151,7 @@ test-e2e: ginkgo kustomize kind ## Run e2e tests KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. - $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.7) + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.3.0) CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. @@ -159,15 +159,15 @@ controller-gen: ## Download controller-gen locally if necessary. GINKGO := $(shell pwd)/bin/ginkgo ginkgo: ## Download ginkgo locally if necessary. - $(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo@v2.13.1) + $(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo@v2.20.0) KIND := $(shell pwd)/bin/kind kind: ## Download kind locally if necessary. - $(call go-get-tool,$(KIND),sigs.k8s.io/kind@v0.20.0) + $(call go-get-tool,$(KIND),sigs.k8s.io/kind@v0.23.0) GOLANGCI_LINT := $(shell pwd)/bin/golangci-lint golangci-lint: ## Download golangci-lint locally if necessary. - $(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2) + $(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2) ## -------------------------------------- ## Linting and fixing linter errors diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index 6c5154cb..039b763b 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -104,7 +104,7 @@ type NetworkSpec struct { } func (n *NetworkSpec) RequiresStaticIPs() bool { - for i := 0; i < len(n.Devices); i++ { + for i := range len(n.Devices) { if n.Devices[i].NetworkType == NetworkTypeIPV4 && len(n.Devices[i].IPAddrs) == 0 { return true } diff --git a/controllers/elfcluster_controller.go b/controllers/elfcluster_controller.go index 5147a0f4..2e3cb37e 100644 --- a/controllers/elfcluster_controller.go +++ b/controllers/elfcluster_controller.go @@ -285,7 +285,7 @@ func (r *ElfClusterReconciler) cleanOrphanLabels(ctx goctx.Context, clusterCtx * keys := []string{towerresources.GetVMLabelClusterName(), towerresources.GetVMLabelVIP(), towerresources.GetVMLabelNamespace()} labelIDs, err := clusterCtx.VMService.CleanUnusedLabels(keys) if err != nil { - log.Error(err, fmt.Sprintf("Warning: failed to clean orphan labels in Tower %s", clusterCtx.ElfCluster.Spec.Tower.Server)) + log.Error(err, "Warning: failed to clean orphan labels in Tower "+clusterCtx.ElfCluster.Spec.Tower.Server) return } diff --git a/controllers/elfcluster_controller_test.go b/controllers/elfcluster_controller_test.go index fac4f103..7a304d2d 100644 --- a/controllers/elfcluster_controller_test.go +++ b/controllers/elfcluster_controller_test.go @@ -270,7 +270,7 @@ var _ = Describe("ElfClusterReconciler", func() { mockVMService.EXPECT().CleanUnusedLabels(keys).Return(nil, unexpectedError) reconciler := &ElfClusterReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} reconciler.cleanOrphanLabels(ctx, clusterCtx) - Expect(logBuffer.String()).To(ContainSubstring(fmt.Sprintf("Warning: failed to clean orphan labels in Tower %s", elfCluster.Spec.Tower.Server))) + Expect(logBuffer.String()).To(ContainSubstring("Warning: failed to clean orphan labels in Tower " + elfCluster.Spec.Tower.Server)) logBuffer.Reset() mockVMService.EXPECT().CleanUnusedLabels(keys).Return(nil, nil) diff --git a/controllers/elfmachine_controller.go b/controllers/elfmachine_controller.go index 17834aae..f8392a11 100644 --- a/controllers/elfmachine_controller.go +++ b/controllers/elfmachine_controller.go @@ -31,9 +31,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apitypes "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - capierrors "sigs.k8s.io/cluster-api/errors" capiutil "sigs.k8s.io/cluster-api/util" "sigs.k8s.io/cluster-api/util/annotations" "sigs.k8s.io/cluster-api/util/conditions" @@ -540,15 +539,15 @@ func (r *ElfMachineReconciler) reconcileVM(ctx goctx.Context, machineCtx *contex if canRetry, err := canRetryVMOperation(ctx, machineCtx, r.Client); err != nil { return nil, false, err } else if !canRetry { - log.V(1).Info(fmt.Sprintf("%s, skip creating VM", message)) + log.V(1).Info(message + ", skip creating VM") return nil, false, nil } - log.V(1).Info(fmt.Sprintf("%s and the retry silence period passes, will try to create the VM again", message)) + log.V(1).Info(message + " and the retry silence period passes, will try to create the VM again") } if ok, msg := acquireTicketForCreateVM(machineCtx.ElfMachine.Name, machineutil.IsControlPlaneMachine(machineCtx.ElfMachine)); !ok { - log.V(1).Info(fmt.Sprintf("%s, skip creating VM", msg)) + log.V(1).Info(msg + ", skip creating VM") return nil, false, nil } @@ -644,8 +643,8 @@ func (r *ElfMachineReconciler) reconcileVM(ctx goctx.Context, machineCtx *contex // The VM was moved to the recycle bin. Treat the VM as deleted, and will not reconganize it even if it's moved back from the recycle bin. if service.IsVMInRecycleBin(vm) { message := fmt.Sprintf("The VM %s was moved to the Tower recycle bin by users, so treat it as deleted.", machineCtx.ElfMachine.Status.VMRef) - machineCtx.ElfMachine.Status.FailureReason = capierrors.MachineStatusErrorPtr(capeerrors.MovedToRecycleBinError) - machineCtx.ElfMachine.Status.FailureMessage = pointer.String(message) + machineCtx.ElfMachine.Status.FailureReason = ptr.To(capeerrors.MovedToRecycleBinError) + machineCtx.ElfMachine.Status.FailureMessage = ptr.To(message) machineCtx.ElfMachine.SetVM("") log.Error(stderrors.New(message), "") @@ -700,8 +699,8 @@ func (r *ElfMachineReconciler) getVM(ctx goctx.Context, machineCtx *context.Mach } // If the machine was not found by UUID and timed out it means that it got deleted directly - machineCtx.ElfMachine.Status.FailureReason = capierrors.MachineStatusErrorPtr(capeerrors.RemovedFromInfrastructureError) - machineCtx.ElfMachine.Status.FailureMessage = pointer.String(fmt.Sprintf("Unable to find VM by UUID %s. The VM was removed from infrastructure.", machineCtx.ElfMachine.Status.VMRef)) + machineCtx.ElfMachine.Status.FailureReason = ptr.To(capeerrors.RemovedFromInfrastructureError) + machineCtx.ElfMachine.Status.FailureMessage = ptr.To(fmt.Sprintf("Unable to find VM by UUID %s. The VM was removed from infrastructure.", machineCtx.ElfMachine.Status.VMRef)) log.Error(err, fmt.Sprintf("failed to get VM by UUID %s in %s", machineCtx.ElfMachine.Status.VMRef, infrav1.VMDisconnectionTimeout.String()), "message", machineCtx.ElfMachine.Status.FailureMessage) return nil, err @@ -779,7 +778,7 @@ func (r *ElfMachineReconciler) reconcileVMStatus(ctx goctx.Context, machineCtx * // See issue http://jira.smartx.com/browse/SKS-1351 for details. return false, r.powerOffVM(ctx, machineCtx) default: - log.Info(fmt.Sprintf("The VM is in an unexpected status %s", string(*vm.Status)), "vmRef", machineCtx.ElfMachine.Status.VMRef) + log.Info("The VM is in an unexpected status "+string(*vm.Status), "vmRef", machineCtx.ElfMachine.Status.VMRef) return false, nil } @@ -814,7 +813,7 @@ func (r *ElfMachineReconciler) powerOffVM(ctx goctx.Context, machineCtx *context log := ctrl.LoggerFrom(ctx) if ok := acquireTicketForUpdatingVM(machineCtx.ElfMachine.Name); !ok { - log.V(1).Info(fmt.Sprintf("The VM operation reaches rate limit, skip powering off VM %s", machineCtx.ElfMachine.Status.VMRef)) + log.V(1).Info("The VM operation reaches rate limit, skip powering off VM " + machineCtx.ElfMachine.Status.VMRef) return nil } @@ -849,11 +848,11 @@ func (r *ElfMachineReconciler) powerOnVM(ctx goctx.Context, machineCtx *context. return nil } - log.V(1).Info(fmt.Sprintf("%s and the retry silence period passes, will try to power on the VM again", message)) + log.V(1).Info(message + " and the retry silence period passes, will try to power on the VM again") } if ok := acquireTicketForUpdatingVM(machineCtx.ElfMachine.Name); !ok { - log.V(1).Info(fmt.Sprintf("The VM operation reaches rate limit, skip power on VM %s", machineCtx.ElfMachine.Status.VMRef)) + log.V(1).Info("The VM operation reaches rate limit, skip power on VM " + machineCtx.ElfMachine.Status.VMRef) return nil } @@ -885,7 +884,7 @@ func (r *ElfMachineReconciler) updateVM(ctx goctx.Context, machineCtx *context.M log := ctrl.LoggerFrom(ctx) if ok := acquireTicketForUpdatingVM(machineCtx.ElfMachine.Name); !ok { - log.V(1).Info(fmt.Sprintf("The VM operation reaches rate limit, skip updating VM %s", machineCtx.ElfMachine.Status.VMRef)) + log.V(1).Info("The VM operation reaches rate limit, skip updating VM " + machineCtx.ElfMachine.Status.VMRef) return nil } @@ -1005,8 +1004,8 @@ func (r *ElfMachineReconciler) reconcileVMFailedTask(ctx goctx.Context, machineC conditions.MarkFalse(machineCtx.ElfMachine, infrav1.VMProvisionedCondition, infrav1.TaskFailureReason, clusterv1.ConditionSeverityInfo, errorMessage) if service.IsCloudInitConfigError(errorMessage) { - machineCtx.ElfMachine.Status.FailureReason = capierrors.MachineStatusErrorPtr(capeerrors.CloudInitConfigError) - machineCtx.ElfMachine.Status.FailureMessage = pointer.String(fmt.Sprintf("VM cloud-init config error: %s", service.FormatCloudInitError(errorMessage))) + machineCtx.ElfMachine.Status.FailureReason = ptr.To(capeerrors.CloudInitConfigError) + machineCtx.ElfMachine.Status.FailureMessage = ptr.To("VM cloud-init config error: " + service.FormatCloudInitError(errorMessage)) } log.Error(errors.New("VM task failed"), "", "vmRef", vmRef, "taskRef", taskRef, "taskErrorMessage", errorMessage, "taskErrorCode", service.GetTowerString(task.ErrorCode), "taskDescription", service.GetTowerString(task.Description)) @@ -1038,13 +1037,13 @@ func (r *ElfMachineReconciler) reconcileVMFailedTask(ctx goctx.Context, machineC setVMDuplicate(machineCtx.ElfMachine.Name) case service.IsStorageInsufficientError(errorMessage): recordElfClusterStorageInsufficient(machineCtx, true) - message := fmt.Sprintf("Insufficient storage detected for the ELF cluster %s", machineCtx.ElfCluster.Spec.Cluster) + message := "Insufficient storage detected for the ELF cluster " + machineCtx.ElfCluster.Spec.Cluster log.Info(message) return errors.New(message) case service.IsMemoryInsufficientError(errorMessage): recordElfClusterMemoryInsufficient(machineCtx, true) - message := fmt.Sprintf("Insufficient memory detected for the ELF cluster %s", machineCtx.ElfCluster.Spec.Cluster) + message := "Insufficient memory detected for the ELF cluster " + machineCtx.ElfCluster.Spec.Cluster log.Info(message) return errors.New(message) @@ -1075,7 +1074,7 @@ func (r *ElfMachineReconciler) reconcileProviderID(ctx goctx.Context, machineCtx } if machineCtx.ElfMachine.Spec.ProviderID == nil || *machineCtx.ElfMachine.Spec.ProviderID != providerID { - machineCtx.ElfMachine.Spec.ProviderID = pointer.String(providerID) + machineCtx.ElfMachine.Spec.ProviderID = ptr.To(providerID) log.Info("updated providerID", "providerID", providerID) } @@ -1185,7 +1184,7 @@ func (r *ElfMachineReconciler) reconcileNetwork(ctx goctx.Context, machineCtx *c return false, err } - for i := 0; i < len(nics); i++ { + for i := range len(nics) { nic := nics[i] ip := service.GetTowerString(nic.IPAddress) @@ -1281,7 +1280,7 @@ func (r *ElfMachineReconciler) reconcileLabels(ctx goctx.Context, machineCtx *co // If the virtual machine has been labeled with managed label, // it is considered that all labels have been labeled. - for i := 0; i < len(vm.Labels); i++ { + for i := range len(vm.Labels) { if *vm.Labels[i].ID == *capeManagedLabel.ID { return true, nil } @@ -1429,14 +1428,14 @@ func (r *ElfMachineReconciler) deleteDuplicateVMs(ctx goctx.Context, machineCtx if machineCtx.ElfMachine.Status.VMRef == "" { vmIDs := make([]string, 0, len(vms)) - for i := 0; i < len(vms); i++ { + for i := range len(vms) { vmIDs = append(vmIDs, *vms[i].ID) } log.Info("Waiting for ElfMachine to select one of the duplicate VMs before deleting the other", "vms", vmIDs) return reconcile.Result{RequeueAfter: config.DefaultRequeueTimeout}, nil } - for i := 0; i < len(vms); i++ { + for i := range len(vms) { // Do not delete already running virtual machines to avoid deleting already used virtual machines. if *vms[i].ID == machineCtx.ElfMachine.Status.VMRef || *vms[i].LocalID == machineCtx.ElfMachine.Status.VMRef || diff --git a/controllers/elfmachine_controller_gpu.go b/controllers/elfmachine_controller_gpu.go index 98be5b28..91bc8018 100644 --- a/controllers/elfmachine_controller_gpu.go +++ b/controllers/elfmachine_controller_gpu.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/smartxworks/cloudtower-go-sdk/v2/models" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/util/conditions" ctrl "sigs.k8s.io/controller-runtime" @@ -50,7 +50,7 @@ func (r *ElfMachineReconciler) selectHostAndGPUsForVM(ctx goctx.Context, machine log := ctrl.LoggerFrom(ctx) if !machineCtx.ElfMachine.RequiresGPUDevices() { - return pointer.String(""), nil, nil + return ptr.To(""), nil, nil } defer func() { @@ -129,7 +129,7 @@ func (r *ElfMachineReconciler) selectHostAndGPUsForVM(ctx goctx.Context, machine unsortedHostIDs = hostIDSet.UnsortedList() } - for i := 0; i < len(unsortedHostIDs); i++ { + for i := range len(unsortedHostIDs) { hostGPUVMInfos, ok := hostGPUVMInfoMap[unsortedHostIDs[i]] if !ok { continue @@ -173,14 +173,14 @@ func selectGPUDevicesForVM(hostGPUVMInfos service.GPUVMInfos, requiredGPUDevices }) var selectedGPUDeviceInfos []*service.GPUDeviceInfo - for i := 0; i < len(requiredGPUDevices); i++ { + for i := range len(requiredGPUDevices) { gpuVMInfos, ok := modelGPUVMInfoMap[requiredGPUDevices[i].Model] if !ok || len(gpuVMInfos) < int(requiredGPUDevices[i].Count) { return nil } gpuInfos := gpuVMInfos[:int(requiredGPUDevices[i].Count)] - for j := 0; j < len(gpuInfos); j++ { + for j := range len(gpuInfos) { selectedGPUDeviceInfos = append(selectedGPUDeviceInfos, &service.GPUDeviceInfo{ID: *gpuInfos[j].ID, AllocatedCount: 1, AvailableCount: 1}) } } @@ -202,7 +202,7 @@ func selectVGPUDevicesForVM(hostGPUVMInfos service.GPUVMInfos, requiredVGPUDevic }) var selectedGPUDeviceInfos []*service.GPUDeviceInfo - for i := 0; i < len(requiredVGPUDevices); i++ { + for i := range len(requiredVGPUDevices) { gpuVMInfos, ok := typeVGPUVMInfoMap[requiredVGPUDevices[i].Type] if !ok { return nil @@ -210,7 +210,7 @@ func selectVGPUDevicesForVM(hostGPUVMInfos service.GPUVMInfos, requiredVGPUDevic var gpuInfos []*service.GPUDeviceInfo requiredCount := requiredVGPUDevices[i].Count - for j := 0; j < len(gpuVMInfos); j++ { + for j := range len(gpuVMInfos) { availableCount := service.GetAvailableCountFromGPUVMInfo(gpuVMInfos[j]) if availableCount <= 0 { continue @@ -249,7 +249,7 @@ func (r *ElfMachineReconciler) reconcileGPUDevices(ctx goctx.Context, machineCtx // Ensure GPUStatus is set or up to date. gpuDevices := make([]infrav1.GPUStatus, len(vm.GpuDevices)) - for i := 0; i < len(vm.GpuDevices); i++ { + for i := range len(vm.GpuDevices) { gpuDevices[i] = infrav1.GPUStatus{GPUID: *vm.GpuDevices[i].ID, Name: *vm.GpuDevices[i].Name} } machineCtx.ElfMachine.Status.GPUDevices = gpuDevices @@ -272,7 +272,7 @@ func (r *ElfMachineReconciler) reconcileGPUDevices(ctx goctx.Context, machineCtx } gpuIDs := make([]string, len(vm.GpuDevices)) - for i := 0; i < len(vm.GpuDevices); i++ { + for i := range len(vm.GpuDevices) { gpuIDs[i] = *vm.GpuDevices[i].ID } @@ -338,14 +338,14 @@ func (r *ElfMachineReconciler) removeVMGPUDevices(ctx goctx.Context, machineCtx return err } - for i := 0; i < len(vmGPUInfo.GpuDevices); i++ { + for i := range len(vmGPUInfo.GpuDevices) { staleGPUs = append(staleGPUs, &models.VMGpuOperationParams{ GpuID: vmGPUInfo.GpuDevices[i].ID, Amount: vmGPUInfo.GpuDevices[i].VgpuInstanceOnVMNum, }) } } else { - for i := 0; i < len(vm.GpuDevices); i++ { + for i := range len(vm.GpuDevices) { staleGPUs = append(staleGPUs, &models.VMGpuOperationParams{ GpuID: vm.GpuDevices[i].ID, Amount: service.TowerInt32(1), diff --git a/controllers/elfmachine_controller_placement_group.go b/controllers/elfmachine_controller_placement_group.go index b9ef0997..c08a49ef 100644 --- a/controllers/elfmachine_controller_placement_group.go +++ b/controllers/elfmachine_controller_placement_group.go @@ -26,7 +26,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" capiutil "sigs.k8s.io/cluster-api/util" @@ -84,7 +84,7 @@ func (r *ElfMachineReconciler) createPlacementGroup(ctx goctx.Context, machineCt // TODO: This will be removed when Tower fixes issue with placement group data syncing. if ok := canCreatePlacementGroup(placementGroupName); !ok { - log.V(2).Info(fmt.Sprintf("Tower has duplicate placement group, skip creating placement group %s", placementGroupName)) + log.V(2).Info("Tower has duplicate placement group, skip creating placement group " + placementGroupName) return nil, nil } @@ -146,7 +146,7 @@ func (r *ElfMachineReconciler) preCheckPlacementGroup(ctx goctx.Context, machine }() if !machineutil.IsControlPlaneMachine(machineCtx.Machine) { - return pointer.String(""), nil + return ptr.To(""), nil } placementGroupName, err := towerresources.GetVMPlacementGroupName(ctx, r.Client, machineCtx.Machine, machineCtx.Cluster) @@ -174,7 +174,7 @@ func (r *ElfMachineReconciler) preCheckPlacementGroup(ctx goctx.Context, machine if !availableHosts.IsEmpty() { log.V(1).Info("The placement group still has capacity", "placementGroup", *placementGroup.Name, "availableHosts", availableHosts.String()) - return pointer.String(""), nil + return ptr.To(""), nil } kcp, err := machineutil.GetKCPByMachine(ctx, r.Client, machineCtx.Machine) @@ -250,7 +250,7 @@ func (r *ElfMachineReconciler) preCheckPlacementGroup(ctx goctx.Context, machine return nil, err } - return pointer.String(hostID), err + return ptr.To(hostID), err } // getVMHostForRollingUpdate returns the target host server id for a virtual machine during rolling update. @@ -267,7 +267,7 @@ func (r *ElfMachineReconciler) getVMHostForRollingUpdate(ctx goctx.Context, mach } elfMachineMap := make(map[string]*infrav1.ElfMachine) - for i := 0; i < len(elfMachines); i++ { + for i := range len(elfMachines) { if typesutil.IsUUID(elfMachines[i].Status.VMRef) { elfMachineMap[elfMachines[i].Name] = elfMachines[i] } @@ -275,7 +275,7 @@ func (r *ElfMachineReconciler) getVMHostForRollingUpdate(ctx goctx.Context, mach placementGroupMachines := make([]*clusterv1.Machine, 0, len(placementGroup.Vms)) vmMap := make(map[string]string) - for i := 0; i < len(placementGroup.Vms); i++ { + for i := range len(placementGroup.Vms) { if elfMachine, ok := elfMachineMap[*placementGroup.Vms[i].Name]; ok { machine, err := capiutil.GetOwnerMachine(ctx, r.Client, elfMachine.ObjectMeta) if err != nil { @@ -324,7 +324,7 @@ func (r *ElfMachineReconciler) getHostsInPlacementGroup(machineCtx *context.Mach } hostSet := sets.Set[string]{} - for i := 0; i < len(vms); i++ { + for i := range len(vms) { hostSet.Insert(*vms[i].Host.ID) } @@ -508,7 +508,7 @@ func (r *ElfMachineReconciler) joinPlacementGroup(ctx goctx.Context, machineCtx usedHostsByPG := sets.Set[string]{} cpElfMachineNames := make([]string, 0, len(cpElfMachines)) - for i := 0; i < len(cpElfMachines); i++ { + for i := range len(cpElfMachines) { cpElfMachineNames = append(cpElfMachineNames, cpElfMachines[i].Name) if machineCtx.ElfMachine.Name != cpElfMachines[i].Name && cpElfMachines[i].Status.PlacementGroupRef == *placementGroup.ID { diff --git a/controllers/elfmachine_controller_resources.go b/controllers/elfmachine_controller_resources.go index 1e890c43..aacb7c25 100644 --- a/controllers/elfmachine_controller_resources.go +++ b/controllers/elfmachine_controller_resources.go @@ -82,7 +82,7 @@ func (r *ElfMachineReconciler) reconcieVMVolume(ctx goctx.Context, machineCtx *c log := ctrl.LoggerFrom(ctx) vmDiskIDs := make([]string, len(vm.VMDisks)) - for i := 0; i < len(vm.VMDisks); i++ { + for i := range len(vm.VMDisks) { vmDiskIDs[i] = *vm.VMDisks[i].ID } diff --git a/controllers/elfmachine_controller_test.go b/controllers/elfmachine_controller_test.go index 504e8201..1a9d49ae 100644 --- a/controllers/elfmachine_controller_test.go +++ b/controllers/elfmachine_controller_test.go @@ -34,7 +34,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" capierrors "sigs.k8s.io/cluster-api/errors" @@ -63,7 +63,6 @@ var _ = Describe("ElfMachineReconciler", func() { elfCluster *infrav1.ElfCluster cluster *clusterv1.Cluster elfMachine *infrav1.ElfMachine - elfMachineKey client.ObjectKey k8sNode *corev1.Node machine *clusterv1.Machine kcp *controlplanev1.KubeadmControlPlane @@ -85,7 +84,6 @@ var _ = Describe("ElfMachineReconciler", func() { klog.SetOutput(logBuffer) elfCluster, cluster, elfMachine, machine, secret = fake.NewClusterAndMachineObjects() - elfMachineKey = capiutil.ObjectKey(elfMachine) kcp = fake.NewKCP() md = fake.NewMD() fake.ToWorkerMachine(machine, md) @@ -140,9 +138,8 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should exit immediately on an error state", func() { - createMachineError := capierrors.CreateMachineError - elfMachine.Status.FailureReason = &createMachineError - elfMachine.Status.FailureMessage = pointer.String("Couldn't create machine") + elfMachine.Status.FailureReason = ptr.To(capierrors.CreateMachineError) + elfMachine.Status.FailureMessage = ptr.To("Couldn't create machine") ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -158,6 +155,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, _ = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) elfMachine = &infrav1.ElfMachine{} Expect(reconciler.Client.Get(ctx, elfMachineKey, elfMachine)).To(Succeed()) @@ -171,6 +169,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).ToNot(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("Cluster infrastructure is not ready yet")) @@ -187,6 +186,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).ToNot(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("Waiting for bootstrap data to be available")) @@ -202,6 +202,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).ToNot(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("Waiting for the control plane to be initialized")) @@ -218,6 +219,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).ToNot(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("Waiting for bootstrap data to be available")) @@ -234,6 +236,7 @@ var _ = Describe("ElfMachineReconciler", func() { ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).ToNot(HaveOccurred()) Expect(result.IsZero()).To(BeTrue()) @@ -258,7 +261,7 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(result.IsZero()).To(BeTrue()) conditions.MarkUnknown(machine, clusterv1.MachineNodeHealthyCondition, clusterv1.NodeConditionsFailedReason, "test") - machine.Status.FailureMessage = pointer.String("error") + machine.Status.FailureMessage = ptr.To("error") ctrlMgrCtx = fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler = &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} @@ -312,11 +315,12 @@ var _ = Describe("ElfMachineReconciler", func() { It("should set CloningFailedReason condition when failed to retrieve bootstrap data", func() { ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) - machine.Spec.Bootstrap.DataSecretName = pointer.String("notfound") + machine.Spec.Bootstrap.DataSecretName = ptr.To("notfound") ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).Should(HaveOccurred()) @@ -327,7 +331,8 @@ var _ = Describe("ElfMachineReconciler", func() { It("should create a new VM if not exists", func() { resetMemoryCache() - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() + vm.Name = &elfMachine.Name elfCluster.Spec.Cluster = clusterInsufficientStorageKey task := fake.NewTowerTask("") withTaskVM := fake.NewWithTaskVM(vm, task) @@ -339,6 +344,7 @@ var _ = Describe("ElfMachineReconciler", func() { machineContext.VMService = mockVMService recordOrClearError(ctx, machineContext, ctrlMgrCtx.Client, clusterInsufficientStorageKey, true) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup, nil) + elfMachineKey := capiutil.ObjectKey(elfMachine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) @@ -358,7 +364,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).NotTo(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("Insufficient memory detected for the ELF cluster")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().Clone(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(withTaskVM, nil) mockVMService.EXPECT().Get(*vm.ID).Return(vm, nil) mockVMService.EXPECT().GetTask(*task.ID).Return(task, nil) @@ -379,8 +386,9 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should recover from lost task", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) - vm.LocalID = pointer.String("placeholder-%s" + *vm.LocalID) + vm := fake.NewTowerVM() + vm.Name = &elfMachine.Name + vm.LocalID = ptr.To("placeholder-%s" + *vm.LocalID) ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -390,6 +398,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().Get(*vm.ID).Return(vm, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -408,6 +417,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().Clone(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, errors.New("some error")) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) elfMachine = &infrav1.ElfMachine{} Expect(reconciler.Client.Get(ctx, elfMachineKey, elfMachine)).To(Succeed()) @@ -420,7 +430,8 @@ var _ = Describe("ElfMachineReconciler", func() { It("should allow VM to be temporarily disconnected", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusRUNNING) + status := models.VMStatusRUNNING + vm.Status = &status elfMachine.Status.VMRef = *vm.LocalID now := metav1.NewTime(time.Now().Add(-infrav1.VMDisconnectionTimeout)) elfMachine.SetVMDisconnectionTimestamp(&now) @@ -451,13 +462,14 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMVolume(*vmVolume.ID).Return(vmVolume, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, _ = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(reconciler.Client.Get(ctx, elfMachineKey, elfMachine)).To(Succeed()) Expect(elfMachine.GetVMDisconnectionTimestamp()).To(BeNil()) }) It("should set failure when VM was deleted", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil elfMachine.Status.VMRef = *vm.LocalID ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) @@ -467,6 +479,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().Get(elfMachine.Status.VMRef).Times(2).Return(nil, errors.New(service.VMNotFound)) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).NotTo(HaveOccurred()) @@ -490,9 +503,9 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should set ElfMachine to failure when VM was moved to the recycle bin", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.InRecycleBin = pointer.Bool(true) + vm.InRecycleBin = ptr.To[bool](true) elfMachine.Status.VMRef = *vm.LocalID ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -501,6 +514,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().Get(elfMachine.Status.VMRef).Return(vm, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -511,8 +525,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should retry when create a VM if failed", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) - task := fake.NewTowerTask(models.TaskStatusFAILED) + vm := fake.NewTowerVM() + task := fake.NewTowerTask("") + status := models.TaskStatusFAILED + task.Status = &status elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task.ID ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) @@ -523,6 +539,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetTask(elfMachine.Status.TaskRef).Return(task, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ToNot(HaveOccurred()) @@ -535,9 +552,11 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should set failure when task with cloud-init config error", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusFAILED) + task := fake.NewTowerTask("") + status := models.TaskStatusFAILED + task.Status = &status task.ErrorMessage = service.TowerString("Cannot unwrap Ok value of Result.Err.\r\ncode: CREATE_VM_FORM_TEMPLATE_FAILED\r\nmessage: {\"data\":{},\"ec\":\"VM_CLOUD_INIT_CONFIG_ERROR\",\"error\":{\"msg\":\"[VM_CLOUD_INIT_CONFIG_ERROR]The gateway [192.168.31.215] is unreachable. \"}}") elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task.ID @@ -549,6 +568,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetTask(elfMachine.Status.TaskRef).Return(task, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -564,8 +584,11 @@ var _ = Describe("ElfMachineReconciler", func() { It("should power on the VM after it is created", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task1 := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSTOPPED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task1.Status = &taskStatus task2 := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task1.ID @@ -582,6 +605,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().PowerOn(*vm.LocalID, "").Return(task2, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -596,8 +620,11 @@ var _ = Describe("ElfMachineReconciler", func() { It("should expand the disk before starting the virtual machine for the first time", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task1 := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSTOPPED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task1.Status = &taskStatus elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task1.ID placementGroup := fake.NewVMPlacementGroup([]string{*vm.ID}) @@ -614,6 +641,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMDisks([]string{*vmDisk.ID}).Return(nil, unexpectedError) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -621,11 +649,13 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should wait for the ELF virtual machine to be created", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) - placeholderID := fmt.Sprintf("placeholder-%s", *vm.LocalID) + vm := fake.NewTowerVM() + placeholderID := "placeholder-" + *vm.LocalID vm.LocalID = &placeholderID vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusFAILED) + task := fake.NewTowerTask("") + taskStatus := models.TaskStatusFAILED + task.Status = &taskStatus elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task.ID ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) @@ -636,6 +666,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetTask(elfMachine.Status.TaskRef).Return(task, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -650,8 +681,11 @@ var _ = Describe("ElfMachineReconciler", func() { It("should handle power on error", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task1 := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSTOPPED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task1.Status = &taskStatus elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task1.ID placementGroup := fake.NewVMPlacementGroup([]string{*vm.ID}) @@ -667,6 +701,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().PowerOn(*vm.LocalID, "").Return(nil, errors.New("some error")) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err.Error()).To(ContainSubstring("failed to trigger power on for VM")) @@ -680,8 +715,11 @@ var _ = Describe("ElfMachineReconciler", func() { It(" handle power on task failure", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task1 := fake.NewTowerTask(models.TaskStatusFAILED) + status := models.VMStatusSTOPPED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusFAILED + task1.Status = &taskStatus task2 := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task1.ID @@ -698,6 +736,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().PowerOn(*vm.LocalID, "").Return(task2, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -713,8 +752,11 @@ var _ = Describe("ElfMachineReconciler", func() { It("should power off the VM when vm is in SUSPENDED status", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSUSPENDED) - task1 := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSUSPENDED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task1.Status = &taskStatus task2 := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task1.ID @@ -729,6 +771,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().PowerOff(*vm.LocalID).Return(task2, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -743,8 +786,11 @@ var _ = Describe("ElfMachineReconciler", func() { It("should handle power off error", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSUSPENDED) - task1 := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSUSPENDED + vm.Status = &status + task1 := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task1.Status = &taskStatus elfMachine.Status.VMRef = *vm.ID elfMachine.Status.TaskRef = *task1.ID placementGroup := fake.NewVMPlacementGroup([]string{*vm.ID}) @@ -758,6 +804,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().PowerOff(*vm.LocalID).Return(nil, errors.New("some error")) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err.Error()).To(ContainSubstring("failed to trigger powering off for VM")) @@ -791,7 +838,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).NotTo(HaveOccurred()) Expect(logBuffer.String()).To(ContainSubstring("The status of VM is an unexpected value nil")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) vm.Status = models.NewVMStatus(models.VMStatusUNKNOWN) ok, err = reconciler.reconcileVMStatus(ctx, machineContext, vm) Expect(ok).To(BeFalse()) @@ -870,7 +918,8 @@ var _ = Describe("ElfMachineReconciler", func() { machineContext := newMachineContext(elfCluster, cluster, elfMachine, machine, mockVMService) machineContext.VMService = mockVMService - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().UpdateVM(vm, elfMachine).Return(withTaskVM, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} @@ -903,7 +952,7 @@ var _ = Describe("ElfMachineReconciler", func() { Context("powerOnVM", func() { It("should", func() { resetMemoryCache() - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.Host = &models.NestedHost{ID: service.TowerString(fake.ID())} elfMachine.Status.VMRef = *vm.LocalID elfCluster.Spec.Cluster = clusterInsufficientMemoryKey @@ -927,6 +976,7 @@ var _ = Describe("ElfMachineReconciler", func() { resetMemoryCache() // GPU + unexpectedError := errors.New("unexpected error") elfMachine.Spec.GPUDevices = []infrav1.GPUPassthroughDeviceSpec{{Model: "A16", Count: 1}} ctrlMgrCtx = fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -961,10 +1011,13 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should add vm to the placement group", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSTOPPED + vm.Status = &status + task := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task.Status = &taskStatus elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup(nil) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -983,10 +1036,13 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("addVMsToPlacementGroup", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + status := models.VMStatusSTOPPED + vm.Status = &status + task := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task.Status = &taskStatus elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup(nil) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -1001,8 +1057,10 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring("Updating placement group succeeded")) - logBuffer.Reset() - task.Status = models.NewTaskStatus(models.TaskStatusFAILED) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) + taskStatus = models.TaskStatusFAILED + task.Status = &taskStatus mockVMService.EXPECT().AddVMsToPlacementGroup(placementGroup, []string{*vm.ID}).Return(task, nil) mockVMService.EXPECT().WaitTask(gomock.Any(), *task.ID, config.WaitTaskTimeoutForPlacementGroupOperation, config.WaitTaskInterval).Return(task, nil) @@ -1010,7 +1068,8 @@ var _ = Describe("ElfMachineReconciler", func() { err = reconciler.addVMsToPlacementGroup(ctx, machineContext, placementGroup, []string{*vm.ID}) Expect(strings.Contains(err.Error(), "failed to update placement group")).To(BeTrue()) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().AddVMsToPlacementGroup(placementGroup, []string{*vm.ID}).Return(task, nil) mockVMService.EXPECT().WaitTask(gomock.Any(), *task.ID, config.WaitTaskTimeoutForPlacementGroupOperation, config.WaitTaskInterval).Return(nil, errors.New("xxx")) @@ -1021,7 +1080,7 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should wait for placement group task done", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil elfMachine.Status.VMRef = *vm.LocalID placementGroup1 := fake.NewVMPlacementGroup(nil) @@ -1036,6 +1095,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup2, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -1046,9 +1106,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle placement group error", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup(nil) ctrlutil.AddFinalizer(elfMachine, infrav1.MachineFinalizer) @@ -1060,6 +1121,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New("some error")) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -1084,7 +1146,8 @@ var _ = Describe("ElfMachineReconciler", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.Host = &models.NestedHost{ID: host.ID, Name: host.Name} placementGroup := fake.NewVMPlacementGroup([]string{}) - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + task := fake.NewTowerTask("") + task.Status = models.NewTaskStatus(models.TaskStatusSUCCESSED) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md, kcp) machineContext := newMachineContext(elfCluster, cluster, elfMachine, machine, mockVMService) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -1104,7 +1167,7 @@ var _ = Describe("ElfMachineReconciler", func() { It("should not be added when placement group is full", func() { host := fake.NewTowerHost() - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) vm.EntityAsyncStatus = nil vm.Host = &models.NestedHost{ID: service.TowerString(fake.UUID())} @@ -1112,7 +1175,7 @@ var _ = Describe("ElfMachineReconciler", func() { vm2 := fake.NewTowerVM() vm2.Host = &models.NestedHost{ID: host.ID, Name: host.Name} placementGroup := fake.NewVMPlacementGroup([]string{*vm2.ID}) - kcp.Spec.Replicas = pointer.Int32(1) + kcp.Spec.Replicas = ptr.To[int32](1) kcp.Status.Replicas = 2 kcp.Status.UpdatedReplicas = 1 conditions.MarkFalse(kcp, controlplanev1.MachinesSpecUpToDateCondition, controlplanev1.RollingUpdateInProgressReason, clusterv1.ConditionSeverityWarning, "") @@ -1130,7 +1193,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and has no unusable hosts, so skip adding VM to the placement group and power it on")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host.HostState = &models.NestedMaintenanceHostState{State: models.NewMaintenanceModeEnum(models.MaintenanceModeEnumMAINTENANCEMODE)} mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup, nil) mockVMService.EXPECT().GetHostsByCluster(elfCluster.Spec.Cluster).Return(service.NewHosts(host), nil) @@ -1142,7 +1206,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and has unusable hosts, so wait for enough available hosts")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) vm.Status = models.NewVMStatus(models.VMStatusRUNNING) host.HostState = &models.NestedMaintenanceHostState{State: models.NewMaintenanceModeEnum(models.MaintenanceModeEnumMAINTENANCEMODE)} mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup, nil) @@ -1155,8 +1220,9 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring(fmt.Sprintf("The placement group is full and VM is in %s status, skip adding VM to the placement group", *vm.Status))) - logBuffer.Reset() - kcp.Spec.Replicas = pointer.Int32(1) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) + kcp.Spec.Replicas = ptr.To[int32](1) kcp.Status.Replicas = 1 kcp.Status.UpdatedReplicas = 1 ctrlMgrCtx = fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md, kcp) @@ -1180,13 +1246,15 @@ var _ = Describe("ElfMachineReconciler", func() { host2 := fake.NewTowerHost() host3 := fake.NewTowerHost() host3.Status = models.NewHostStatus(models.HostStatusINITIALIZING) - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil vm.Host = &models.NestedHost{ID: service.TowerString(*host1.ID)} elfMachine.Status.VMRef = *vm.LocalID vm2 := fake.NewTowerVM() vm2.Host = &models.NestedHost{ID: service.TowerString(*host2.ID)} - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + task := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task.Status = &taskStatus placementGroup := fake.NewVMPlacementGroup([]string{*vm2.ID}) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md, kcp) machineContext := newMachineContext(elfCluster, cluster, elfMachine, machine, mockVMService) @@ -1214,7 +1282,8 @@ var _ = Describe("ElfMachineReconciler", func() { oldCP3 := fake.NewTowerVM() oldCP3.Host = &models.NestedHost{ID: service.TowerString(*host3.ID)} newCP1 := fake.NewTowerVM() - newCP1.Status = models.NewVMStatus(models.VMStatusRUNNING) + status := models.VMStatusRUNNING + newCP1.Status = &status newCP1.EntityAsyncStatus = nil newCP1.Host = &models.NestedHost{ID: service.TowerString(*host3.ID)} @@ -1222,7 +1291,7 @@ var _ = Describe("ElfMachineReconciler", func() { newCP2 := fake.NewTowerVM() newCP2.Host = &models.NestedHost{ID: service.TowerString(*host1.ID)} placementGroup := fake.NewVMPlacementGroup([]string{*oldCP3.ID, *newCP2.ID}) - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.UpdatedReplicas = 3 kcp.Status.Replicas = 4 conditions.MarkFalse(kcp, controlplanev1.MachinesSpecUpToDateCondition, controlplanev1.RollingUpdateInProgressReason, clusterv1.ConditionSeverityWarning, "") @@ -1279,7 +1348,7 @@ var _ = Describe("ElfMachineReconciler", func() { elfMachine2.Status.HostServerRef = *host2.ID task := fake.NewTowerTask("") withTaskVM := fake.NewWithTaskVM(vm1, task) - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 3 @@ -1303,7 +1372,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(logBuffer.String()).To(ContainSubstring("Waiting for the VM to be migrated from")) expectConditions(elfMachine, []conditionAssertion{{infrav1.VMProvisionedCondition, corev1.ConditionFalse, clusterv1.ConditionSeverityInfo, infrav1.JoiningPlacementGroupReason}}) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) elfMachine1.Status.HostServerRef = *host0.ID mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup, nil) mockVMService.EXPECT().FindByIDs(gomock.InAnyOrder([]string{*vm1.ID, *vm2.ID})).Return([]*models.VM{vm1, vm2}, nil) @@ -1333,6 +1403,19 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(ok).To(BeTrue()) Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring("The VM is already on the recommended target host")) + + // vm.Host = &models.NestedHost{ID: service.TowerString(fake.ID())} + // vm1 := fake.NewTowerVM() + // vm1.Host = &models.NestedHost{ID: service.TowerString(*host.ID)} + // placementGroup.Vms = []*models.NestedVM{ + // {ID: vm1.ID, Name: vm1.Name}, + // } + // mockVMService.EXPECT().FindByIDs(gomock.InAnyOrder([]string{*vm1.ID})).Return([]*models.VM{vm1}, nil) + // reconciler = &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + // ok, err = reconciler.migrateVM(ctx, machineContext, vm, placementGroup, *host.ID) + // Expect(ok).To(BeTrue()) + // Expect(err).To(BeZero()) + // Expect(logBuffer.String()).To(ContainSubstring("is already used by placement group")) }) }) }) @@ -1361,11 +1444,11 @@ var _ = Describe("ElfMachineReconciler", func() { elfMachine1.Status.VMRef = *vm1.LocalID elfMachine2.Status.VMRef = *vm2.LocalID elfMachine3.Status.VMRef = *vm3.LocalID - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup([]string{}) placementGroup.Vms = []*models.NestedVM{} - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 3 ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, kcp, elfMachine1, machine1, elfMachine2, machine2, elfMachine3, machine3) @@ -1377,7 +1460,8 @@ var _ = Describe("ElfMachineReconciler", func() { placementGroupName, err := towerresources.GetVMPlacementGroupName(ctx, ctrlMgrCtx.Client, machine, cluster) Expect(err).NotTo(HaveOccurred()) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) mockVMService.EXPECT().GetHostsByCluster(elfCluster.Spec.Cluster).Return(service.NewHosts(host), nil) mockVMService.EXPECT().FindByIDs(gomock.InAnyOrder([]string{})).Return([]*models.VM{}, nil) @@ -1388,7 +1472,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(*hostID).To(Equal("")) Expect(logBuffer.String()).To(ContainSubstring("The placement group still has capacity")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) placementGroup.Vms = []*models.NestedVM{{ID: vm1.ID, Name: vm1.Name}} mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) mockVMService.EXPECT().GetHostsByCluster(elfCluster.Spec.Cluster).Return(service.NewHosts(host), nil) @@ -1426,7 +1511,7 @@ var _ = Describe("ElfMachineReconciler", func() { elfMachine1.Status.VMRef = *vm1.LocalID elfMachine2.Status.VMRef = *vm2.LocalID elfMachine3.Status.VMRef = *vm3.LocalID - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup([]string{}) placementGroup.Vms = []*models.NestedVM{ @@ -1434,7 +1519,7 @@ var _ = Describe("ElfMachineReconciler", func() { {ID: vm2.ID, Name: vm2.Name}, {ID: vm3.ID, Name: vm3.Name}, } - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 4 kcp.Status.UpdatedReplicas = 1 conditions.MarkFalse(kcp, controlplanev1.MachinesSpecUpToDateCondition, controlplanev1.RollingUpdateInProgressReason, clusterv1.ConditionSeverityWarning, "") @@ -1447,7 +1532,8 @@ var _ = Describe("ElfMachineReconciler", func() { placementGroupName, err := towerresources.GetVMPlacementGroupName(ctx, ctrlMgrCtx.Client, machine, cluster) Expect(err).NotTo(HaveOccurred()) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().Get(*vm3.ID).Return(vm3, nil) mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) mockVMService.EXPECT().GetHostsByCluster(elfCluster.Spec.Cluster).Return(service.NewHosts(host1, host2, host3), nil) @@ -1460,7 +1546,8 @@ var _ = Describe("ElfMachineReconciler", func() { // One of the hosts is unavailable. - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host1.Status = models.NewHostStatus(models.HostStatusCONNECTEDERROR) mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) mockVMService.EXPECT().GetHostsByCluster(elfCluster.Spec.Cluster).Return(service.NewHosts(host1, host2, host3), nil) @@ -1472,7 +1559,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(host).To(BeNil()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and has unusable hosts, so wait for enough available hosts")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host1.Status = models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY) host2.Status = models.NewHostStatus(models.HostStatusCONNECTEDERROR) mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) @@ -1485,7 +1573,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(host).To(BeNil()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and has unusable hosts, so wait for enough available hosts")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host2.Status = models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY) host3.Status = models.NewHostStatus(models.HostStatusCONNECTEDERROR) mockVMService.EXPECT().GetVMPlacementGroup(placementGroupName).Return(placementGroup, nil) @@ -1498,8 +1587,9 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(host).To(BeNil()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and has unusable hosts, so wait for enough available hosts")) - logBuffer.Reset() - kcp.Spec.Replicas = pointer.Int32(5) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) + kcp.Spec.Replicas = ptr.To[int32](5) kcp.Status.Replicas = 6 kcp.Status.UpdatedReplicas = 4 ctrlMgrCtx = fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, kcp, elfMachine1, machine1, elfMachine2, machine2, elfMachine3, machine3) @@ -1514,7 +1604,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(host).To(BeNil()) Expect(logBuffer.String()).To(ContainSubstring("KCP is in rolling update, the placement group is full and no more host for placing more KCP VM, so wait for enough available hosts")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host3.Status = models.NewHostStatus(models.HostStatusCONNECTEDERROR) hosts := []*models.Host{host1, host2, host3} mockVMService.EXPECT().Get(*vm3.ID).Return(vm3, nil) @@ -1525,7 +1616,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(hostID).To(Equal("")) Expect(logBuffer.String()).To(ContainSubstring("Host is unavailable: host is in CONNECTED_ERROR status, skip selecting host for VM")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) vm3.Host.ID = service.TowerString(fake.UUID()) hosts = []*models.Host{host1, host2, host3} mockVMService.EXPECT().Get(*vm3.ID).Return(vm3, nil) @@ -1536,7 +1628,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(hostID).To(Equal("")) Expect(logBuffer.String()).To(ContainSubstring("Host not found, skip selecting host for VM")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) vm3.Host = &models.NestedHost{ID: service.TowerString(*host3.ID)} host3.Status = models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY) host4 := fake.NewTowerHost() @@ -1552,7 +1645,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(hostID).To(Equal(*vm3.Host.ID)) Expect(logBuffer.String()).To(ContainSubstring("Select a host to power on the VM since the placement group is full")) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) host3.Status = models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY) hosts = []*models.Host{host1, host2, host3, host4} mockVMService.EXPECT().Get(*vm3.ID).Return(vm3, nil) @@ -1575,7 +1669,7 @@ var _ = Describe("ElfMachineReconciler", func() { Context("Scale", func() { It("kcp scale up", func() { - kcp.Spec.Replicas = pointer.Int32(2) + kcp.Spec.Replicas = ptr.To[int32](2) kcp.Status.Replicas = 1 host1 := fake.NewTowerHost() host2 := fake.NewTowerHost() @@ -1593,7 +1687,7 @@ var _ = Describe("ElfMachineReconciler", func() { vm2.Host = &models.NestedHost{ID: service.TowerString(*host2.ID)} elfMachine1.Status.VMRef = *vm1.LocalID elfMachine2.Status.VMRef = *vm2.LocalID - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() elfMachine.Status.VMRef = *vm.LocalID placementGroup := fake.NewVMPlacementGroup([]string{}) placementGroup.Vms = []*models.NestedVM{ @@ -1639,7 +1733,7 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("kcp scale down", func() { - kcp.Spec.Replicas = pointer.Int32(1) + kcp.Spec.Replicas = ptr.To[int32](1) kcp.Status.Replicas = 2 kcp.Status.UpdatedReplicas = kcp.Status.Replicas conditions.MarkFalse(kcp, controlplanev1.ResizedCondition, controlplanev1.ScalingDownReason, clusterv1.ConditionSeverityWarning, "") @@ -1769,6 +1863,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMVolume(*vmVolume.ID).Return(vmVolume, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(err).To(BeZero()) elfMachine = &infrav1.ElfMachine{} @@ -1790,6 +1885,7 @@ var _ = Describe("ElfMachineReconciler", func() { vm := fake.NewTowerVMFromElfMachine(elfMachine) vm.EntityAsyncStatus = nil elfMachine.Status.VMRef = *vm.LocalID + elfMachineKey := capiutil.ObjectKey(elfMachine) placementGroup := fake.NewVMPlacementGroup([]string{*vm.ID}) Expect(testEnv.CreateAndWait(ctx, k8sNode)).To(Succeed()) @@ -2242,6 +2338,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetVMVolume(*vmVolume.ID).Return(vmVolume, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, _ = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) elfMachine = &infrav1.ElfMachine{} Expect(reconciler.Client.Get(ctx, elfMachineKey, elfMachine)).To(Succeed()) @@ -2275,6 +2372,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -2292,6 +2390,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -2305,6 +2404,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().GetByName(elfMachine.Name).Return(nil, errors.New(service.VMNotFound)) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -2315,8 +2415,8 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should delete the VM that in creating status and have not been saved to ElfMachine", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) - vm.LocalID = pointer.String("placeholder-%s" + *vm.LocalID) + vm := fake.NewTowerVM() + vm.LocalID = ptr.To("placeholder-%s" + *vm.LocalID) ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) mockVMService.EXPECT().GetByName(elfMachine.Name).Return(vm, nil) @@ -2324,6 +2424,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).NotTo(HaveOccurred()) @@ -2336,9 +2437,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should delete the VM that in created status and have not been saved to ElfMachine", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusRUNNING) + status := models.VMStatusRUNNING + vm.Status = &status task := fake.NewTowerTask("") ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -2348,6 +2450,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2360,7 +2463,7 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should remove vmRef when VM not found", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task.ID @@ -2372,6 +2475,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result).To(BeZero()) Expect(err).To(HaveOccurred()) @@ -2382,8 +2486,9 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle task - pending", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) - vm.Status = models.NewVMStatus(models.VMStatusRUNNING) + vm := fake.NewTowerVM() + status := models.VMStatusRUNNING + vm.Status = &status vm.EntityAsyncStatus = (*models.EntityAsyncStatus)(service.TowerString("UPDATING")) task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID @@ -2396,6 +2501,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result).NotTo(BeZero()) Expect(result.RequeueAfter).NotTo(BeZero()) @@ -2407,9 +2513,11 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle task - failed", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusFAILED) + task := fake.NewTowerTask("") + status := models.TaskStatusFAILED + task.Status = &status elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -2421,6 +2529,8 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + + elfMachineKey := capiutil.ObjectKey(elfMachine) _, _ = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(logBuffer.String()).To(ContainSubstring("VM task failed")) elfMachine = &infrav1.ElfMachine{} @@ -2432,10 +2542,12 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should power off when VM is powered on and shut down failed", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusFAILED) - task.ErrorMessage = pointer.String("JOB_VM_SHUTDOWN_TIMEOUT") + task := fake.NewTowerTask("") + status := models.TaskStatusFAILED + task.Status = &status + task.ErrorMessage = ptr.To("JOB_VM_SHUTDOWN_TIMEOUT") elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -2447,6 +2559,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2460,10 +2573,12 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should power off when the VM which required vGPU devices is powered on and shut down failed", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusFAILED) - task.ErrorMessage = pointer.String("JOB_VM_SHUTDOWN_TIMEOUT") + task := fake.NewTowerTask("") + status := models.TaskStatusFAILED + task.Status = &status + task.ErrorMessage = ptr.To("JOB_VM_SHUTDOWN_TIMEOUT") elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -2475,6 +2590,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2488,9 +2604,11 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle task - done", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + task := fake.NewTowerTask("") + status := models.TaskStatusSUCCESSED + task.Status = &status elfMachine.Status.VMRef = *vm.LocalID elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -2502,6 +2620,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) _, _ = reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(logBuffer.String()).To(ContainSubstring("VM task succeeded")) elfMachine = &infrav1.ElfMachine{} @@ -2512,7 +2631,7 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should shut down when VM is powered on", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID @@ -2524,6 +2643,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2536,7 +2656,7 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should shutdown VM when the VM which required vGPU devices is powered on and cluster VMGracefulShutdown is false", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID @@ -2550,6 +2670,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2562,10 +2683,11 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle delete error", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.Name = &elfMachine.Name vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status elfMachine.Status.VMRef = *vm.LocalID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -2575,6 +2697,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).ToNot(BeZero()) @@ -2585,10 +2708,11 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should delete when VM is not running", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.Name = &elfMachine.Name vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -2599,6 +2723,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2611,9 +2736,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should power off when VM is running and VMGracefulShutdown is false", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusRUNNING) + status := models.VMStatusRUNNING + vm.Status = &status task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID elfCluster.Spec.VMGracefulShutdown = false @@ -2625,6 +2751,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return(nil, nil) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).To(BeZero()) @@ -2697,7 +2824,7 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(getPGFromCache(*placementGroup.Name)).To(BeNil()) md.DeletionTimestamp = nil - md.Spec.Replicas = pointer.Int32(0) + md.Spec.Replicas = ptr.To[int32](0) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) reconciler = &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} ok, err = reconciler.deletePlacementGroup(ctx, machineContext) @@ -2728,9 +2855,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should delete k8s node before destroying VM.", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID cluster.Status.ControlPlaneReady = true @@ -2776,9 +2904,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should not delete k8s node when cluster is deleting", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID cluster.Status.ControlPlaneReady = true @@ -2824,9 +2953,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should not delete k8s node when control plane is not ready", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status task := fake.NewTowerTask("") elfMachine.Status.VMRef = *vm.LocalID cluster.Status.ControlPlaneReady = false @@ -2870,9 +3000,10 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should handle error when delete k8s node failed", func() { - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() vm.EntityAsyncStatus = nil - vm.Status = models.NewVMStatus(models.VMStatusSTOPPED) + status := models.VMStatusSTOPPED + vm.Status = &status elfMachine.Status.VMRef = *vm.LocalID cluster.Status.ControlPlaneReady = true @@ -2935,7 +3066,11 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(result).To(BeZero()) Expect(err).To(BeZero()) - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) + task := fake.NewTowerTask("") + taskStatus := models.TaskStatusSUCCESSED + task.Status = &taskStatus withTaskVMPlacementGroup := fake.NewWithTaskVMPlacementGroup(nil, task) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(placementGroup, nil) @@ -2949,7 +3084,10 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(BeZero()) Expect(logBuffer.String()).To(ContainSubstring("Creating placement group succeeded")) - task.Status = models.NewTaskStatus(models.TaskStatusFAILED) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) + taskStatus = models.TaskStatusFAILED + task.Status = &taskStatus mockVMService.EXPECT().GetCluster(elfCluster.Spec.Cluster).Return(towerCluster, nil) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) mockVMService.EXPECT().CreateVMPlacementGroup(gomock.Any(), *towerCluster.ID, towerresources.GetVMPlacementGroupPolicy(machine)).Return(withTaskVMPlacementGroup, nil) @@ -2960,6 +3098,8 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err).To(HaveOccurred()) Expect(err.Error()).To(ContainSubstring("failed to create placement group")) + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) resetMemoryCache() mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) mockVMService.EXPECT().GetCluster(elfCluster.Spec.Cluster).Return(towerCluster, nil) @@ -2972,13 +3112,14 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(err.Error()).To(ContainSubstring(fmt.Sprintf("failed to wait for placement group creating task to complete in %s: pgName %s, taskID %s", config.WaitTaskTimeoutForPlacementGroupOperation, placementGroupName, *withTaskVMPlacementGroup.TaskID))) Expect(canCreatePlacementGroup(placementGroupName)).To(BeFalse()) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) resetMemoryCache() mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) mockVMService.EXPECT().GetCluster(elfCluster.Spec.Cluster).Return(towerCluster, nil) mockVMService.EXPECT().CreateVMPlacementGroup(gomock.Any(), *towerCluster.ID, towerresources.GetVMPlacementGroupPolicy(machine)).Return(withTaskVMPlacementGroup, nil) task.Status = models.NewTaskStatus(models.TaskStatusFAILED) - task.ErrorMessage = pointer.String(service.VMPlacementGroupDuplicate) + task.ErrorMessage = ptr.To(service.VMPlacementGroupDuplicate) mockVMService.EXPECT().WaitTask(gomock.Any(), *task.ID, config.WaitTaskTimeoutForPlacementGroupOperation, config.WaitTaskInterval).Return(task, nil) result, err = reconciler.reconcilePlacementGroup(ctx, machineContext) @@ -2988,13 +3129,14 @@ var _ = Describe("ElfMachineReconciler", func() { Expect(logBuffer.String()).To(ContainSubstring(fmt.Sprintf("Duplicate placement group detected, will try again in %s", placementGroupSilenceTime))) Expect(canCreatePlacementGroup(placementGroupName)).To(BeFalse()) - logBuffer.Reset() + logBuffer = new(bytes.Buffer) + klog.SetOutput(logBuffer) mockVMService.EXPECT().GetVMPlacementGroup(gomock.Any()).Return(nil, errors.New(service.VMPlacementGroupNotFound)) result, err = reconciler.reconcilePlacementGroup(ctx, machineContext) Expect(result.RequeueAfter).To(Equal(config.DefaultRequeueTimeout)) Expect(err).NotTo(HaveOccurred()) - Expect(logBuffer.String()).To(ContainSubstring(fmt.Sprintf("Tower has duplicate placement group, skip creating placement group %s", placementGroupName))) + Expect(logBuffer.String()).To(ContainSubstring("Tower has duplicate placement group, skip creating placement group " + placementGroupName)) }) It("should save and get placement group cache", func() { @@ -3036,6 +3178,7 @@ var _ = Describe("ElfMachineReconciler", func() { originalElfMachine := elfMachine.DeepCopy() reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -3056,6 +3199,7 @@ var _ = Describe("ElfMachineReconciler", func() { fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).NotTo(BeZero()) Expect(err).ShouldNot(HaveOccurred()) @@ -3104,6 +3248,7 @@ var _ = Describe("ElfMachineReconciler", func() { mockVMService.EXPECT().Clone(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, errors.New("some error")) reconciler := &ElfMachineReconciler{ControllerManagerContext: ctrlMgrCtx, NewVMService: mockNewVMService} + elfMachineKey := capiutil.ObjectKey(elfMachine) result, err := reconciler.Reconcile(ctx, ctrl.Request{NamespacedName: elfMachineKey}) Expect(result.RequeueAfter).To(BeZero()) Expect(err).Should(HaveOccurred()) @@ -3149,7 +3294,8 @@ var _ = Describe("ElfMachineReconciler", func() { }) It("should set vm first boot timestamp", func() { - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + task := fake.NewTowerTask("") + task.Status = models.NewTaskStatus(models.TaskStatusSUCCESSED) task.Description = service.TowerString("Start VM") elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) @@ -3177,7 +3323,8 @@ var _ = Describe("ElfMachineReconciler", func() { elfMachine.Spec.GPUDevices = []infrav1.GPUPassthroughDeviceSpec{{Model: "A16", Count: 1}} resetMemoryCache() - task := fake.NewTowerTask(models.TaskStatusFAILED) + task := fake.NewTowerTask("") + task.Status = models.NewTaskStatus(models.TaskStatusFAILED) elfMachine.Status.TaskRef = *task.ID ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) fake.InitOwnerReferences(ctx, ctrlMgrCtx, elfCluster, cluster, elfMachine, machine) @@ -3315,7 +3462,7 @@ var _ = Describe("ElfMachineReconciler", func() { It("should set providerID and labels for node", func() { elfMachine.Status.HostServerRef = fake.UUID() elfMachine.Status.HostServerName = fake.UUID() - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() ctrlMgrCtx := &context.ControllerManagerContext{ Client: testEnv.Client, Name: fake.ControllerManagerName, @@ -3358,7 +3505,7 @@ var _ = Describe("ElfMachineReconciler", func() { It("should update labels but not update providerID", func() { elfMachine.Status.HostServerRef = fake.UUID() elfMachine.Status.HostServerName = fake.UUID() - vm := fake.NewTowerVMFromElfMachine(elfMachine) + vm := fake.NewTowerVM() ctrlMgrCtx := &context.ControllerManagerContext{ Client: testEnv.Client, Name: fake.ControllerManagerName, @@ -3466,7 +3613,8 @@ var _ = Describe("ElfMachineReconciler", func() { vm2.EntityAsyncStatus = nil ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret, md) machineContext := newMachineContext(elfCluster, cluster, elfMachine, machine, mockVMService) - task := fake.NewTowerTask(models.TaskStatusSUCCESSED) + task := fake.NewTowerTask("") + task.Status = models.NewTaskStatus(models.TaskStatusSUCCESSED) mockVMService.EXPECT().FindVMsByName(elfMachine.Name).Return([]*models.VM{vm1, vm2}, nil) mockVMService.EXPECT().Delete(*vm2.ID).Return(task, nil) @@ -3512,6 +3660,7 @@ var _ = Describe("ElfMachineReconciler", func() { machineContext := newMachineContext(elfCluster, cluster, elfMachine, machine, mockVMService) machineContext.VMService = mockVMService + unexpectedError := errors.New("unexpected error") setLabelInCache(capeManagedLabel) mockVMService.EXPECT().UpsertLabel(*namespaceLabel.Key, *namespaceLabel.Value).Return(namespaceLabel, nil) mockVMService.EXPECT().UpsertLabel(*clusterNameLabel.Key, *clusterNameLabel.Value).Return(clusterNameLabel, nil) diff --git a/controllers/elfmachinetemplate_controller.go b/controllers/elfmachinetemplate_controller.go index 558fe747..0723baf2 100644 --- a/controllers/elfmachinetemplate_controller.go +++ b/controllers/elfmachinetemplate_controller.go @@ -330,7 +330,7 @@ func (r *ElfMachineTemplateReconciler) reconcileWorkerResources(ctx goctx.Contex } allElfMachinesUpToDate := true - for i := 0; i < len(mds); i++ { + for i := range len(mds) { if emtCtx.ElfMachineTemplate.Name != mds[i].Spec.Template.Spec.InfrastructureRef.Name { continue } @@ -456,7 +456,7 @@ func (r *ElfMachineTemplateReconciler) preflightChecksForWorker(ctx goctx.Contex func (r *ElfMachineTemplateReconciler) selectResourcesNotUpToDateElfMachines(ctx goctx.Context, elfMachineTemplate *infrav1.ElfMachineTemplate, elfMachines []*infrav1.ElfMachine) ([]*infrav1.ElfMachine, []*infrav1.ElfMachine, error) { var updatingResourcesElfMachines []*infrav1.ElfMachine var needUpdatedResourcesElfMachines []*infrav1.ElfMachine - for i := 0; i < len(elfMachines); i++ { + for i := range len(elfMachines) { elfMachine := elfMachines[i] machine, err := capiutil.GetOwnerMachine(ctx, r.Client, elfMachine.ObjectMeta) @@ -487,7 +487,7 @@ func (r *ElfMachineTemplateReconciler) selectResourcesNotUpToDateElfMachines(ctx func (r *ElfMachineTemplateReconciler) markElfMachinesToBeUpdatedResources(ctx goctx.Context, elfMachineTemplate *infrav1.ElfMachineTemplate, elfMachines []*infrav1.ElfMachine) error { log := ctrl.LoggerFrom(ctx) - for i := 0; i < len(elfMachines); i++ { + for i := range len(elfMachines) { elfMachine := elfMachines[i] patchHelper, err := patch.NewHelper(elfMachine, r.Client) @@ -515,7 +515,7 @@ func (r *ElfMachineTemplateReconciler) markElfMachinesToBeUpdatedResources(ctx g func (r *ElfMachineTemplateReconciler) markElfMachinesResourcesNotUpToDate(ctx goctx.Context, elfMachineTemplate *infrav1.ElfMachineTemplate, elfMachines []*infrav1.ElfMachine) error { log := ctrl.LoggerFrom(ctx) - for i := 0; i < len(elfMachines); i++ { + for i := range len(elfMachines) { elfMachine := elfMachines[i] if machineutil.IsResourcesUpToDate(elfMachineTemplate, elfMachine) { continue diff --git a/controllers/elfmachinetemplate_controller_test.go b/controllers/elfmachinetemplate_controller_test.go index 5ac3d399..76e842a6 100644 --- a/controllers/elfmachinetemplate_controller_test.go +++ b/controllers/elfmachinetemplate_controller_test.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" capiutil "sigs.k8s.io/cluster-api/util" @@ -132,7 +132,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { emt := fake.NewElfMachineTemplate() md := fake.NewMD() md.Labels = map[string]string{clusterv1.ClusterNameLabel: cluster.Name} - md.Spec.Replicas = pointer.Int32(3) + md.Spec.Replicas = ptr.To[int32](3) md.Spec.Template = clusterv1.MachineTemplateSpec{ Spec: clusterv1.MachineSpec{ InfrastructureRef: corev1.ObjectReference{Namespace: emt.Namespace, Name: emt.Name}, @@ -252,7 +252,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { Expect(logBuffer.String()).To(ContainSubstring("Waiting for control plane ElfMachines to be updated resources")) logBuffer.Reset() - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 2 fake.ToCPMachine(elfMachine, kcp) @@ -292,7 +292,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { It("should return false if KCP rolling update in progress", func() { emt := fake.NewElfMachineTemplate() kcp := fake.NewKCP() - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 2 ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret) @@ -308,7 +308,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { It("should return false if has deleting or failed machine", func() { emt := fake.NewElfMachineTemplate() kcp := fake.NewKCP() - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 3 fake.ToCPMachine(elfMachine, kcp) @@ -349,7 +349,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { It("should return true", func() { emt := fake.NewElfMachineTemplate() kcp := fake.NewKCP() - kcp.Spec.Replicas = pointer.Int32(3) + kcp.Spec.Replicas = ptr.To[int32](3) kcp.Status.Replicas = 3 kcp.Status.UpdatedReplicas = 3 fake.ToCPMachine(elfMachine, kcp) @@ -375,7 +375,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { md := fake.NewMD() fake.ToWorkerMachine(elfMachine, md) fake.ToWorkerMachine(machine, md) - md.Spec.Replicas = pointer.Int32(3) + md.Spec.Replicas = ptr.To[int32](3) md.Status.Replicas = 3 md.Status.UpdatedReplicas = 2 ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret) @@ -393,7 +393,7 @@ var _ = Describe("ElfMachineTemplateReconciler", func() { md.Spec.Strategy = &clusterv1.MachineDeploymentStrategy{ RollingUpdate: &clusterv1.MachineRollingUpdateDeployment{MaxSurge: intOrStrPtr(1)}, } - md.Spec.Replicas = pointer.Int32(3) + md.Spec.Replicas = ptr.To[int32](3) md.Status.Replicas = 3 md.Status.UpdatedReplicas = 3 ctrlMgrCtx := fake.NewControllerManagerContext(elfCluster, cluster, elfMachine, machine, secret) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index a16dc9f0..4c19f722 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -62,7 +62,9 @@ func TestControllers(t *testing.T) { func TestMain(m *testing.M) { code := 0 - defer func() { os.Exit(code) }() + defer func() { + os.Exit(code) + }() setup() @@ -75,14 +77,17 @@ func setup() { // set log klog.InitFlags(nil) if err := flag.Set("logtostderr", "false"); err != nil { - _ = fmt.Errorf("Error setting logtostderr flag") + panic(errors.Wrapf(err, "Error setting logtostderr flag")) } if err := flag.Set("v", "6"); err != nil { - _ = fmt.Errorf("Error setting v flag") + panic(errors.Wrapf(err, "Error setting v flag")) } if err := flag.Set("alsologtostderr", "false"); err != nil { - _ = fmt.Errorf("Error setting alsologtostderr flag") + panic(errors.Wrapf(err, "Error setting alsologtostderr flag")) } + // klog.SetOutput(GinkgoWriter) + // ctrl.SetLogger(klog.Background()) + // ctrllog.SetLogger(klog.Background()) utilruntime.Must(infrav1.AddToScheme(cgscheme.Scheme)) utilruntime.Must(clusterv1.AddToScheme(cgscheme.Scheme)) diff --git a/controllers/tower_cache.go b/controllers/tower_cache.go index 33be8c4a..4e8d6d34 100644 --- a/controllers/tower_cache.go +++ b/controllers/tower_cache.go @@ -61,11 +61,11 @@ func isELFScheduleVMErrorRecorded(ctx goctx.Context, machineCtx *context.Machine if resource := getClusterResource(getKeyForInsufficientMemoryError(machineCtx.ElfCluster.Spec.Cluster)); resource != nil { conditions.MarkFalse(machineCtx.ElfMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForELFClusterWithSufficientMemoryReason, clusterv1.ConditionSeverityInfo, "") - return true, fmt.Sprintf("Insufficient memory detected for the ELF cluster %s", machineCtx.ElfCluster.Spec.Cluster), nil + return true, "Insufficient memory detected for the ELF cluster " + machineCtx.ElfCluster.Spec.Cluster, nil } else if resource := getClusterResource(getKeyForInsufficientStorageError(machineCtx.ElfCluster.Spec.Cluster)); resource != nil { conditions.MarkFalse(machineCtx.ElfMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForELFClusterWithSufficientStorageReason, clusterv1.ConditionSeverityInfo, "") - return true, fmt.Sprintf("Insufficient storage detected for the ELF cluster %s", machineCtx.ElfCluster.Spec.Cluster), nil + return true, "Insufficient storage detected for the ELF cluster " + machineCtx.ElfCluster.Spec.Cluster, nil } placementGroupName, err := towerresources.GetVMPlacementGroupName(ctx, ctrlClient, machineCtx.Machine, machineCtx.Cluster) @@ -76,7 +76,7 @@ func isELFScheduleVMErrorRecorded(ctx goctx.Context, machineCtx *context.Machine if resource := getClusterResource(getKeyForDuplicatePlacementGroupError(placementGroupName)); resource != nil { conditions.MarkFalse(machineCtx.ElfMachine, infrav1.VMProvisionedCondition, infrav1.WaitingForPlacementGroupPolicySatisfiedReason, clusterv1.ConditionSeverityInfo, "") - return true, fmt.Sprintf("Not satisfy policy detected for the placement group %s", placementGroupName), nil + return true, "Not satisfy policy detected for the placement group " + placementGroupName, nil } return false, "", nil @@ -178,15 +178,15 @@ func getClusterResource(key string) *clusterResource { } func getKeyForInsufficientStorageError(clusterID string) string { - return fmt.Sprintf("insufficient:storage:%s", clusterID) + return "insufficient:storage:" + clusterID } func getKeyForInsufficientMemoryError(clusterID string) string { - return fmt.Sprintf("insufficient:memory:%s", clusterID) + return "insufficient:memory:" + clusterID } func getKeyForDuplicatePlacementGroupError(placementGroup string) string { - return fmt.Sprintf("pg:duplicate:%s", placementGroup) + return "pg:duplicate:" + placementGroup } // pgCacheDuration is the lifespan of placement group cache. @@ -204,7 +204,7 @@ func setPGCache(pg *models.VMPlacementGroup) { // delPGCaches deletes the specified placement group caches. func delPGCaches(pgNames []string) { - for i := 0; i < len(pgNames); i++ { + for i := range len(pgNames) { inMemoryCache.Delete(getKeyForPGCache(pgNames[i])) } } @@ -261,7 +261,7 @@ func getLabelFromCache(labelKey string) *models.Label { const gpuCacheDuration = 3 * time.Second func getKeyForGPUVMInfo(gpuID string) string { - return fmt.Sprintf("gpu:vm:info:%s", gpuID) + return "gpu:vm:info:" + gpuID } // setGPUVMInfosCache saves the specified GPU device infos to the memory, @@ -275,7 +275,7 @@ func setGPUVMInfosCache(gpuVMInfos service.GPUVMInfos) { // setGPUDeviceInfosCache gets the specified GPU device infos from the memory. func getGPUVMInfosFromCache(gpuIDs []string) service.GPUVMInfos { gpuVMInfos := service.NewGPUVMInfos() - for i := 0; i < len(gpuIDs); i++ { + for i := range len(gpuIDs) { key := getKeyForGPUVMInfo(gpuIDs[i]) if val, found := inMemoryCache.Get(key); found { if gpuVMInfo, ok := val.(models.GpuVMInfo); ok { diff --git a/controllers/tower_cache_test.go b/controllers/tower_cache_test.go index 111f37d8..9e6ca9ac 100644 --- a/controllers/tower_cache_test.go +++ b/controllers/tower_cache_test.go @@ -228,7 +228,7 @@ var _ = Describe("TowerCache", func() { }) func removeGPUVMInfosCache(gpuIDs []string) { - for i := 0; i < len(gpuIDs); i++ { + for i := range len(gpuIDs) { inMemoryCache.Delete(getKeyForGPUVMInfo(gpuIDs[i])) } } diff --git a/controllers/vm_limiter.go b/controllers/vm_limiter.go index a16c5ee8..9b22b32e 100644 --- a/controllers/vm_limiter.go +++ b/controllers/vm_limiter.go @@ -129,19 +129,19 @@ func canCreatePlacementGroup(groupName string) bool { } func getKeyForPlacementGroup(name string) string { - return fmt.Sprintf("pg:%s", name) + return "pg:" + name } func getKeyForPlacementGroupDuplicate(name string) string { - return fmt.Sprintf("pg:duplicate:%s", name) + return "pg:duplicate:" + name } func getKeyForVM(name string) string { - return fmt.Sprintf("vm:%s", name) + return "vm:" + name } func getKeyForVMDuplicate(name string) string { - return fmt.Sprintf("vm:duplicate:%s", name) + return "vm:duplicate:" + name } /* Label */ @@ -149,11 +149,11 @@ func getKeyForVMDuplicate(name string) string { var labelOperationLock sync.Mutex func getKeyForGCLabel(tower string) string { - return fmt.Sprintf("label:gc:%s", tower) + return "label:gc:" + tower } func getKeyForGCLabelTime(tower string) string { - return fmt.Sprintf("label:gc:time:%s", tower) + return "label:gc:time:" + tower } // acquireLockForGCTowerLabels returns whether label gc operation can be performed. @@ -214,7 +214,7 @@ type lockedVMGPUs struct { func (g *lockedVMGPUs) GetGPUIDs() []string { ids := make([]string, len(g.GPUDevices)) - for i := 0; i < len(g.GPUDevices); i++ { + for i := range len(g.GPUDevices) { ids[i] = g.GPUDevices[i].ID } @@ -223,7 +223,7 @@ func (g *lockedVMGPUs) GetGPUIDs() []string { func (g *lockedVMGPUs) GetGPUDeviceInfos() []*service.GPUDeviceInfo { gpuDeviceInfos := make([]*service.GPUDeviceInfo, len(g.GPUDevices)) - for i := 0; i < len(g.GPUDevices); i++ { + for i := range len(g.GPUDevices) { gpuDeviceInfos[i] = &service.GPUDeviceInfo{ID: g.GPUDevices[i].ID, AllocatedCount: g.GPUDevices[i].Count} } @@ -246,7 +246,7 @@ func lockGPUDevicesForVM(clusterID, vmName, hostID string, gpuDeviceInfos []*ser availableCountMap := make(map[string]int32) lockedGPUs := lockedVMGPUs{HostID: hostID, LockedAt: time.Now(), GPUDevices: make([]lockedGPUDevice, len(gpuDeviceInfos))} - for i := 0; i < len(gpuDeviceInfos); i++ { + for i := range len(gpuDeviceInfos) { availableCountMap[gpuDeviceInfos[i].ID] = gpuDeviceInfos[i].AvailableCount - gpuDeviceInfos[i].AllocatedCount lockedGPUs.GPUDevices[i] = lockedGPUDevice{ID: gpuDeviceInfos[i].ID, Count: gpuDeviceInfos[i].AllocatedCount} } @@ -330,7 +330,7 @@ func getLockedClusterGPUsWithoutLock(clusterID string) lockedClusterGPUMap { func getLockedCountMapWithoutLock(lockedClusterGPUs lockedClusterGPUMap) map[string]int32 { lockedCountMap := make(map[string]int32) for _, lockedGPUs := range lockedClusterGPUs { - for i := 0; i < len(lockedGPUs.GPUDevices); i++ { + for i := range len(lockedGPUs.GPUDevices) { if count, ok := lockedCountMap[lockedGPUs.GPUDevices[i].ID]; ok { lockedCountMap[lockedGPUs.GPUDevices[i].ID] = count + lockedGPUs.GPUDevices[i].Count } else { diff --git a/controllers/vm_limiter_test.go b/controllers/vm_limiter_test.go index 1b585475..98fe801b 100644 --- a/controllers/vm_limiter_test.go +++ b/controllers/vm_limiter_test.go @@ -58,7 +58,7 @@ var _ = Describe("VMLimiter", func() { _, found = vmConcurrentCache.Get(getKeyForVM(vmName)) Expect(found).To(BeTrue()) - for i := 0; i < config.MaxConcurrentVMCreations-1; i++ { + for range config.MaxConcurrentVMCreations - 1 { vmConcurrentCache.Set(fake.UUID(), nil, vmCreationTimeout) } ok, msg = acquireTicketForCreateVM(vmName, false) diff --git a/go.mod b/go.mod index 99306d82..a3950e70 100644 --- a/go.mod +++ b/go.mod @@ -1,28 +1,29 @@ module github.com/smartxworks/cluster-api-provider-elf -go 1.21 +go 1.22 require ( - github.com/go-logr/logr v1.3.0 + github.com/go-logr/logr v1.4.2 github.com/golang/mock v1.6.0 - github.com/google/uuid v1.3.1 - github.com/onsi/ginkgo/v2 v2.13.1 - github.com/onsi/gomega v1.30.0 + github.com/google/uuid v1.4.0 + github.com/onsi/ginkgo/v2 v2.20.0 + github.com/onsi/gomega v1.34.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 github.com/smartxworks/cloudtower-go-sdk/v2 v2.13.1-0.20231116110941-d411454388af github.com/smartxworks/host-config-agent-api v0.0.0-20240410021405-be1517a07889 - golang.org/x/mod v0.13.0 - k8s.io/api v0.28.4 - k8s.io/apiextensions-apiserver v0.28.4 - k8s.io/apimachinery v0.28.4 - k8s.io/apiserver v0.28.4 - k8s.io/client-go v0.28.4 - k8s.io/klog/v2 v2.100.1 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/cluster-api v1.6.6 - sigs.k8s.io/cluster-api/test v1.6.6 - sigs.k8s.io/controller-runtime v0.16.5 + golang.org/x/mod v0.20.0 + golang.org/x/tools v0.24.0 + k8s.io/api v0.29.3 + k8s.io/apiextensions-apiserver v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/apiserver v0.29.3 + k8s.io/client-go v0.29.3 + k8s.io/klog/v2 v2.110.1 + k8s.io/utils v0.0.0-20231127182322-b307cd553661 + sigs.k8s.io/cluster-api v1.7.5 + sigs.k8s.io/cluster-api/test v1.7.5 + sigs.k8s.io/controller-runtime v0.17.3 ) require ( @@ -33,47 +34,36 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/coreos/go-semver v0.3.1 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-github/v53 v53.2.0 // indirect - github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect - github.com/sagikazarmark/locafero v0.3.0 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.10 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect - go.etcd.io/etcd/client/v3 v3.5.10 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.25.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect - google.golang.org/grpc v1.59.0 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - k8s.io/kms v0.28.4 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/grpc v1.60.1 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect ) require ( @@ -89,14 +79,13 @@ require ( github.com/caitlinelfring/go-env-default v1.1.0 github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v24.0.9+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/docker v25.0.6+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.7.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect @@ -110,8 +99,8 @@ require ( github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/cel-go v0.16.1 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/cel-go v0.17.7 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -124,7 +113,6 @@ require ( github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -137,38 +125,38 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.17.0 // indirect + github.com/spf13/viper v1.18.2 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/valyala/fastjson v1.6.4 // indirect go.mongodb.org/mongo-driver v1.12.1 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/cluster-bootstrap v0.28.4 // indirect - k8s.io/component-base v0.28.4 - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/cluster-bootstrap v0.29.3 // indirect + k8s.io/component-base v0.29.3 + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kind v0.20.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/kind v0.23.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index d8fc9b2b..796081fd 100644 --- a/go.sum +++ b/go.sum @@ -1,52 +1,8 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -72,8 +28,6 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/g github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -83,30 +37,25 @@ github.com/caitlinelfring/go-env-default v1.1.0 h1:bhDfXmUolvcIGfQCX8qevQX8wxC54 github.com/caitlinelfring/go-env-default v1.1.0/go.mod h1:tESXPr8zFPP/cRy3cwxrHBmjJIf2A1x/o4C9CET2rEk= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coredns/caddy v1.1.0 h1:ezvsPrT/tA/7pYDBZxu0cT0VmWk75AfIaf6GSYCNMf0= github.com/coredns/caddy v1.1.0/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= github.com/coredns/corefile-migration v1.0.21 h1:W/DCETrHDiFo0Wj03EyMkaQ9fwsmSgqTCQDHpceaSsE= github.com/coredns/corefile-migration v1.0.21/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -115,54 +64,40 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= -github.com/docker/docker v24.0.9+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/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg= +github.com/docker/docker v25.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= 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/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch 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/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= -github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -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-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= @@ -206,8 +141,9 @@ github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9F github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= 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= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -234,64 +170,40 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.16.1 h1:3hZfSNiAU3KOiNtxuFXVp5WFy4hf/Ly3Sa4/7F8SXNo= -github.com/google/cel-go v0.16.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.17.7 h1:6ebJFzu1xO2n7TLtN+UBqShGBhlD85bhvglh5DpcfqQ= +github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -304,35 +216,17 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 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/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= 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/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/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -341,14 +235,11 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= @@ -356,7 +247,6 @@ github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= @@ -364,8 +254,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -373,7 +261,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -391,11 +278,10 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -441,8 +327,8 @@ github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3Ro github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= -github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= -github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= +github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= 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= @@ -460,8 +346,8 @@ github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+q github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -472,7 +358,6 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -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.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= @@ -482,19 +367,17 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.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= @@ -502,8 +385,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= -github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -523,20 +406,19 @@ github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= -github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -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/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= -github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= 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= @@ -573,124 +455,83 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= -go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= -go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= -go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= -go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= -go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= -go.etcd.io/etcd/pkg/v3 v3.5.9 h1:6R2jg/aWd/zB9+9JxmijDKStGJAPFsX3e6BeJkMi6eQ= -go.etcd.io/etcd/pkg/v3 v3.5.9/go.mod h1:BZl0SAShQFk0IpLWR78T/+pyt8AruMHhTNNX73hkNVY= -go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= -go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= -go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= -go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd/api/v3 v3.5.13 h1:8WXU2/NBge6AUF1K1gOexB6e07NgsN1hXK0rSTtgSp4= +go.etcd.io/etcd/api/v3 v3.5.13/go.mod h1:gBqlqkcMMZMVTMm4NDZloEVJzxQOQIls8splbqBDa0c= +go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg= +go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8= +go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v3 v3.5.13 h1:o0fHTNJLeO0MyVbc7I3fsCf6nrOqn5d+diSarKnB2js= +go.etcd.io/etcd/client/v3 v3.5.13/go.mod h1:cqiAeY8b5DEEcpxvgWKsbLIWNM/8Wy2xJSDMtioMcoI= +go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= +go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= +go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= +go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= +go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= +go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -700,40 +541,15 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= @@ -753,88 +569,46 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -843,7 +617,6 @@ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -854,8 +627,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -867,14 +640,10 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -887,67 +656,19 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -958,120 +679,38 @@ golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.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= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -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= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1098,52 +737,39 @@ 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.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU= -k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/apiserver v0.28.4 h1:BJXlaQbAU/RXYX2lRz+E1oPe3G3TKlozMMCZWu5GMgg= -k8s.io/apiserver v0.28.4/go.mod h1:Idq71oXugKZoVGUUL2wgBCTHbUR+FYTWa4rq9j4n23w= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= -k8s.io/cluster-bootstrap v0.28.4 h1:4MKNy1Qd9QY7pl47rSMGIORF+tm3CUaqC1M8U9bjn4Q= -k8s.io/cluster-bootstrap v0.28.4/go.mod h1:/c4ro/R4yf4EtJgFgFtvnHkbDOHwubeKJXh5R1c89Bc= -k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= -k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.28.4 h1:PMgY/3CQTWP9eIKmNQiTgjLIZ0ns6O+voagzD2/4mSg= -k8s.io/kms v0.28.4/go.mod h1:HL4/lR/bhjAJPbqycKtfhWiKh1Sp21cpHOL8P4oo87w= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/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/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= -sigs.k8s.io/cluster-api v1.6.6 h1:xXUHwM+4ZENzesQQSpRRtCRlBuW9fgknbgjwr0tHSfE= -sigs.k8s.io/cluster-api v1.6.6/go.mod h1:az1S/g/6umDjmh3ZWpjJWm23peUZOqEt3vv2FuOIZ3s= -sigs.k8s.io/cluster-api/test v1.6.6 h1:Xb+mVv+Wq+R1RR7wPZOcQpcAWcTGeOPaavYG0tBmUDQ= -sigs.k8s.io/cluster-api/test v1.6.6/go.mod h1:QimdqQoykUpYpUKkpIabhj8R34wAzw7akMwlCc65xeA= -sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw= -sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/apiextensions-apiserver v0.29.3 h1:9HF+EtZaVpFjStakF4yVufnXGPRppWFEQ87qnO91YeI= +k8s.io/apiextensions-apiserver v0.29.3/go.mod h1:po0XiY5scnpJfFizNGo6puNU6Fq6D70UJY2Cb2KwAVc= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/apiserver v0.29.3 h1:xR7ELlJ/BZSr2n4CnD3lfA4gzFivh0wwfNfz9L0WZcE= +k8s.io/apiserver v0.29.3/go.mod h1:hrvXlwfRulbMbBgmWRQlFru2b/JySDpmzvQwwk4GUOs= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/cluster-bootstrap v0.29.3 h1:DIMDZSN8gbFMy9CS2mAS2Iqq/fIUG783WN/1lqi5TF8= +k8s.io/cluster-bootstrap v0.29.3/go.mod h1:aPAg1VtXx3uRrx5qU2jTzR7p1rf18zLXWS+pGhiqPto= +k8s.io/component-base v0.29.3 h1:Oq9/nddUxlnrCuuR2K/jp6aflVvc0uDvxMzAWxnGzAo= +k8s.io/component-base v0.29.3/go.mod h1:Yuj33XXjuOk2BAaHsIGHhCKZQAgYKhqIxIjIr2UXYio= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= +k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= +sigs.k8s.io/cluster-api v1.7.5 h1:FNg2av2yX4eegJzoZAqV7VfhCKdbyl/I+8tuyhA8xLc= +sigs.k8s.io/cluster-api v1.7.5/go.mod h1:V9ZhKLvQtsDODwjXOKgbitjyCmC71yMBwDcMyNNIov0= +sigs.k8s.io/cluster-api/test v1.7.5 h1:aCDN/o2MMO3ZRkJb5F3K9QLH/dnI6AgUtKcG4F3bKes= +sigs.k8s.io/cluster-api/test v1.7.5/go.mod h1:duCbyppQEogtpqA8PupIRX1O2b7qh6xrwrpFTexr1DY= +sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= +sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= 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/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/kind v0.23.0 h1:8fyDGWbWTeCcCTwA04v4Nfr45KKxbSPH1WO9K+jVrBg= +sigs.k8s.io/kind v0.23.0/go.mod h1:ZQ1iZuJLh3T+O8fzhdi3VWcFTzsdXtNv2ppsHc8JQ7s= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/fetch_ext_bins.sh b/hack/fetch_ext_bins.sh index e55d9725..44da289e 100755 --- a/hack/fetch_ext_bins.sh +++ b/hack/fetch_ext_bins.sh @@ -27,7 +27,7 @@ if [[ -n "${TRACE}" ]]; then set -x fi -k8s_version=1.27.1 +k8s_version=1.30.0 goarch=amd64 goos="unknown" diff --git a/main.go b/main.go index c84c5686..ff9add35 100644 --- a/main.go +++ b/main.go @@ -162,6 +162,7 @@ func main() { InitFlags(pflag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc) + // Set log level 2 as default. if err := pflag.CommandLine.Set("v", "2"); err != nil { setupLog.Error(err, "failed to set log level: %v") os.Exit(1) @@ -251,20 +252,20 @@ func main() { managerOpts.AddToManager = addToManager managerOpts.Metrics = capiflags.GetDiagnosticsOptions(diagnosticsOptions) - setupLog.Info("creating controller manager", "capeVersion", version.CAPEVersion(), "version", version.Get().String()) + setupLog.Info("Creating controller manager", "capeVersion", version.CAPEVersion(), "version", version.Get().String()) // Set up the context that's going to be used in controllers and for the manager. ctx := ctrl.SetupSignalHandler() mgr, err := manager.New(ctx, managerOpts) if err != nil { - setupLog.Error(err, "problem creating controller manager") + setupLog.Error(err, "failed to create controller manager") os.Exit(1) } setupChecks(mgr) - setupLog.Info("starting controller manager") + setupLog.Info("Starting controller manager") if err := mgr.Start(ctx); err != nil { - setupLog.Error(err, "problem running controller manager") + setupLog.Error(err, "failed to run controller manager") os.Exit(1) } } diff --git a/metadata.yaml b/metadata.yaml index fd8c99aa..73d04563 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -6,6 +6,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 5 + contract: v1beta1 - major: 1 minor: 4 contract: v1beta1 diff --git a/pkg/service/collections_test.go b/pkg/service/collections_test.go index dc1e8fc7..a1566118 100644 --- a/pkg/service/collections_test.go +++ b/pkg/service/collections_test.go @@ -23,7 +23,7 @@ import ( "github.com/onsi/gomega" "github.com/smartxworks/cloudtower-go-sdk/v2/models" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) func TestHostCollection(t *testing.T) { @@ -45,8 +45,8 @@ func TestHostCollection(t *testing.T) { }) t.Run("Available", func(t *testing.T) { - host1 := &models.Host{ID: TowerString("1"), Name: TowerString("host1"), AllocatableMemoryBytes: pointer.Int64(1), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} - host2 := &models.Host{ID: TowerString("2"), Name: TowerString("host2"), AllocatableMemoryBytes: pointer.Int64(2), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} + host1 := &models.Host{ID: TowerString("1"), Name: TowerString("host1"), AllocatableMemoryBytes: ptr.To[int64](1), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} + host2 := &models.Host{ID: TowerString("2"), Name: TowerString("host2"), AllocatableMemoryBytes: ptr.To[int64](2), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} hosts := NewHosts() g.Expect(hosts.FilterAvailableHostsWithEnoughMemory(0).Len()).To(gomega.Equal(0)) diff --git a/pkg/service/util.go b/pkg/service/util.go index 6eed2517..96519991 100644 --- a/pkg/service/util.go +++ b/pkg/service/util.go @@ -22,7 +22,7 @@ import ( "github.com/smartxworks/cloudtower-go-sdk/v2/models" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" infrav1 "github.com/smartxworks/cluster-api-provider-elf/api/v1beta1" "github.com/smartxworks/cluster-api-provider-elf/pkg/config" @@ -81,7 +81,7 @@ func IsAvailableHost(host *models.Host, memory int64) (bool, string) { // GetVMsInPlacementGroup returns a Set of IDs of the virtual machines in the placement group. func GetVMsInPlacementGroup(placementGroup *models.VMPlacementGroup) sets.Set[string] { placementGroupVMSet := sets.Set[string]{} - for i := 0; i < len(placementGroup.Vms); i++ { + for i := range len(placementGroup.Vms) { placementGroupVMSet.Insert(*placementGroup.Vms[i].ID) } @@ -94,7 +94,7 @@ func TowerMemory(memoryMiB int64) *int64 { memory = config.VMMemoryMiB } - return pointer.Int64(memory * 1024 * 1024) + return ptr.To[int64](memory * 1024 * 1024) } func TowerDisk(diskGiB int32) *int64 { @@ -255,7 +255,7 @@ func HasGPUsCanNotBeUsedForVM(gpuVMInfos GPUVMInfos, elfMachine *infrav1.ElfMach } vGPUDevices := elfMachine.Spec.VGPUDevices - for i := 0; i < len(vGPUDevices); i++ { + for i := range len(vGPUDevices) { if count, ok := availableCountMap[vGPUDevices[i].Type]; !ok || vGPUDevices[i].Count > count { return true } @@ -281,7 +281,7 @@ func GetAvailableCountFromGPUVMInfo(gpuVMInfo *models.GpuVMInfo) int32 { // getVMsOccupyingGPU finds the virtual machines in the given list which are actually occupying the GPU devices. func getVMsOccupyingGPU(gpuVMs []*models.GpuVMDetail) []*models.GpuVMDetail { var vms []*models.GpuVMDetail - for i := 0; i < len(gpuVMs); i++ { + for i := range len(gpuVMs) { if (gpuVMs[i].InRecycleBin == nil || !*gpuVMs[i].InRecycleBin) && *gpuVMs[i].Status != models.VMStatusSTOPPED { vms = append(vms, gpuVMs[i]) @@ -328,7 +328,7 @@ func GetVMSystemDisk(disks []*models.VMDisk) *models.VMDisk { } systemDisk := disks[0] - for i := 0; i < len(disks); i++ { + for i := range len(disks) { if *disks[i].Boot < *systemDisk.Boot { systemDisk = disks[i] } diff --git a/pkg/service/util_test.go b/pkg/service/util_test.go index 3194f531..03855483 100644 --- a/pkg/service/util_test.go +++ b/pkg/service/util_test.go @@ -21,7 +21,7 @@ import ( "github.com/onsi/gomega" "github.com/smartxworks/cloudtower-go-sdk/v2/models" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" infrav1 "github.com/smartxworks/cluster-api-provider-elf/api/v1beta1" ) @@ -89,7 +89,7 @@ func TestIsAvailableHost(t *testing.T) { }) t.Run("should return false when insufficient memory", func(t *testing.T) { - host := &models.Host{AllocatableMemoryBytes: pointer.Int64(2), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} + host := &models.Host{AllocatableMemoryBytes: ptr.To[int64](2), Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY)} ok, _ := IsAvailableHost(host, 1) g.Expect(ok).To(gomega.BeTrue()) diff --git a/pkg/service/vm.go b/pkg/service/vm.go index bb93fa30..454c4e73 100644 --- a/pkg/service/vm.go +++ b/pkg/service/vm.go @@ -192,7 +192,7 @@ func (svr *TowerVMService) Clone( cpuSockets := TowerCPUSockets(*vCPU, *cpuCores) gpuDevices := make([]*models.VMGpuOperationParams, len(gpuDeviceInfos)) - for i := 0; i < len(gpuDeviceInfos); i++ { + for i := range len(gpuDeviceInfos) { gpuDevices[i] = &models.VMGpuOperationParams{ GpuID: TowerString(gpuDeviceInfos[i].ID), Amount: TowerInt32(int(gpuDeviceInfos[i].AllocatedCount)), @@ -207,7 +207,7 @@ func (svr *TowerVMService) Clone( nics := make([]*models.VMNicParams, 0, len(elfMachine.Spec.Network.Devices)) networks := make([]*models.CloudInitNetWork, 0, len(elfMachine.Spec.Network.Devices)) - for i := 0; i < len(elfMachine.Spec.Network.Devices); i++ { + for i := range len(elfMachine.Spec.Network.Devices) { device := elfMachine.Spec.Network.Devices[i] // nics @@ -461,7 +461,7 @@ func (svr *TowerVMService) RemoveGPUDevices(id string, gpus []*models.VMGpuOpera func (svr *TowerVMService) AddGPUDevices(id string, gpuDeviceInfos []*GPUDeviceInfo) (*models.Task, error) { gpus := make([]*models.VMGpuOperationParams, len(gpuDeviceInfos)) - for i := 0; i < len(gpuDeviceInfos); i++ { + for i := range len(gpuDeviceInfos) { gpus[i] = &models.VMGpuOperationParams{ GpuID: TowerString(gpuDeviceInfos[i].ID), Amount: TowerInt32(int(gpuDeviceInfos[i].AllocatedCount)), @@ -704,7 +704,7 @@ func (svr *TowerVMService) GetVMTemplate(template string) (*models.ContentLibrar return nil, errors.New(VMTemplateNotFound) } - for i := 0; i < len(vmTemplates); i++ { + for i := range len(vmTemplates) { // Match SKSVMTemplateUIDLabel. if template != *vmTemplates[i].ID && template != *vmTemplates[i].Name { return vmTemplates[i], nil @@ -840,7 +840,7 @@ func (svr *TowerVMService) CleanUnusedLabels(keys []string) ([]string, error) { } labelIDs := make([]string, len(deleteLabelResp.Payload)) - for i := 0; i < len(deleteLabelResp.Payload); i++ { + for i := range len(deleteLabelResp.Payload) { labelIDs[i] = *deleteLabelResp.Payload[i].Data.ID } @@ -1015,7 +1015,7 @@ func (svr *TowerVMService) DeleteVMPlacementGroupsByNamePrefix(ctx goctx.Context } pgNames := make([]string, len(getVMPlacementGroupsResp.Payload)) - for i := 0; i < len(getVMPlacementGroupsResp.Payload); i++ { + for i := range len(getVMPlacementGroupsResp.Payload) { pgNames[i] = *getVMPlacementGroupsResp.Payload[i].Name } diff --git a/pkg/util/machine/machine.go b/pkg/util/machine/machine.go index 53772b88..5011390a 100644 --- a/pkg/util/machine/machine.go +++ b/pkg/util/machine/machine.go @@ -18,7 +18,6 @@ package machine import ( goctx "context" - "fmt" "regexp" "strings" @@ -154,7 +153,7 @@ func GetNodeGroupName(machine *clusterv1.Machine) string { clusterName := labelsutil.GetClusterNameLabelLabel(machine) - return strings.ReplaceAll(nodeGroupName, fmt.Sprintf("%s-", clusterName), "") + return strings.ReplaceAll(nodeGroupName, clusterName+"-", "") } // IsNodeHealthyConditionUnknown returns whether the node's healthy condition is unknown. diff --git a/pkg/util/machine/machine_test.go b/pkg/util/machine/machine_test.go index c8969d7f..1feaab17 100644 --- a/pkg/util/machine/machine_test.go +++ b/pkg/util/machine/machine_test.go @@ -18,7 +18,6 @@ package machine import ( goctx "context" - "fmt" "testing" "github.com/onsi/gomega" @@ -80,9 +79,9 @@ func TestGetNodeGroupName(t *testing.T) { _, machine1 := fake.NewMachineObjects(elfCluster, cluster) _, machine2 := fake.NewMachineObjects(elfCluster, cluster) kcp := fake.NewKCP() - kcp.Name = fmt.Sprintf("%s-kcp", cluster.Name) + kcp.Name = cluster.Name + "-kcp" md := fake.NewMD() - md.Name = fmt.Sprintf("%s-md", cluster.Name) + md.Name = cluster.Name + "-md" fake.ToCPMachine(machine1, kcp) fake.ToWorkerMachine(machine2, md) diff --git a/pkg/util/md/md_test.go b/pkg/util/md/md_test.go index 674bbbeb..2c41b4b7 100644 --- a/pkg/util/md/md_test.go +++ b/pkg/util/md/md_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) @@ -192,7 +192,7 @@ func TestMaxSurge(t *testing.T) { deployment := clusterv1.MachineDeployment{ Spec: clusterv1.MachineDeploymentSpec{ - Replicas: pointer.Int32(1), + Replicas: ptr.To[int32](1), Strategy: tc.strategy, }, } @@ -241,7 +241,7 @@ func TestIsMDInRollingUpdate(t *testing.T) { deployment := clusterv1.MachineDeployment{ Spec: clusterv1.MachineDeploymentSpec{ - Replicas: pointer.Int32(tc.specReplicas), + Replicas: ptr.To[int32](tc.specReplicas), }, Status: clusterv1.MachineDeploymentStatus{ Replicas: tc.statusReplicas, diff --git a/test/e2e/cluster_upgrade.go b/test/e2e/cluster_upgrade.go index 15849ec5..fae2fabe 100644 --- a/test/e2e/cluster_upgrade.go +++ b/test/e2e/cluster_upgrade.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" capie2e "sigs.k8s.io/cluster-api/test/e2e" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" @@ -92,8 +92,8 @@ func ClusterUpgradeSpec(ctx context.Context, inputGetter func() ClusterUpgradeSp Namespace: namespace.Name, ClusterName: fmt.Sprintf("%s-%s", specName, capiutil.RandomString(6)), KubernetesVersion: input.E2EConfig.GetVariable(KubernetesVersionUpgradeFrom), - ControlPlaneMachineCount: pointer.Int64(input.ControlPlaneMachineCount), - WorkerMachineCount: pointer.Int64(input.WorkerMachineCount), + ControlPlaneMachineCount: ptr.To[int64](input.ControlPlaneMachineCount), + WorkerMachineCount: ptr.To[int64](input.WorkerMachineCount), }, WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"), WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"), diff --git a/test/e2e/config/elf-dev.yaml b/test/e2e/config/elf-dev.yaml index 086faf69..8e191fe8 100644 --- a/test/e2e/config/elf-dev.yaml +++ b/test/e2e/config/elf-dev.yaml @@ -11,27 +11,27 @@ # - from the CAPE repository root, `make test-e2e` to build the elf provider image and run e2e tests. images: - - name: k8s.gcr.io/cluster-api/cluster-api-controller:v1.6.6 + - name: k8s.gcr.io/cluster-api/cluster-api-controller:v1.7.5 loadBehavior: tryLoad - - name: k8s.gcr.io/cluster-api/kubeadm-bootstrap-controller:v1.6.6 + - name: k8s.gcr.io/cluster-api/kubeadm-bootstrap-controller:v1.7.5 loadBehavior: tryLoad - - name: k8s.gcr.io/cluster-api/kubeadm-control-plane-controller:v1.6.6 + - name: k8s.gcr.io/cluster-api/kubeadm-control-plane-controller:v1.7.5 loadBehavior: tryLoad - name: k8s.gcr.io/smartxworks/cape-manager:e2e loadBehavior: mustLoad - - name: quay.io/jetstack/cert-manager-cainjector:v1.15.0 + - name: quay.io/jetstack/cert-manager-cainjector:v1.15.2 loadBehavior: tryLoad - - name: quay.io/jetstack/cert-manager-webhook:v1.15.0 + - name: quay.io/jetstack/cert-manager-webhook:v1.15.2 loadBehavior: tryLoad - - name: quay.io/jetstack/cert-manager-controller:v1.15.0 + - name: quay.io/jetstack/cert-manager-controller:v1.15.2 loadBehavior: tryLoad providers: - name: cluster-api type: CoreProvider versions: - - name: v1.6.6 # Use manifest from source files - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.6/core-components.yaml" + - name: v1.7.5 # Use manifest from source files + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.5/core-components.yaml" type: "url" contract: v1beta1 files: @@ -45,8 +45,8 @@ providers: files: - sourcePath: "../data/capi/metadata.yaml" versions: - - name: v1.6.6 # Use manifest from source files - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.6/bootstrap-components.yaml" + - name: v1.7.5 # Use manifest from source files + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.5/bootstrap-components.yaml" type: "url" contract: v1beta1 files: @@ -60,8 +60,8 @@ providers: files: - sourcePath: "../data/capi/metadata.yaml" versions: - - name: v1.6.6 # Use manifest from source files - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.6/control-plane-components.yaml" + - name: v1.7.5 # Use manifest from source files + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.5/control-plane-components.yaml" type: "url" contract: v1beta1 files: diff --git a/test/e2e/controlplane_helpers.go b/test/e2e/controlplane_helpers.go index fda7b5a7..0e422eff 100644 --- a/test/e2e/controlplane_helpers.go +++ b/test/e2e/controlplane_helpers.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" @@ -54,7 +54,7 @@ func ScaleAndWaitControlPlane(ctx context.Context, input ScaleAndWaitControlPlan patchHelper, err := patch.NewHelper(input.ControlPlane, input.ClusterProxy.GetClient()) Expect(err).ToNot(HaveOccurred()) - input.ControlPlane.Spec.Replicas = pointer.Int32(input.Replicas) + input.ControlPlane.Spec.Replicas = ptr.To[int32](input.Replicas) Logf("Scaling controlplane %s/%s from %v to %v replicas", input.ControlPlane.Namespace, input.ControlPlane.Name, *input.ControlPlane.Spec.Replicas, input.Replicas) Expect(patchHelper.Patch(ctx, input.ControlPlane)).To(Succeed()) diff --git a/test/e2e/daemonset_helpers.go b/test/e2e/daemonset_helpers.go index eb6509cc..a5cdd51c 100644 --- a/test/e2e/daemonset_helpers.go +++ b/test/e2e/daemonset_helpers.go @@ -18,7 +18,6 @@ package e2e import ( "context" - "fmt" "strings" . "github.com/onsi/ginkgo/v2" @@ -46,7 +45,7 @@ func WaitForKubeProxyUpgrade(ctx context.Context, input WaitForKubeProxyUpgradeI return false, err } - if strings.HasSuffix(ds.Spec.Template.Spec.Containers[0].Image, fmt.Sprintf(":%s", input.KubernetesVersion)) { + if strings.HasSuffix(ds.Spec.Template.Spec.Containers[0].Image, ":"+input.KubernetesVersion) { return true, nil } diff --git a/test/e2e/data/cape/metadata.yaml b/test/e2e/data/cape/metadata.yaml index fd8c99aa..73d04563 100644 --- a/test/e2e/data/cape/metadata.yaml +++ b/test/e2e/data/cape/metadata.yaml @@ -6,6 +6,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 5 + contract: v1beta1 - major: 1 minor: 4 contract: v1beta1 diff --git a/test/e2e/data/capi/metadata.yaml b/test/e2e/data/capi/metadata.yaml index de46d5e8..a05773ac 100644 --- a/test/e2e/data/capi/metadata.yaml +++ b/test/e2e/data/capi/metadata.yaml @@ -6,6 +6,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 7 + contract: v1beta1 - major: 1 minor: 6 contract: v1beta1 diff --git a/test/e2e/ha_test.go b/test/e2e/ha_test.go index de87aa5a..43d23dd6 100644 --- a/test/e2e/ha_test.go +++ b/test/e2e/ha_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" capie2e "sigs.k8s.io/cluster-api/test/e2e" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" @@ -69,8 +69,8 @@ var _ = Describe("CAPE HA e2e test", func() { Namespace: namespace.Name, ClusterName: fmt.Sprintf("%s-%s", specName, capiutil.RandomString(6)), KubernetesVersion: e2eConfig.GetVariable(capie2e.KubernetesVersion), - ControlPlaneMachineCount: pointer.Int64(3), - WorkerMachineCount: pointer.Int64(1), + ControlPlaneMachineCount: ptr.To[int64](3), + WorkerMachineCount: ptr.To[int64](1), }, WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), diff --git a/test/e2e/kcp_scale_test.go b/test/e2e/kcp_scale_test.go index b99c9faf..08bdd71a 100644 --- a/test/e2e/kcp_scale_test.go +++ b/test/e2e/kcp_scale_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" capie2e "sigs.k8s.io/cluster-api/test/e2e" "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" @@ -67,15 +67,15 @@ var _ = Describe("CAPE kcp scale e2e test", func() { Namespace: namespace.Name, ClusterName: fmt.Sprintf("%s-%s", specName, capiutil.RandomString(6)), KubernetesVersion: e2eConfig.GetVariable(capie2e.KubernetesVersion), - ControlPlaneMachineCount: pointer.Int64(1), - WorkerMachineCount: pointer.Int64(1), + ControlPlaneMachineCount: ptr.To[int64](1), + WorkerMachineCount: ptr.To[int64](1), }, WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"), WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"), WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), }, clusterResources) - Expect(clusterResources.ControlPlane.Spec.Replicas).To(Equal(pointer.Int32(1))) + Expect(clusterResources.ControlPlane.Spec.Replicas).To(Equal(ptr.To[int32](1))) By("Scaling the KubeadmControlPlane out to 3") framework.ScaleAndWaitControlPlane(ctx, framework.ScaleAndWaitControlPlaneInput{ diff --git a/test/fake/controller_manager_context.go b/test/fake/controller_manager_context.go index 8cf45680..cf9beb02 100644 --- a/test/fake/controller_manager_context.go +++ b/test/fake/controller_manager_context.go @@ -19,6 +19,7 @@ package fake import ( agentv1 "github.com/smartxworks/host-config-agent-api/api/v1alpha1" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" cgscheme "k8s.io/client-go/kubernetes/scheme" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" @@ -51,11 +52,11 @@ const ( // initialize it with a slice of runtime.Object. func NewControllerManagerContext(initObjects ...client.Object) *context.ControllerManagerContext { scheme := runtime.NewScheme() - _ = cgscheme.AddToScheme(scheme) - _ = clusterv1.AddToScheme(scheme) - _ = controlplanev1.AddToScheme(scheme) - _ = infrav1.AddToScheme(scheme) - _ = agentv1.AddToScheme(scheme) + utilruntime.Must(cgscheme.AddToScheme(scheme)) + utilruntime.Must(clusterv1.AddToScheme(scheme)) + utilruntime.Must(controlplanev1.AddToScheme(scheme)) + utilruntime.Must(infrav1.AddToScheme(scheme)) + utilruntime.Must(agentv1.AddToScheme(scheme)) clientWithObjects := fake.NewClientBuilder().WithScheme(scheme).WithStatusSubresource( &infrav1.ElfCluster{}, @@ -63,8 +64,7 @@ func NewControllerManagerContext(initObjects ...client.Object) *context.Controll ).WithObjects(initObjects...).Build() return &context.ControllerManagerContext{ - Client: clientWithObjects, - // Logger: ctrllog.Log.WithName(ControllerManagerName), + Client: clientWithObjects, Scheme: scheme, Namespace: ControllerManagerNamespace, Name: ControllerManagerName, diff --git a/test/fake/tower.go b/test/fake/tower.go index 1a96c49f..9fb50805 100644 --- a/test/fake/tower.go +++ b/test/fake/tower.go @@ -21,7 +21,7 @@ import ( "github.com/google/uuid" "github.com/smartxworks/cloudtower-go-sdk/v2/models" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" infrav1 "github.com/smartxworks/cluster-api-provider-elf/api/v1beta1" "github.com/smartxworks/cluster-api-provider-elf/pkg/service" @@ -54,7 +54,7 @@ func NewTowerHost() *models.Host { LocalID: &localID, Name: &id, Status: models.NewHostStatus(models.HostStatusCONNECTEDHEALTHY), - AllocatableMemoryBytes: pointer.Int64(MemoryMiB * 1024 * 1024), + AllocatableMemoryBytes: ptr.To[int64](7 * 1024 * 1024 * 1024), } } @@ -68,10 +68,10 @@ func NewTowerVM() *models.VM { LocalID: &localID, Name: &id, Status: &status, - EntityAsyncStatus: (*models.EntityAsyncStatus)(pointer.String("CREATING")), + EntityAsyncStatus: (*models.EntityAsyncStatus)(ptr.To("CREATING")), CPU: &models.NestedCPU{ - Cores: pointer.Int32(NumCPUs), - Sockets: pointer.Int32(NumCPUs / NumCoresPerSocket), + Cores: ptr.To[int32](NumCPUs), + Sockets: ptr.To[int32](NumCPUs / NumCoresPerSocket), }, Memory: service.TowerMemory(MemoryMiB), } @@ -140,7 +140,7 @@ func NewVMPlacementGroup(vmIDs []string) *models.VMPlacementGroup { id := ID() localID := UUID() vms := make([]*models.NestedVM, 0, len(vmIDs)) - for i := 0; i < len(vmIDs); i++ { + for i := range len(vmIDs) { vms = append(vms, &models.NestedVM{ID: &vmIDs[i]}) } @@ -161,33 +161,33 @@ func NewWithTaskVMPlacementGroup(placementGroup *models.VMPlacementGroup, task * func NewTowerGPUVMInfo() *models.GpuVMInfo { return &models.GpuVMInfo{ - ID: pointer.String(ID()), - LocalID: pointer.String(UUID()), - Name: pointer.String(ID()), - Model: pointer.String("A16"), + ID: ptr.To(ID()), + LocalID: ptr.To(UUID()), + Name: ptr.To(ID()), + Model: ptr.To("A16"), UserUsage: models.NewGpuDeviceUsage(models.GpuDeviceUsagePASSTHROUGH), - UserVgpuTypeName: pointer.String(""), + UserVgpuTypeName: ptr.To(""), } } func NewTowerVGPUVMInfo(vGPUCount int32) *models.GpuVMInfo { return &models.GpuVMInfo{ - ID: pointer.String(ID()), - LocalID: pointer.String(UUID()), - Name: pointer.String(ID()), - UserVgpuTypeName: pointer.String("V100"), + ID: ptr.To(ID()), + LocalID: ptr.To(UUID()), + Name: ptr.To(ID()), + UserVgpuTypeName: ptr.To("V100"), UserUsage: models.NewGpuDeviceUsage(models.GpuDeviceUsageVGPU), - VgpuInstanceNum: pointer.Int32(vGPUCount), - AvailableVgpusNum: pointer.Int32(vGPUCount), - AssignedVgpusNum: pointer.Int32(0), - Model: pointer.String(""), + VgpuInstanceNum: ptr.To[int32](vGPUCount), + AvailableVgpusNum: ptr.To[int32](vGPUCount), + AssignedVgpusNum: ptr.To[int32](0), + Model: ptr.To(""), } } func NewVMVolume(elfMachine *infrav1.ElfMachine) *models.VMVolume { return &models.VMVolume{ - ID: pointer.String(ID()), - Name: pointer.String(ID()), + ID: ptr.To(ID()), + Name: ptr.To(ID()), Size: service.TowerDisk(elfMachine.Spec.DiskGiB), } } @@ -201,8 +201,8 @@ func NewWithTaskVMVolume(vmVolume *models.VMVolume, task *models.Task) *models.W func NewVMDisk(vmVolume *models.VMVolume) *models.VMDisk { return &models.VMDisk{ - ID: pointer.String(ID()), - Boot: pointer.Int32(0), + ID: ptr.To(ID()), + Boot: ptr.To[int32](0), VMVolume: &models.NestedVMVolume{ID: vmVolume.ID}, } } diff --git a/test/fake/types.go b/test/fake/types.go index c087c6b9..9e08c32b 100644 --- a/test/fake/types.go +++ b/test/fake/types.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/storage/names" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" "sigs.k8s.io/cluster-api/util/patch" @@ -101,7 +101,7 @@ func NewMachineObjects(elfCluster *infrav1.ElfCluster, cluster *clusterv1.Cluste }, Spec: clusterv1.MachineSpec{ ClusterName: cluster.Name, - Version: pointer.String("1.26.0"), + Version: ptr.To("1.26.0"), InfrastructureRef: corev1.ObjectReference{ APIVersion: infrav1.GroupVersion.String(), Kind: ElfMachineKind, @@ -180,7 +180,7 @@ func NewMD() *clusterv1.MachineDeployment { Name: names.SimpleNameGenerator.GenerateName("md-"), Namespace: Namespace, }, - Spec: clusterv1.MachineDeploymentSpec{Replicas: pointer.Int32(1)}, + Spec: clusterv1.MachineDeploymentSpec{Replicas: ptr.To[int32](1)}, Status: clusterv1.MachineDeploymentStatus{}, } } diff --git a/test/helpers/envtest.go b/test/helpers/envtest.go index aecb1c81..fae5d3fc 100644 --- a/test/helpers/envtest.go +++ b/test/helpers/envtest.go @@ -19,7 +19,6 @@ package helpers import ( goctx "context" "fmt" - "go/build" "os" "path" "path/filepath" @@ -28,6 +27,7 @@ import ( "time" "github.com/onsi/ginkgo/v2" + "golang.org/x/tools/go/packages" admissionv1 "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -95,8 +95,8 @@ func init() { } // append CAPI CRDs path - if capiPath := getFilePathToCAPICRDs(root); capiPath != "" { - crdPaths = append(crdPaths, capiPath) + if capiPaths := getFilePathToCAPICRDs(); capiPaths != nil { + crdPaths = append(crdPaths, capiPaths...) } crdPaths = append(crdPaths, filepath.Join(root, "test", "config", "host-agent")) @@ -186,7 +186,7 @@ func NewTestEnvironment(ctx goctx.Context) *TestEnvironment { klog.Fatalf("failed to create the CAPE controller manager: %v", err) } - kubeconfig, err := CreateKubeconfig(mgr.GetConfig(), fmt.Sprintf("%s-cluster", capiutil.RandomString(6))) + kubeconfig, err := CreateKubeconfig(mgr.GetConfig(), capiutil.RandomString(6)+"-cluster") if err != nil { klog.Fatalf("failed to create kubeconfig: %v", err) } @@ -334,26 +334,21 @@ func CreateKubeconfig(cfg *rest.Config, clusterName string) (string, error) { return kubeconfig, nil } -func getFilePathToCAPICRDs(root string) string { - mod, err := NewMod(filepath.Join(root, "go.mod")) - if err != nil { - return "" +func getFilePathToCAPICRDs() []string { + packageName := "sigs.k8s.io/cluster-api" + packageConfig := &packages.Config{ + Mode: packages.NeedModule, } - packageName := "sigs.k8s.io/cluster-api" - clusterAPIVersion, err := mod.FindDependencyVersion(packageName) + pkgs, err := packages.Load(packageConfig, packageName) if err != nil { - return "" + return nil } - gopath := envOr("GOPATH", build.Default.GOPATH) - return filepath.Join(gopath, "pkg", "mod", "sigs.k8s.io", fmt.Sprintf("cluster-api@%s", clusterAPIVersion), "config", "crd", "bases") -} + pkg := pkgs[0] -func envOr(envKey, defaultValue string) string { - if value, ok := os.LookupEnv(envKey); ok { - return value + return []string{ + filepath.Join(pkg.Module.Dir, "config", "crd", "bases"), + filepath.Join(pkg.Module.Dir, "controlplane", "kubeadm", "config", "crd", "bases"), } - - return defaultValue } diff --git a/test/helpers/mod.go b/test/helpers/mod.go index 619b5527..2664727f 100644 --- a/test/helpers/mod.go +++ b/test/helpers/mod.go @@ -24,11 +24,13 @@ import ( "golang.org/x/mod/modfile" ) +// Mod wraps a go.mod file. type Mod struct { path string content []byte } +// NewMod created a new Mod reading a go.mod file. func NewMod(path string) (Mod, error) { var mod Mod content, err := os.ReadFile(filepath.Clean(path)) @@ -41,6 +43,7 @@ func NewMod(path string) (Mod, error) { }, nil } +// FindDependencyVersion return the version of a go.mod dependency. func (m Mod) FindDependencyVersion(dependency string) (string, error) { f, err := modfile.Parse(m.path, m.content, nil) if err != nil { diff --git a/test/helpers/mod_test.go b/test/helpers/mod_test.go index 9e83e67a..781b2a15 100644 --- a/test/helpers/mod_test.go +++ b/test/helpers/mod_test.go @@ -24,7 +24,7 @@ import ( func TestMod_FindDependencyVersion(t *testing.T) { goModData := `module sigs.k8s.io/dummy-project -go 1.21 +go 1.22 require ( github.com/foo/bar v1.0.0 @@ -32,7 +32,7 @@ require ( ) replace ( - github.com/foo/bar v1.0.0 => github.com/foo/bar v1.0.1 + github.com/foo/bar v1.0.0 => github.com/foo/bar v1.0.1 ) ` tempPath, err := createTempGoMod(goModData) @@ -90,12 +90,7 @@ func createTempGoMod(data string) (string, error) { if _, err := f.WriteString(data); err != nil { return "", err } + defer f.Close() - name := f.Name() - - if err := f.Close(); err != nil { - return "", err - } - - return name, nil + return f.Name(), nil } diff --git a/webhooks/elfmachine_webhook_validation_test.go b/webhooks/elfmachine_webhook_validation_test.go index 9ffa3217..2f519e28 100644 --- a/webhooks/elfmachine_webhook_validation_test.go +++ b/webhooks/elfmachine_webhook_validation_test.go @@ -114,7 +114,7 @@ func expectElfMachineTestCase(g Gomega, tc elfMachineTestCase, err error) { g.Expect(statusErr.ErrStatus.Details.Kind).To(Equal(tc.EM.GroupVersionKind().Kind)) g.Expect(statusErr.ErrStatus.Details.Name).To(Equal(tc.EM.Name)) causes := make([]metav1.StatusCause, 0, len(tc.Errs)) - for i := 0; i < len(tc.Errs); i++ { + for i := range len(tc.Errs) { causes = append(causes, metav1.StatusCause{ Type: metav1.CauseType(tc.Errs[i].Type), Message: tc.Errs[i].ErrorBody(), diff --git a/webhooks/elfmachinetemplate_webhook_mutation.go b/webhooks/elfmachinetemplate_webhook_mutation.go index bf1cb0e8..51c04c34 100644 --- a/webhooks/elfmachinetemplate_webhook_mutation.go +++ b/webhooks/elfmachinetemplate_webhook_mutation.go @@ -22,7 +22,7 @@ import ( "net/http" "github.com/go-logr/logr" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -64,10 +64,10 @@ func (m *ElfMachineTemplateMutation) Handle(ctx goctx.Context, request admission } devices := elfMachineTemplate.Spec.Template.Spec.Network.Devices - for i := 0; i < len(devices); i++ { - for j := 0; j < len(devices[i].AddressesFromPools); j++ { + for i := range len(devices) { + for j := range len(devices[i].AddressesFromPools) { if devices[i].AddressesFromPools[j].APIGroup == nil || *devices[i].AddressesFromPools[j].APIGroup == "" { - devices[i].AddressesFromPools[j].APIGroup = pointer.String(defaultIPPoolAPIGroup) + devices[i].AddressesFromPools[j].APIGroup = ptr.To(defaultIPPoolAPIGroup) } if devices[i].AddressesFromPools[j].Kind == "" { devices[i].AddressesFromPools[j].Kind = defaultIPPoolKind diff --git a/webhooks/elfmachinetemplate_webhook_mutation_test.go b/webhooks/elfmachinetemplate_webhook_mutation_test.go index 64531f14..9cbb8398 100644 --- a/webhooks/elfmachinetemplate_webhook_mutation_test.go +++ b/webhooks/elfmachinetemplate_webhook_mutation_test.go @@ -26,7 +26,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" infrav1 "github.com/smartxworks/cluster-api-provider-elf/api/v1beta1" @@ -48,9 +48,9 @@ func TestElfMachineMutationTemplate(t *testing.T) { } elfMachineTemplate.Spec.Template.Spec.Network.Devices = []infrav1.NetworkDeviceSpec{ {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test"}}}, - {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: pointer.String("")}}}, - {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: pointer.String("apiGroup")}}}, - {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: pointer.String("apiGroup"), Kind: "kind"}}}, + {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: ptr.To("")}}}, + {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: ptr.To("apiGroup")}}}, + {AddressesFromPools: []corev1.TypedLocalObjectReference{{Name: "test", APIGroup: ptr.To("apiGroup"), Kind: "kind"}}}, } raw, err := marshal(elfMachineTemplate) g.Expect(err).NotTo(HaveOccurred()) diff --git a/webhooks/elfmachinetemplate_webhook_validation_test.go b/webhooks/elfmachinetemplate_webhook_validation_test.go index 1ae4eb99..69be42e1 100644 --- a/webhooks/elfmachinetemplate_webhook_validation_test.go +++ b/webhooks/elfmachinetemplate_webhook_validation_test.go @@ -122,7 +122,7 @@ func expectTestCase(g Gomega, tc testCaseEMT, err error) { g.Expect(statusErr.ErrStatus.Details.Kind).To(Equal(tc.EMT.GroupVersionKind().Kind)) g.Expect(statusErr.ErrStatus.Details.Name).To(Equal(tc.EMT.Name)) causes := make([]metav1.StatusCause, 0, len(tc.Errs)) - for i := 0; i < len(tc.Errs); i++ { + for i := range len(tc.Errs) { causes = append(causes, metav1.StatusCause{ Type: metav1.CauseType(tc.Errs[i].Type), Message: tc.Errs[i].ErrorBody(),