You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/kubebuilder_v0_v1_difference.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Kubebuilder v0 v.s. v1
2
2
3
-
Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different values, `v0` and `v1`. When `v0` is used, the kubebuilder behavior and workflow is the same as kubebuilder 0.*. When `v1` is specified, the generated v1 project layout is architecturally different from v0 project. v1 project uses [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) set of libraries for controller implementation and used tools under [controller-tools](https://github.com/kubernetes-sigs/controller-tools) for scaffolding and generation.
3
+
Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different values, `v0` and `v1`. When `v0` is used, the kubebuilder behavior and workflow are the same as kubebuilder 0.*. When `v1` is specified, the generated v1 project layout is architecturally different from v0 project. v1 project uses [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) set of libraries for controller implementation and used tools under [controller-tools](https://github.com/kubernetes-sigs/controller-tools) for scaffolding and generation.
4
4
5
5
6
6
## Command difference
@@ -35,7 +35,7 @@ Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different va
35
35
36
36
- v0 project contains a directory `pkg/client` while v1 project doesn't
37
37
- v0 project contains a directory `inject` while v1 project doesn't
38
-
- v0 project layout follows predefined directory layout `pkg/apis` and `pkg/controller` while v1 project accepts userspecified path
38
+
- v0 project layout follows predefined directory layout `pkg/apis` and `pkg/controller` while v1 project accepts user-specified path
39
39
- In v1 project, there is a `init()` function for every api and controller.
40
40
41
41
## Library difference
@@ -51,6 +51,6 @@ Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different va
51
51
- v1 projects import the dynamic client library from controller-runtime `controller-runtime/pkg/client`.
52
52
53
53
## Wiring difference
54
-
Wiring refers to the mechanics of integrating controllers to controller-manager and injecting the dependencies in them.
55
-
- v0 projects have a`inject` package and it provides functions for adding the controller to controller-manager as well as registering CRDs.
56
-
- v1 projects don't have a `inject` package, the controller is added to controller-manager by a `init` function inside add_<type>.go file inside the controller directory. The types are registered by a`init` function inside <type>_types.go file inside the apis directory.
54
+
Wiring refers to the mechanics of integrating controllers into controller-managers and injecting the dependencies in them.
55
+
- v0 projects have an`inject` package and it provides functions for adding the controller to controller-manager as well as registering CRDs.
56
+
- v1 projects don't have a `inject` package, the controller is added to controller-manager by a `init` function inside add_<type>.go file inside the controller directory. The types are registered by an`init` function inside <type>_types.go file inside the apis directory.
0 commit comments