Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ## Update/generate the vendor by using the path $GOPATH/src/sig
.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].1
- GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected].2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be part of a different PR? Bumping controller-gen to v0.2.2 doesn't seem related to the import fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Adirio, the command make generate-setup is just a helper for development purpose. We can use it before exec the golden script to ensure that the correct version of the controller-gen will be used. So, it is a very small update and since it is too small I believe that would be ok be in this PR.


##@ Tests

Expand Down
1 change: 1 addition & 0 deletions pkg/scaffold/v2/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"

{{ .Resource.GroupImportSafe }}{{ .Resource.Version }} "{{ .ResourcePackage }}/{{ .Resource.Version }}"
)
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v2/controllers/namespace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"context"

"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// NamespaceReconciler reconciles a Namespace object
Expand Down