Skip to content

Commit 8493612

Browse files
committed
Switch default project version to v2
This switches the default scaffolding to v2, since we want people to use this version.
1 parent 0e13ffa commit 8493612

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

build/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export TEST_ASSET_KUBE_APISERVER=/tmp/kubebuilder/bin/kube-apiserver
2929
export TEST_ASSET_ETCD=/tmp/kubebuilder/bin/etcd
3030

3131
# Run the commands
32-
kubebuilder init repo --domain sample.kubernetes.io
32+
kubebuilder init --project-version 1 repo --domain sample.kubernetes.io
3333
kubebuilder create resource --group insect --version v1beta1 --kind Bee
3434
kubebuilder create resource --group insect --version v1beta1 --kind Wasp
3535
kubebuilder create controller --group apps --version v1beta2 --kind Deployment --core-type
@@ -40,4 +40,4 @@ go build ./pkg/...
4040
go test ./cmd/...
4141
go test ./pkg/...
4242

43-
fi
43+
fi

cmd/init_project.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (o *projectOptions) bindCmdlineFlags(cmd *cobra.Command) {
106106
cmd.Flags().StringVar(&o.project.Repo, "repo", util.Repo, "name of the github repo. "+
107107
"defaults to the go package of the current working directory.")
108108
cmd.Flags().StringVar(&o.project.Domain, "domain", "k8s.io", "domain for groups")
109-
cmd.Flags().StringVar(&o.project.Version, "project-version", project.Version1, "project version")
109+
cmd.Flags().StringVar(&o.project.Version, "project-version", project.Version2, "project version")
110110
}
111111

112112
func (o *projectOptions) initializeProject() {

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source common.sh
2121

2222
function test_init_project {
2323
header_text "performing init project"
24-
kubebuilder init --domain example.com <<< "n"
24+
kubebuilder init --project-version 1 --domain example.com <<< "n"
2525
}
2626

2727
function test_make_project {

0 commit comments

Comments
 (0)