Skip to content

Commit

Permalink
Merge pull request #794 from akutz/feature/mvs
Browse files Browse the repository at this point in the history
  • Loading branch information
akutz authored Nov 7, 2024
2 parents 8f4cc98 + 54f838d commit 5654a42
Show file tree
Hide file tree
Showing 23 changed files with 348 additions and 1,378 deletions.
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,27 +301,27 @@ fix: lint-go ## Tries to fix errors reported by lint-go-full target
## Generate
## --------------------------------------

reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
GO_MOD_FILES := $(call reverse,$(shell find . -name go.mod))
GO_MOD_OP := tidy

.PHONY: $(GO_MOD_FILES)
$(GO_MOD_FILES):
go -C $(@D) mod $(GO_MOD_OP)

.PHONY: modules
modules: $(GO_MOD_FILES)
modules: ## Validates the modules
go mod tidy
cd hack/tools && go mod tidy
cd api && go mod tidy
cd pkg/backup/api && go mod tidy
cd pkg/constants/testlabels && go mod tidy

.PHONY: modules-vendor
modules-vendor: GO_MOD_OP=vendor
modules-vendor: $(GO_MOD_FILES)
modules-vendor: ## Vendors the modules
go mod vendor
cd hack/tools && go mod vendor
cd api && go mod vendor
cd pkg/constants/testlabels && go mod vendor

.PHONY: modules-download
modules-download: GO_MOD_OP=download
modules-download: $(GO_MOD_FILES)
modules-download: ## Downloads and caches the modules
go mod download
cd hack/tools && go mod download
cd api && go mod download
cd pkg/constants/testlabels && go mod download

.PHONY: generate
generate: ## Generate code
Expand Down
4 changes: 3 additions & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/vmware-tanzu/vm-operator/api

go 1.23
go 1.22.0

toolchain go1.23.2

require (
github.com/google/go-cmp v0.6.0
Expand Down
23 changes: 2 additions & 21 deletions external/byok/go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
module github.com/vmware-tanzu/vm-operator/external/byok

go 1.22.5
go 1.13

require k8s.io/apimachinery v0.30.0

require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
require k8s.io/apimachinery v0.17.4
152 changes: 83 additions & 69 deletions external/byok/go.sum

Large diffs are not rendered by default.

23 changes: 2 additions & 21 deletions external/capabilities/go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
module github.com/vmware-tanzu/vm-operator/external/capabilities

go 1.22.7
go 1.13

require k8s.io/apimachinery v0.31.1

require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/text v0.16.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
require k8s.io/apimachinery v0.17.4
155 changes: 87 additions & 68 deletions external/capabilities/go.sum

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions external/storage-policy-quota/api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "cns.vmware.com", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// schemeBuilder is used to add go types to the GroupVersionKind scheme.
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
AddToScheme = schemeBuilder.AddToScheme

const (
StoragePolicyQuota_CRDPlural = "storagepolicyquotas"
StoragePolicyQuota_CRDSingular = "storagepolicyquota"
StorageQuota_CRDPlural = "storagequotas"
StorageQuota_CRDSingular = "storagequota"
StoragePolicyUsage_CRDPlural = "storagepolicyusages"
StoragePolicyUsage_CRDSingular = "storagepolicyusage"
objectTypes = []runtime.Object{}
)

func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(GroupVersion, objectTypes...)
metav1.AddToGroupVersion(scheme, GroupVersion)
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ type StoragePolicyQuotaList struct {
}

func init() {
SchemeBuilder.Register(&StoragePolicyQuota{}, &StoragePolicyQuotaList{})
objectTypes = append(objectTypes, &StoragePolicyQuota{}, &StoragePolicyQuotaList{})
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ type StoragePolicyUsageList struct {
}

func init() {
SchemeBuilder.Register(&StoragePolicyUsage{}, &StoragePolicyUsageList{})
objectTypes = append(objectTypes, &StoragePolicyUsage{}, &StoragePolicyUsageList{})
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ type StorageQuotaList struct {
}

func init() {
SchemeBuilder.Register(&StorageQuota{}, &StorageQuotaList{})
objectTypes = append(objectTypes, &StorageQuota{}, &StorageQuotaList{})
}

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

24 changes: 2 additions & 22 deletions external/storage-policy-quota/go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
module github.com/vmware-tanzu/vm-operator/external/storage-policy-quota

go 1.21.9
go 1.13

require (
k8s.io/apimachinery v0.29.1
sigs.k8s.io/controller-runtime v0.17.2
)

require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
require k8s.io/apimachinery v0.17.4
Loading

0 comments on commit 5654a42

Please sign in to comment.