Skip to content

Commit

Permalink
License format and package version updates
Browse files Browse the repository at this point in the history
1. Update the license format in auto-generated deepcopy file and refine
   related logic as others. Let it to be updated by `make codegen`
2. Update controller-runtime version to v0.12.1
3. Update controller-gen version to v0.9.0

Signed-off-by: Lan Luo <luola@vmware.com>
  • Loading branch information
luolanzone committed Jun 22, 2022
1 parent c6fae02 commit 33d3e33
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 274 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
github.com/miekg/dns v1.1.43
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/onsi/gomega v1.18.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.1
github.com/prometheus/common v0.32.1
Expand Down Expand Up @@ -74,7 +74,7 @@ require (
k8s.io/kubectl v0.24.0
k8s.io/kubelet v0.24.0
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/controller-runtime v0.11.2
sigs.k8s.io/controller-runtime v0.12.1
sigs.k8s.io/mcs-api v0.1.0
)

Expand Down
35 changes: 7 additions & 28 deletions go.sum

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions multicluster/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
# For controller-gen, float value is not allowed by default as it is considered dangerous
# See https://github.com/kubernetes-sigs/controller-tools/issues/245
# However the ResourceExport/Import refers to ACNP type definition and the priority field in ACNP spec is type float64.
# Hence, before any ACNP spec bumps that changes the priorty field to a different type,
# the allowDangerousTypes flag is needed for CRD manifests to generate correctly.
CRD_OPTIONS ?= "crd:trivialVersions=true,allowDangerousTypes=true,preserveUnknownFields=false"
CRD_OPTIONS ?= "crd:allowDangerousTypes=true"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand All @@ -25,6 +24,7 @@ SHELL = /usr/bin/env bash -o pipefail
GO_VERSION := $(shell head -n 1 ../build/images/deps/go-version)
DOCKER_BUILD_ARGS = --build-arg GO_VERSION=$(GO_VERSION)

YEAR :=$(shell date "+%Y")
.PHONY: all
all: build

Expand Down Expand Up @@ -53,7 +53,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
$(CURDIR)/hack/generate-manifest.sh -m > build/yamls/antrea-multicluster-member.yml

generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt",year=$(YEAR) paths="./..."

fmt: ## Run go fmt against code.
go fmt ./...
Expand Down Expand Up @@ -82,7 +82,7 @@ else
endif
##@ Build

build: generate fmt vet ## Build manager binary.
build: fmt vet ## Build manager binary.
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/antrea-mc-controller antrea.io/antrea/multicluster/cmd/...

run: manifests generate fmt vet ## Run a controller from your host.
Expand All @@ -92,7 +92,7 @@ run: manifests generate fmt vet ## Run a controller from your host.

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0)

codegen:
./hack/update-codegen.sh
Expand All @@ -106,7 +106,7 @@ TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
28 changes: 13 additions & 15 deletions multicluster/apis/multicluster/v1alpha1/zz_generated.deepcopy.go

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

116 changes: 43 additions & 73 deletions multicluster/build/yamls/antrea-multicluster-leader-global.yml

Large diffs are not rendered by default.

32 changes: 4 additions & 28 deletions multicluster/build/yamls/antrea-multicluster-member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app: antrea
Expand Down Expand Up @@ -42,18 +42,12 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app: antrea
Expand Down Expand Up @@ -136,18 +130,12 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app: antrea
Expand Down Expand Up @@ -311,18 +299,12 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app: antrea
Expand Down Expand Up @@ -365,12 +347,6 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: clusterclaims.multicluster.crd.antrea.io
spec:
Expand Down Expand Up @@ -42,9 +41,3 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: clusterinfoimports.multicluster.crd.antrea.io
spec:
Expand Down Expand Up @@ -85,9 +84,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: clustersets.multicluster.crd.antrea.io
spec:
Expand Down Expand Up @@ -166,9 +165,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: gateways.multicluster.crd.antrea.io
spec:
Expand Down Expand Up @@ -45,9 +44,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: memberclusterannounces.multicluster.crd.antrea.io
spec:
Expand Down Expand Up @@ -46,9 +45,3 @@ spec:
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit 33d3e33

Please sign in to comment.