diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index a2eb8a02ae0..d664e6bdf2f 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -69,7 +69,7 @@ - [Migration by updating the files](migration/legacy/manually_migration_guide_v2_v3.md) - [From v3.0.0 with plugins](./migration/v3-plugins.md) - [go/v3 vs go/v4-alpha](migration/v3vsv4.md) - + - [Migration Guide](migration/migration_guide_gov3_to_gov4.md) - [Migration by updating the files](migration/manually_migration_guide_gov3_to_gov4.md) - [Single Group to Multi-Group](./migration/multi-group.md) diff --git a/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md b/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md index e776bb5beb9..87172effcf2 100644 --- a/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md +++ b/docs/book/src/migration/manually_migration_guide_gov3_to_gov4.md @@ -16,14 +16,14 @@ The recommended upgrade approach is to follow the [Migration Guide go/v3 to go/v ## Migration from project config version "go/v3" to "go/v4" -Update the `PROJECT` file layout which stores information about the resources that are used to enable plugins make +Update the `PROJECT` file layout which stores information about the resources that are used to enable plugins make useful decisions while scaffolding. The `layout` field indicates the scaffolding and the primary plugin version in use. ### Steps to migrate #### Migrate the layout version into the PROJECT file -The following steps describe the manual changes required to bring the project configuration file (`PROJECT`). +The following steps describe the manual changes required to bring the project configuration file (`PROJECT`). These change will add the information that Kubebuilder would add when generating the file. This file can be found in the root directory. Update the PROJECT file by replacing: @@ -64,7 +64,7 @@ Therefore, you can check the changes in the layout results into: - Create a new directory `cmd` and move the `main.go` under it. - If your project support multi-group the APIs are scaffold under a directory called `apis`. Rename this directory to `api` -- Move the `controllers` directory under the `internal` and rename it for `controller` +- Move the `controllers` directory under the `internal` and rename it for `controller` - Now ensure that the imports will be updated accordingly by: - Update the `main.go` imports to look for the new path of your controllers under the `pkg` directory @@ -136,17 +136,17 @@ Note that if your project has multiple groups (`multigroup:true`) then the above The PROJECT tracks the paths of all APIs used in your project. Ensure that they now point to `api/...` as the following example: Before update: - group: crew - kind: Captain - path: sigs.k8s.io/kubebuilder/testdata/project-v4/apis/crew/v1 +group: crew +kind: Captain +path: sigs.k8s.io/kubebuilder/testdata/project-v4/apis/crew/v1 ``` After Update: ``` - group: crew - kind: Captain - path: sigs.k8s.io/kubebuilder/testdata/project-v4/api/crew/v1 +group: crew +kind: Captain +path: sigs.k8s.io/kubebuilder/testdata/project-v4/api/crew/v1 ``` ### Update kustomize manifests with the changes made so far diff --git a/docs/book/src/migration/v3vsv4.md b/docs/book/src/migration/v3vsv4.md index 403b21411ac..9c97674a75a 100644 --- a/docs/book/src/migration/v3vsv4.md +++ b/docs/book/src/migration/v3vsv4.md @@ -20,8 +20,8 @@ The details of all changes (breaking or otherwise) can be found in: - no longer scaffold webhook test files with `"k8s.io/api/admission/v1beta1"` the k8s API which is no longer served since k8s `1.25`. By default webhooks test files are scaffolding using `"k8s.io/api/admission/v1"` which is support from k8s `1.20` - no longer provide backwards compatible support with k8s versions < `1.16` -- change the layout to accommodate the community request to follow the [Standard Go Project Layout][standard-go-project] -by moving the api(s) under a new directory called `api`, controller(s) under a new directory called `internal` and the `main.go` under a new directory named `cmd` +- change the layout to accommodate the community request to follow the [Standard Go Project Layout][standard-go-project] + by moving the api(s) under a new directory called `api`, controller(s) under a new directory called `internal` and the `main.go` under a new directory named `cmd`