Skip to content

Commit 98a8fa5

Browse files
authored
Update kubebuilder_v0_v1_difference.md
1 parent 9654d7d commit 98a8fa5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/kubebuilder_v0_v1_difference.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Kubebuilder v0 v.s. v1
22

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.
44

55

66
## Command difference
@@ -35,7 +35,7 @@ Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different va
3535

3636
- v0 project contains a directory `pkg/client` while v1 project doesn't
3737
- 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 user specified path
38+
- v0 project layout follows predefined directory layout `pkg/apis` and `pkg/controller` while v1 project accepts user-specified path
3939
- In v1 project, there is a `init()` function for every api and controller.
4040

4141
## Library difference
@@ -51,6 +51,6 @@ Kubebuilder 1.0 adds a new flag `--project-version`, it accepts two different va
5151
- v1 projects import the dynamic client library from controller-runtime `controller-runtime/pkg/client`.
5252

5353
## 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

Comments
 (0)