Skip to content

Commit

Permalink
Switch default project version to v2
Browse files Browse the repository at this point in the history
This switches the default scaffolding to v2, since we want people to use
this version.
  • Loading branch information
DirectXMan12 committed May 15, 2019
1 parent 0e13ffa commit 8493612
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export TEST_ASSET_KUBE_APISERVER=/tmp/kubebuilder/bin/kube-apiserver
export TEST_ASSET_ETCD=/tmp/kubebuilder/bin/etcd

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

fi
fi
2 changes: 1 addition & 1 deletion cmd/init_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (o *projectOptions) bindCmdlineFlags(cmd *cobra.Command) {
cmd.Flags().StringVar(&o.project.Repo, "repo", util.Repo, "name of the github repo. "+
"defaults to the go package of the current working directory.")
cmd.Flags().StringVar(&o.project.Domain, "domain", "k8s.io", "domain for groups")
cmd.Flags().StringVar(&o.project.Version, "project-version", project.Version1, "project version")
cmd.Flags().StringVar(&o.project.Version, "project-version", project.Version2, "project version")
}

func (o *projectOptions) initializeProject() {
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source common.sh

function test_init_project {
header_text "performing init project"
kubebuilder init --domain example.com <<< "n"
kubebuilder init --project-version 1 --domain example.com <<< "n"
}

function test_make_project {
Expand Down

0 comments on commit 8493612

Please sign in to comment.