Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1203 from mengqiy/bumpCRCT
Browse files Browse the repository at this point in the history
✨ bump CR to v0.4.0 and CT to v0.2.4
  • Loading branch information
k8s-ci-robot authored Nov 19, 2019
2 parents 8ea5dba + b2376f6 commit 0824a13
Show file tree
Hide file tree
Showing 19 changed files with 507 additions and 209 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ bin/*
# skip testdata gopath non-src
/testdata/gopath/bin
/testdata/gopath/pkg

# skip testdata go.mod, since it may have
# different result depending on go version
/testdata/project-v2/go.sum
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ generate-vendor: ## (Deprecated) Update/generate the vendor by using the path $G
.PHONY: generate-setup
generate-setup: ## Current workarround to generate the testdata with the correct controller-gen version
- rm -rf $(CONTROLLER_GEN_BIN_PATH)
- GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected].2
- GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected].4

##@ Tests

Expand Down
4 changes: 1 addition & 3 deletions docs/book/install-and-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ ${cmd} /tmp/mdbook.${ext}
chmod +x /tmp/mdbook

echo "grabbing the latest released controller-gen"
# TODO(directxman12): remove the @v0.2.0-beta.4 once get v0.2.0 released,
# so that we actually get the latest version
go get sigs.k8s.io/controller-tools/cmd/[email protected]
go get sigs.k8s.io/controller-tools/cmd/[email protected]

# make sure we add the go bin directory to our path
gobin=$(go env GOBIN)
Expand Down
1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

- [CRD Generation](./reference/markers/crd.md)
- [CRD Validation](./reference/markers/crd-validation.md)
- [CRD Processing](./reference/markers/crd-processing.md)
- [Webhook](./reference/markers/webhook.md)
- [Object/DeepCopy](./reference/markers/object.md)
- [RBAC](./reference/markers/rbac.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/book/src/cronjob-tutorial/testdata/project/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.13
require (
github.com/go-logr/logr v0.1.0
github.com/robfig/cron v1.2.0
k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2
k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d
k8s.io/client-go v0.0.0-20190918200256-06eb1244587a
sigs.k8s.io/controller-runtime v0.3.0
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
sigs.k8s.io/controller-runtime v0.4.0
)
290 changes: 184 additions & 106 deletions docs/book/src/cronjob-tutorial/testdata/project/go.sum

Large diffs are not rendered by default.

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

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

20 changes: 6 additions & 14 deletions docs/book/src/multiversion-tutorial/testdata/project/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ module tutorial.kubebuilder.io/project
go 1.13

require (
github.com/gobuffalo/flect v0.1.5
github.com/golang/protobuf v1.3.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc // indirect
golang.org/x/sys v0.0.0-20190621203818-d432491b9138 // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v2 v2.2.2
github.com/go-logr/logr v0.1.0
github.com/robfig/cron v1.2.0
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
sigs.k8s.io/controller-runtime v0.4.0
)
327 changes: 272 additions & 55 deletions docs/book/src/multiversion-tutorial/testdata/project/go.sum

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions docs/book/src/reference/markers/crd-processing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CRD Processing

These markers help control how the Kubernetes API server processes API
requests involving your custom resources.

See [Generating CRDs](/reference/generating-crd.md) for examples.

{{#markerdocs CRD processing}}
2 changes: 1 addition & 1 deletion docs/book/utils/markerdocs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func main() {
if err := plugin.Run(MarkerDocs{
Args: map[string][]string{
// marker args
"": []string{"-wwww", "crd", "webhook", "rbac:roleName=cheddar" /* role name doesn't mean anything here */, "object"},
"": []string{"-wwww", "crd", "webhook", "rbac:roleName=cheddar" /* role name doesn't mean anything here */, "object", "schemapatch:manifests=."},
// cli options args
"CLI: ": []string{"-hhhh"},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/scaffold/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import (

const (
// controller runtime version to be used in the project
controllerRuntimeVersion = "v0.3.0"
controllerRuntimeVersion = "v0.4.0"
// ControllerTools version to be used in the project
controllerToolsVersion = "v0.2.2"
controllerToolsVersion = "v0.2.4"
)

type ProjectScaffolder interface {
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ go get sigs.k8s.io/[email protected]
kind create cluster --config test/kind-config.yaml --image=kindest/node:$K8S_VERSION

# setup the go modules required
go get sigs.k8s.io/controller-tools/cmd/[email protected].2
go get sigs.k8s.io/controller-tools/cmd/[email protected].4
go get sigs.k8s.io/kustomize/kustomize/[email protected]
2 changes: 1 addition & 1 deletion testdata/project-v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/[email protected].2 ;\
go get sigs.k8s.io/controller-tools/cmd/[email protected].4 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.2
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: admirals.crew.testproject.org
spec:
Expand All @@ -22,12 +22,12 @@ spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.2
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: captains.crew.testproject.org
spec:
Expand All @@ -14,20 +14,20 @@ spec:
listKind: CaptainList
plural: captains
singular: captain
scope: ""
scope: Namespaced
validation:
openAPIV3Schema:
description: Captain is the Schema for the captains API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.2
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: firstmates.crew.testproject.org
spec:
Expand All @@ -14,20 +14,20 @@ spec:
listKind: FirstMateList
plural: firstmates
singular: firstmate
scope: ""
scope: Namespaced
validation:
openAPIV3Schema:
description: FirstMate is the Schema for the firstmates API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand Down
12 changes: 6 additions & 6 deletions testdata/project-v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.13

require (
github.com/go-logr/logr v0.1.0
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.2
k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2
k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d
k8s.io/client-go v0.0.0-20190918200256-06eb1244587a
sigs.k8s.io/controller-runtime v0.3.0
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
sigs.k8s.io/controller-runtime v0.4.0
)

0 comments on commit 0824a13

Please sign in to comment.