Skip to content
Open
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
396 changes: 198 additions & 198 deletions .golangci.yml

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include $(REPO_ROOT)/common.mk
#
# Kubebuilder.
#
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.34.1
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.35.0
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT ?= 60s
export KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT ?=

Expand All @@ -39,27 +39,27 @@ get_go_version = $(shell go list -m $1 | awk '{print $$2}')
LDFLAGS := $(shell source ./hack/version.sh; version::ldflags)

# Binaries
KUSTOMIZE_VER := v5.6.0
KUSTOMIZE_VER := v5.7.1
KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5

SETUP_ENVTEST_VER := release-0.21
SETUP_ENVTEST_VER := release-0.22
SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest

CONTROLLER_GEN_VER := v0.18.0
CONTROLLER_GEN_VER := v0.19.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen

GOTESTSUM_VER := v1.11.0
GOTESTSUM_VER := v1.12.3
GOTESTSUM_BIN := gotestsum
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER))
GOTESTSUM_PKG := gotest.tools/gotestsum

CONVERSION_GEN_VER := v0.34.1
CONVERSION_GEN_VER := v0.34.0
CONVERSION_GEN_BIN := conversion-gen
# We are intentionally using the binary without version suffix, to avoid the version
# in generated files.
Expand All @@ -82,9 +82,9 @@ GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINGKO_VER))
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo

GOLANGCI_LINT_BIN := golangci-lint
GOLANGCI_LINT_VER := v1.64.8
GOLANGCI_LINT_VER := v2.7.2
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER))
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/v2/cmd/golangci-lint

MOCKGEN_BIN := mockgen
MOCKGEN_VER := v0.6.0
Expand Down Expand Up @@ -288,7 +288,7 @@ delete-kind-cluster:
kind delete cluster --name $(KIND_CLUSTER_NAME)

cluster-api: ## Clone cluster-api repository for tilt use.
git clone --branch v1.11.3 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
git clone --branch v1.12.1 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git

cluster-api/tilt-settings.json: hack/tilt-settings.json cluster-api
cp ./hack/tilt-settings.json cluster-api
Expand Down
8 changes: 6 additions & 2 deletions api/v1beta3/cloudstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,16 @@ type CloudStackMachineStatus struct {

// Status indicates the status of the provider resource.
//+optional
// Deprecated: This field has no function and is going to be removed in the next release.
// Deprecated:
//
// This field has no function and is going to be removed in the next release.
Status *string `json:"status,omitempty"`

// Reason indicates the reason of status failure.
//+optional
// Deprecated: This field has no function and is going to be removed in the next release.
// Deprecated:
//
// This field has no function and is going to be removed in the next release.
Reason *string `json:"reason,omitempty"`

// FailureReason will be set in the event that there is a terminal problem
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta3/cloudstackmachinetemplate_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (r *CloudStackMachineTemplateWebhook) ValidateCreate(_ context.Context, obj
spec := obj.Spec.Template.Spec

affinity := strings.ToLower(spec.Affinity)
if !(affinity == "" || affinity == "no" || affinity == "pro" || affinity == "anti" || affinity == "soft-pro" || affinity == "soft-anti") {
if affinity != "" && affinity != "no" && affinity != "pro" && affinity != "anti" && affinity != "soft-pro" && affinity != "soft-anti" {
errorList = append(errorList, field.Invalid(field.NewPath("spec", "Affinity"), spec.Affinity,
`Affinity must be "no", "pro", "anti", "soft-pro", "soft-anti", or unspecified.`))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackaffinitygroups.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -63,9 +63,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
domain:
description: CloudStack domain.
Expand Down Expand Up @@ -240,9 +237,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
failureDomains:
items:
Expand Down Expand Up @@ -426,9 +420,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
failureDomains:
description: FailureDomains is a list of failure domains for the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -127,9 +127,6 @@ spec:
is serving.
format: int32
type: integer
required:
- host
- port
type: object
failureDomains:
description: FailureDomains is a list of failure domains for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackfailuredomains.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackisolatednetworks.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -55,9 +55,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
id:
description: ID.
Expand Down Expand Up @@ -132,9 +129,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
failureDomainName:
description: FailureDomainName -- the FailureDomain the network is
Expand Down Expand Up @@ -212,9 +206,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
domain:
description: Domain is the DNS domain name used for all instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackmachines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -849,12 +849,16 @@ spec:
reason:
description: |-
Reason indicates the reason of status failure.
Deprecated: This field has no function and is going to be removed in the next release.
Deprecated:

This field has no function and is going to be removed in the next release.
type: string
status:
description: |-
Status indicates the status of the provider resource.
Deprecated: This field has no function and is going to be removed in the next release.
Deprecated:

This field has no function and is going to be removed in the next release.
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackmachinestatecheckers.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackmachinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: cloudstackzones.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Loading