Skip to content
Permalink
Browse files

bump CR to v0.4.0 and CT to v0.2.4

  • Loading branch information
mengqiy committed Nov 15, 2019
1 parent 8ea5dba commit b2376f6830aed5905ceca82afe9eb204b4ae0932
@@ -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
@@ -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/controller-gen@v0.2.2
- GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4

##@ Tests

@@ -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/controller-gen@v0.2.2
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4

# make sure we add the go bin directory to our path
gobin=$(go env GOBIN)
@@ -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)
@@ -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
)

Large diffs are not rendered by default.

@@ -16,7 +16,7 @@ limitations under the License.
*/
// +kubebuilder:gen-docs:collapse=Apache License

// autogenerated by controller-gen object, do not modify manually
// Code generated by controller-gen. DO NOT EDIT.

package v1

@@ -56,7 +56,7 @@ func (in *CronJob) DeepCopyObject() runtime.Object {
func (in *CronJobList) DeepCopyInto(out *CronJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]CronJob, len(*in))
@@ -16,7 +16,7 @@ limitations under the License.
*/
// +kubebuilder:gen-docs:collapse=Apache License

// autogenerated by controller-gen object, do not modify manually
// Code generated by controller-gen. DO NOT EDIT.

package v2

@@ -56,7 +56,7 @@ func (in *CronJob) DeepCopyObject() runtime.Object {
func (in *CronJobList) DeepCopyInto(out *CronJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]CronJob, len(*in))
@@ -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
)

Large diffs are not rendered by default.

@@ -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}}
@@ -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"},
},
@@ -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 {
@@ -25,5 +25,5 @@ go get sigs.k8s.io/kind@v0.5.1
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/controller-gen@v0.2.2
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4
go get sigs.k8s.io/kustomize/kustomize/v3@v3.2.1
@@ -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/controller-gen@v0.2.2 ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
@@ -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:
@@ -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
@@ -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:
@@ -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
@@ -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:
@@ -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
@@ -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 b2376f6

Please sign in to comment.
You can’t perform that action at this time.