diff --git a/Makefile b/Makefile index 06bf33b64f..a103f4e58e 100644 --- a/Makefile +++ b/Makefile @@ -96,4 +96,4 @@ clean-api-reference: ## Clean all directories in API reference directory, preser api-reference: clean-api-reference ## Build the API reference pages. go needed cd api-ref-generator/gen-resourcesdocs && \ - go run cmd/main.go kwebsite --config-dir config/v1.21/ --file api/v1.21/swagger.json --output-dir ../../content/en/docs/reference/kubernetes-api --templates templates + go run cmd/main.go kwebsite --config-dir ../../api-ref-assets/config/ --file ../../api-ref-assets/api/swagger.json --output-dir ../../content/en/docs/reference/kubernetes-api --templates ../../api-ref-assets/templates diff --git a/README.md b/README.md index e777c8c63a..74f99e2ffc 100644 --- a/README.md +++ b/README.md @@ -73,23 +73,15 @@ To update the reference pages for a new Kubernetes release (replace v1.20 in the git submodule update --init --recursive --depth 1 ``` -2. Create a new API revision into the submodule, and add the Swagger specification: +2. Update the Swagger specification: - ```bash - mkdir api-ref-generator/gen-resourcesdocs/api/v1.20 - curl 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json' > api-ref-generator/gen-resourcesdocs/api/v1.20/swagger.json - ``` +``` +curl 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json' > api-ref-assets/api/swagger.json +``` -3. Copy the table of contents and fields configuration for the new release from a previous one: +3. In `api-ref-assets/config/`, adapt the files `toc.yaml` and `fields.yaml` to reflect the changes of the new release. - ```bash - mkdir api-ref-generator/gen-resourcesdocs/api/v1.20 - cp api-ref-generator/gen-resourcesdocs/api/v1.19/* api-ref-generator/gen-resourcesdocs/api/v1.20/ - ``` - -4. Adapt the files `toc.yaml` and `fields.yaml` to reflect the changes between the two releases - -5. Next, build the pages: +4. Next, build the pages: ```bash make api-reference @@ -104,7 +96,7 @@ To update the reference pages for a new Kubernetes release (replace v1.20 in the In a web browser, go to to view the API reference. -6. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages. +5. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages. ## Troubleshooting