Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
run:
deadline: 3m
issues:
skip-dirs:
- mock*
skip-files:
- "zz_generated.*\\.go$"
- ".*conversion.*\\.go$"
linters:
enable:
- golint
- govet
- gofmt
- structcheck
- varcheck
- interfacer
- unconvert
- ineffassign
- goconst
# - gocyclo
- maligned
- misspell
- nakedret
- prealloc
- gosec
- deadcode
disable-all: true
# Run with --fast=false for more extensive checks
fast: true
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ ENVSUBST_VER := v2.0.0-20210730161058-179042472c46
ENVSUBST_BIN := envsubst
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)-$(ENVSUBST_VER)

GOLANGCI_LINT_VER := v1.54.1
GOLANGCI_LINT_VER := v1.64.5
GOLANGCI_LINT_BIN := golangci-lint
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)

KUSTOMIZE_VER := v5.0.3
KUSTOMIZE_VER := v5.6.0
KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER)

Expand Down
3 changes: 2 additions & 1 deletion controllers/azurestackhciloadbalancer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ func (r *AzureStackHCILoadBalancerReconciler) reconcileLoadBalancerServiceStatus
loadBalancerScope.SetAddress(*((*lb.FrontendIPConfigurations)[0].IPAddress))
}

loadBalancerScope.SetReadyReplicas(int32(lb.ReplicationCount))
// Assume that overflow will not happen for G115
loadBalancerScope.SetReadyReplicas(int32(lb.ReplicationCount)) //nolint
return nil
}

Expand Down
3 changes: 2 additions & 1 deletion controllers/azurestackhciloadbalancer_virtualmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ func (r *AzureStackHCILoadBalancerReconciler) updateReplicaStatus(lbs *scope.Loa

// getMachineReplicaCounts calculates the replica counts for the AzureStackHCIVirtualMachines associated with the load balancer
func (r *AzureStackHCILoadBalancerReconciler) getMachineReplicaCounts(vmList []*infrav1.AzureStackHCIVirtualMachine) (replicas, failedReplicas int32) {
replicas = int32(len(vmList))
// Assume replicas will be under uniteger overflow for G115
replicas = int32(len(vmList)) //nolint
for _, vm := range vmList {
if vm.Status.VMState == nil {
continue
Expand Down