Skip to content

Commit

Permalink
Update component versions for CAPI, Kind, and other dependencies (#383)
Browse files Browse the repository at this point in the history
* Update component versions for CAPI, Kind, and other dependencies

Also fix and update go, clusterctl, kind, ko, and other tooling
dependencies' version in devbox.

* Use nolintlint for enforcing nolint comments

* Address review comments

- Move from k8s.io/utils/pointer to k8s.io/utils/ptr as pointer will
  be deprecated in the coming release.

* Update kubernetes dependencies to v0.29.2

* Add some unit tests to get above coverage requirements

* Modify e2e config to run tests with CAPI Controllers from v1.6.2
  • Loading branch information
thunderboltsid authored Mar 12, 2024
1 parent 55e8e38 commit 0825847
Show file tree
Hide file tree
Showing 47 changed files with 1,984 additions and 954 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
args: --enable gofmt --enable gofumpt --timeout 5m --build-tags e2e

- name: Lint
run: devbox run -- make lint-yaml
Expand Down
20 changes: 20 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
linters:
enable:
- errcheck
- gofmt
- gofumpt
- gosimple
- govet
- ineffassign
- nolintlint
- staticcheck
- unused
linters-settings:
nolintlint:
require-explanation: true
require-specific: true
run:
build-tags:
- e2e
concurrency: 4
timeout: 5m
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PLATFORMS_E2E ?= linux/amd64
KIND_CLUSTER_NAME ?= capi-test

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
ENVTEST_K8S_VERSION = 1.29

#
# Directories.
Expand Down Expand Up @@ -174,7 +174,7 @@ kind-delete: ## Delete the kind cluster
##@ Build

.PHONY: build
build: generate fmt ## Build manager binary.
build: mocks generate fmt ## Build manager binary.
echo "Git commit hash: ${GIT_COMMIT_HASH}"
go build -ldflags "-X main.gitCommitHash=${GIT_COMMIT_HASH}" -o bin/manager main.go

Expand Down Expand Up @@ -299,16 +299,26 @@ prepare-local-clusterctl: manifests cluster-templates ## Prepare overide file f
env LOCAL_PROVIDER_VERSION=$(LOCAL_PROVIDER_VERSION) \
envsubst -no-unset -no-empty -no-digit < ./clusterctl.yaml > ~/.cluster-api/clusterctl.yaml

.PHONY: mocks
mocks: ## Generate mocks for the project
mockgen -destination=mocks/ctlclient/client_mock.go -package=mockctlclient sigs.k8s.io/controller-runtime/pkg/client Client
mockgen -destination=mocks/ctlclient/manager_mock.go -package=mockctlclient sigs.k8s.io/controller-runtime/pkg/manager Manager
mockgen -destination=mocks/ctlclient/cache_mock.go -package=mockctlclient sigs.k8s.io/controller-runtime/pkg/cache Cache
mockgen -destination=mocks/k8sclient/cm_informer.go -package=mockk8sclient k8s.io/client-go/informers/core/v1 ConfigMapInformer
mockgen -destination=mocks/k8sclient/secret_informer.go -package=mockk8sclient k8s.io/client-go/informers/core/v1 SecretInformer

GOTESTPKGS = $(shell go list ./... | grep -v /mocks)

.PHONY: unit-test
unit-test: ## Run unit tests.
unit-test: mocks ## Run unit tests.
ifeq ($(EXPORT_RESULT), true)
$(eval OUTPUT_OPTIONS = | go-junit-report -set-exit-code > junit-report.xml)
endif
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --arch=amd64 -p path)" $(GOTEST) ./... $(OUTPUT_OPTIONS)
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --arch=amd64 -p path)" $(GOTEST) $(GOTESTPKGS) $(OUTPUT_OPTIONS)

.PHONY: coverage
coverage: ## Run the tests of the project and export the coverage
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --arch=amd64 -p path)" $(GOTEST) -cover -covermode=count -coverprofile=profile.cov ./...
coverage: mocks ## Run the tests of the project and export the coverage
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --arch=amd64 -p path)" $(GOTEST) -cover -covermode=count -coverprofile=profile.cov $(GOTESTPKGS)
$(GOTOOL) cover -func profile.cov
ifeq ($(EXPORT_RESULT), true)
gocov convert profile.cov | gocov-xml > coverage.xml
Expand Down Expand Up @@ -399,11 +409,9 @@ test-e2e-clusterctl-upgrade: docker-build-e2e cluster-e2e-templates cluster-temp

##@ Lint and Verify

GOLANGCI_LINT_EXTRA_ARGS := --enable gofmt --enable gofumpt --build-tags e2e

.PHONY: lint
lint: ## Lint the codebase
golangci-lint run -v $(GOLANGCI_LINT_EXTRA_ARGS)
golangci-lint run -v

lint-yaml: ## Use yamllint on the yaml file of your projects
ifeq ($(EXPORT_RESULT), true)
Expand Down
24 changes: 10 additions & 14 deletions api/v1alpha4/nutanixcluster_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,76 +19,72 @@ package v1alpha4
import (
infrav1beta1 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
apiconversion "k8s.io/apimachinery/pkg/conversion"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
capiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4"
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// ConvertTo converts this NutanixCluster to the Hub version (v1beta1).
func (src *NutanixCluster) ConvertTo(dstRaw conversion.Hub) error { // nolint
func (src *NutanixCluster) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixCluster)
return Convert_v1alpha4_NutanixCluster_To_v1beta1_NutanixCluster(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this NutanixCluster.
func (dst *NutanixCluster) ConvertFrom(srcRaw conversion.Hub) error { //nolint
func (dst *NutanixCluster) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixCluster)
return Convert_v1beta1_NutanixCluster_To_v1alpha4_NutanixCluster(src, dst, nil)
}

// ConvertTo converts this NutanixClusterList to the Hub version (v1beta1).
func (src *NutanixClusterList) ConvertTo(dstRaw conversion.Hub) error { //nolint
func (src *NutanixClusterList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixClusterList)
return Convert_v1alpha4_NutanixClusterList_To_v1beta1_NutanixClusterList(src, dst, nil)
}

// ConvertFrom converts from the Hub version(v1beta1) to this NutanixClusterList.
func (dst *NutanixClusterList) ConvertFrom(srcRaw conversion.Hub) error { //nolint
func (dst *NutanixClusterList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixClusterList)
return Convert_v1beta1_NutanixClusterList_To_v1alpha4_NutanixClusterList(src, dst, nil)
}

// Convert_v1alpha4_NutanixClusterSpec_To_v1beta1_NutanixClusterSpec converts NutanixClusterSpec in NutanixClusterResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_NutanixClusterSpec_To_v1beta1_NutanixClusterSpec(in *NutanixClusterSpec, out *infrav1beta1.NutanixClusterSpec, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1alpha4_NutanixClusterSpec_To_v1beta1_NutanixClusterSpec(in, out, s)
}

// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint converts APIEndpoint in NutanixClusterResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *capiv1alpha4.APIEndpoint, out *capiv1beta1.APIEndpoint, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s)
}

// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint converts APIEndpoint in NutanixClusterResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *capiv1beta1.APIEndpoint, out *capiv1alpha4.APIEndpoint, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s)
}

// Convert_v1beta1_NutanixClusterSpec_To_v1alpha4_NutanixClusterSpec converts NutanixClusterSpec in NutanixClusterResource from v1beta1 to v1alpha4 version.
//
//nolint:all
func Convert_v1beta1_NutanixClusterSpec_To_v1alpha4_NutanixClusterSpec(in *infrav1beta1.NutanixClusterSpec, out *NutanixClusterSpec, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1beta1_NutanixClusterSpec_To_v1alpha4_NutanixClusterSpec(in, out, s)
}

// Convert_v1alpha4_NutanixClusterStatus_To_v1beta1_NutanixClusterStatus converts NutanixClusterStatus in NutanixClusterResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_NutanixClusterStatus_To_v1beta1_NutanixClusterStatus(in *NutanixClusterStatus, out *infrav1beta1.NutanixClusterStatus, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1alpha4_NutanixClusterStatus_To_v1beta1_NutanixClusterStatus(in, out, s)
}
1 change: 1 addition & 0 deletions api/v1alpha4/nutanixcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package v1alpha4
import (
credentialTypes "github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
capiv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
"sigs.k8s.io/cluster-api/errors"
)
Expand Down
17 changes: 7 additions & 10 deletions api/v1alpha4/nutanixmachine_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,49 @@ import (
)

// ConvertTo converts this NutanixMachine to the Hub version (v1beta1).
func (src *NutanixMachine) ConvertTo(dstRaw conversion.Hub) error { // nolint
func (src *NutanixMachine) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixMachine)
return Convert_v1alpha4_NutanixMachine_To_v1beta1_NutanixMachine(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this NutanixMachine.
func (dst *NutanixMachine) ConvertFrom(srcRaw conversion.Hub) error { // nolint
func (dst *NutanixMachine) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixMachine)
return Convert_v1beta1_NutanixMachine_To_v1alpha4_NutanixMachine(src, dst, nil)
}

// ConvertTo converts this NutanixMachineList to the Hub version (v1beta1).
func (src *NutanixMachineList) ConvertTo(dstRaw conversion.Hub) error { // nolint
func (src *NutanixMachineList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixMachineList)
return Convert_v1alpha4_NutanixMachineList_To_v1beta1_NutanixMachineList(src, dst, nil)
}

// ConvertFrom converts from the Hub version(v1beta1) to this NutanixMachineList.
func (dst *NutanixMachineList) ConvertFrom(srcRaw conversion.Hub) error { // nolint
func (dst *NutanixMachineList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixMachineList)
return Convert_v1beta1_NutanixMachineList_To_v1alpha4_NutanixMachineList(src, dst, nil)
}

// Convert_v1alpha4_NutanixMachineSpec_To_v1beta1_NutanixMachineSpec converts NutanixMachineSpec in NutanixMachineResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_NutanixMachineSpec_To_v1beta1_NutanixMachineSpec(in *NutanixMachineSpec, out *infrav1beta1.NutanixMachineSpec, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1alpha4_NutanixMachineSpec_To_v1beta1_NutanixMachineSpec(in, out, s)
}

// Convert_v1beta1_NutanixMachineSpec_To_v1alpha4_NutanixMachineSpec converts NutanixMachineSpec in NutanixMachineResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1beta1_NutanixMachineSpec_To_v1alpha4_NutanixMachineSpec(in *infrav1beta1.NutanixMachineSpec, out *NutanixMachineSpec, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1beta1_NutanixMachineSpec_To_v1alpha4_NutanixMachineSpec(in, out, s)
}

// Convert_v1alpha4_NutanixMachineStatus_To_v1beta1_NutanixMachineStatus converts NutanixMachineStatus in NutanixMachineResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_NutanixMachineStatus_To_v1beta1_NutanixMachineStatus(in *NutanixMachineStatus, out *infrav1beta1.NutanixMachineStatus, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recursive call
return Convert_v1alpha4_NutanixMachineStatus_To_v1beta1_NutanixMachineStatus(in, out, s)
}
1 change: 1 addition & 0 deletions api/v1alpha4/nutanixmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
capiv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
"sigs.k8s.io/cluster-api/errors"
)
Expand Down
19 changes: 7 additions & 12 deletions api/v1alpha4/nutanixmachinetemplate_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ package v1alpha4
import (
infrav1beta1 "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1"
apiconversion "k8s.io/apimachinery/pkg/conversion"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
capiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4"
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// ConvertTo converts this NutanixMachineTemplate to the Hub version (v1beta1).
func (src *NutanixMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { // nolint
func (src *NutanixMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixMachineTemplate)
return Convert_v1alpha4_NutanixMachineTemplate_To_v1beta1_NutanixMachineTemplate(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this NutanixMachineTemplate.
func (dst *NutanixMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { // nolint
func (dst *NutanixMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixMachineTemplate)
if err := Convert_v1beta1_NutanixMachineTemplate_To_v1alpha4_NutanixMachineTemplate(src, dst, nil); err != nil {
return err
Expand All @@ -47,49 +48,43 @@ func (dst *NutanixMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { //
}

// ConvertTo converts this NutanixMachineTemplateList to the Hub version (v1beta1).
func (src *NutanixMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { // nolint
func (src *NutanixMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1beta1.NutanixMachineTemplateList)
return Convert_v1alpha4_NutanixMachineTemplateList_To_v1beta1_NutanixMachineTemplateList(src, dst, nil)
}

// ConvertFrom converts from the Hub version(v1beta1) to this NutanixMachineTemplateList.
func (dst *NutanixMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { // nolint
func (dst *NutanixMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1beta1.NutanixMachineTemplateList)
return Convert_v1beta1_NutanixMachineTemplateList_To_v1alpha4_NutanixMachineTemplateList(src, dst, nil)
}

// Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta converts ObjectMeta in NutanixMachineTemplateResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in *capiv1alpha4.ObjectMeta, out *capiv1beta1.ObjectMeta, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
return capiv1alpha4.Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in, out, s)
}

// Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta converts ObjectMeta in NutanixMachineTemplateResource from v1beta1 to v1alpha4 version.
//
//nolint:all
func Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in *capiv1beta1.ObjectMeta, out *capiv1alpha4.ObjectMeta, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
return capiv1alpha4.Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in, out, s)
}

// Convert_v1alpha4_NutanixMachineTemplateResource_To_v1beta1_NutanixMachineTemplateResource converts NutanixMachineTemplateResource in NutanixMachineTemplateResource from v1alpha4 to v1beta1 version.
//
//nolint:all
func Convert_v1alpha4_NutanixMachineTemplateResource_To_v1beta1_NutanixMachineTemplateResource(in *NutanixMachineTemplateResource, out *infrav1beta1.NutanixMachineTemplateResource, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recusive call
return Convert_v1alpha4_NutanixMachineTemplateResource_To_v1beta1_NutanixMachineTemplateResource(in, out, s)
}

// Convert_v1beta1_NutanixMachineTemplateResource_To_v1alpha4_NutanixMachineTemplateResource converts NutanixMachineTemplateResource in NutanixMachineTemplateResource from v1beta1 to v1alpha4 version.
//
//nolint:all
func Convert_v1beta1_NutanixMachineTemplateResource_To_v1alpha4_NutanixMachineTemplateResource(in *infrav1beta1.NutanixMachineTemplateResource, out *NutanixMachineTemplateResource, s apiconversion.Scope) error {
// Wrapping the conversion function to avoid compilation errors due to compileErrorOnMissingConversion()
// Ref: https://github.com/kubernetes/kubernetes/issues/98380
//nolint:staticcheck // infinite recusive call
return Convert_v1beta1_NutanixMachineTemplateResource_To_v1alpha4_NutanixMachineTemplateResource(in, out, s)
}
1 change: 1 addition & 0 deletions api/v1alpha4/nutanixmachinetemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha4

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
capiv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
)

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha4/v1alpha4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/nutanix-cloud-native/prism-go-client/environment/credentials"

"github.com/nutanix-cloud-native/prism-go-client/utils"
"github.com/stretchr/testify/assert"
//nolint:staticcheck // sigs.k8s.io/cluster-api/api/v1alpha4 is deprecated and will be removed in one of the next releases.
"sigs.k8s.io/cluster-api/api/v1alpha4"
)

Expand Down
1 change: 0 additions & 1 deletion api/v1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1beta1/nutanixcluster_validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestNutanixClusterOpenAPIValidationPCAddress(t *testing.T) {
)
g.Expect(err).NotTo(HaveOccurred())

validator, _, err := validation.NewSchemaValidator(unversionedCRValidation)
validator, _, err := validation.NewSchemaValidator(unversionedCRValidation.OpenAPIV3Schema)
g.Expect(err).NotTo(HaveOccurred())

if tc.wantErr {
Expand Down
1 change: 0 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.13.0
name: nutanixclusters.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,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.13.0
name: nutanixclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down
Loading

0 comments on commit 0825847

Please sign in to comment.