feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
46
vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md
generated
vendored
46
vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md
generated
vendored
@@ -22,22 +22,31 @@ make nuke
|
||||
|
||||
The compiled-in schema version should maximize API availability with respect to all actively supported Kubernetes versions. For example, while 1.20, 1.21 and 1.22 are the actively supported versions, 1.21 is the best choice. This is because 1.21 introduces at least one new API and does not remove any, while 1.22 removes a large set of long-deprecated APIs that are still supported in 1.20/1.21.
|
||||
|
||||
### Update the built-in schema to a new version
|
||||
### Generating additional schema
|
||||
|
||||
In the Makefile in this directory, update the `API_VERSION` to your desired version.
|
||||
If you'd like to change the default schema version, then in the Makefile in this directory, update the `API_VERSION` to your desired version.
|
||||
|
||||
You may need to update the version of Kind these scripts use by changing `KIND_VERSION` in the Makefile in this directory. You can find compatibility information in the [kind release notes](https://github.com/kubernetes-sigs/kind/releases).
|
||||
|
||||
In this directory, fetch the openapi schema and generate the
|
||||
corresponding swagger.go for the kubernetes api:
|
||||
In this directory, fetch the openapi schema, generate the
|
||||
corresponding swagger.go for the kubernetes api, and update `kubernetesapi/openapiinfo.go`:
|
||||
|
||||
```
|
||||
make all
|
||||
```
|
||||
|
||||
The above command will update the [OpenAPI schema] and the [Kustomization schema]. It will
|
||||
create a directory kubernetesapi/v1212 and store the resulting
|
||||
swagger.json and swagger.go files there.
|
||||
If you want to run the steps individually instead of using `make all`, you can run
|
||||
the following commands:
|
||||
|
||||
```
|
||||
make kustomizationapi/swagger.go
|
||||
make kubernetesapi/swagger.go
|
||||
make kubernetesapi/openapiinfo.go
|
||||
```
|
||||
|
||||
You can optionally delete the old `swagger.pb` and `swagger.go` files if we no longer need to support that kubernetes version of
|
||||
openapi data. Make sure you rerun `make kubernetesapi/openapiinfo.go` after deleting any old schemas.
|
||||
|
||||
|
||||
#### Precomputations
|
||||
|
||||
@@ -55,25 +64,6 @@ make prow-presubmit-check >& /tmp/k.txt; echo $?
|
||||
|
||||
The exit code should be zero; if not, examine `/tmp/k.txt`.
|
||||
|
||||
## Generating additional schemas
|
||||
|
||||
Instead of replacing the default version, you can specify a desired version as part of the make invocation:
|
||||
|
||||
```
|
||||
rm kubernetesapi/swagger.go
|
||||
make kubernetesapi/swagger.go API_VERSION=v1.21.2
|
||||
```
|
||||
|
||||
While the above commands generate the swagger.go files, they
|
||||
do not make them available for use nor do they update the
|
||||
info field reported by `kustomize openapi info`. To make the
|
||||
newly fetched schema and swagger.go available:
|
||||
|
||||
```
|
||||
rm kubernetesapi/openapiinfo.go
|
||||
make kubernetesapi/openapiinfo.go
|
||||
```
|
||||
|
||||
## Partial regeneration
|
||||
|
||||
You can also regenerate the kubernetes api schemas specifically with:
|
||||
@@ -87,8 +77,8 @@ To fetch the schema without generating the swagger.go, you can
|
||||
run:
|
||||
|
||||
```
|
||||
rm kubernetesapi/swagger.json
|
||||
make kubernetesapi/swagger.json
|
||||
rm kubernetesapi/swagger.pb
|
||||
make kubernetesapi/swagger.pb
|
||||
```
|
||||
|
||||
Note that generating the swagger.go will re-fetch the schema.
|
||||
|
||||
Reference in New Issue
Block a user