-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏃 bumped up CR to 0.3.0 and CT to 0.2.2 version
This PR also changes the way controller-gen is installed using Makefile. KBProject uses [email protected] that uses k8s 1.15 packages. When you run 'make all' to build the project and if you don't have controller-gen installed on your system, Makefile's controller-gen target will install [email protected] using 'go get'. 'go get' will update the Go.mod file to use k8s 1.16 ApiMachinery pkg because controller-tool's v0.2.2 is using k8s 1.16 pkgs. There are two ways to fix this problem: 1. Ship controller-gen binaries for each OS and Makefile target should use the appropriate binary. 2. Run 'go get' in a temporary directory so that it doesn't KB Project's Go.mod This PR implements the second approach. Error Reported: pkg/mod/sigs.k8s.io/[email protected]/pkg/client/apiutil/apimachinery.go:77:30: undefined: serializer.DirectCodecFactory
- Loading branch information
Showing
9 changed files
with
236 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ 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].0-beta.5 | ||
go get sigs.k8s.io/controller-tools/cmd/[email protected].2 | ||
|
||
# make sure we add the go bin directory to our path | ||
gobin=$(go env GOBIN) | ||
|
2 changes: 1 addition & 1 deletion
2
docs/book/src/cronjob-tutorial/testdata/project/api/v1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
262 changes: 202 additions & 60 deletions
262
docs/book/src/cronjob-tutorial/testdata/project/go.sum
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,14 @@ docker-push: | |
# download controller-gen if necessary | ||
controller-gen: | ||
ifeq (, $(shell which controller-gen)) | ||
go get sigs.k8s.io/controller-tools/cmd/[email protected] | ||
@{ \ | ||
set -e ;\ | ||
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] ;\ | ||
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ | ||
} | ||
CONTROLLER_GEN=$(GOBIN)/controller-gen | ||
else | ||
CONTROLLER_GEN=$(shell which controller-gen) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters