From 343d7280b6bcf1c0c35d9d336c1b328658d5492e Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Fri, 6 Oct 2017 19:28:01 +0200 Subject: [PATCH] contributors/devel/api_changes.md: assorted improvements. --- contributors/devel/api_changes.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/contributors/devel/api_changes.md b/contributors/devel/api_changes.md index 1e689a434..d49429073 100644 --- a/contributors/devel/api_changes.md +++ b/contributors/devel/api_changes.md @@ -456,7 +456,7 @@ The conversion code resides with each versioned API. There are two files: Since auto-generated conversion functions are using manually written ones, those manually written should be named with a defined convention, i.e. a -function converting type X in pkg a to type Y in pkg b, should be named: +function converting type `X` in pkg `a` to type `Y` in pkg `b`, should be named: `convert_a_X_To_b_Y`. Also note that you can (and for efficiency reasons should) use auto-generated @@ -478,7 +478,7 @@ the build system uses custom cache. `make all` will invoke `make generated_files` as well. The `make generated_files` will also regenerate the `zz_generated.deepcopy.go`, -`zz_generated.defaults.go`, and `api/openapi-spec/openapi-spec`. +`zz_generated.defaults.go`, and `api/openapi-spec/swagger.json`. If regeneration is somehow not possible due to compile errors, the easiest workaround is to remove the files causing errors and rerun the command. @@ -575,7 +575,8 @@ of api objects - this is to improve the overall system performance. The auto-generated code resides with each versioned API: - - `staging/src/k8s.io/api///types.generated.go` + - `staging/src/k8s.io/api///generated.proto` + - `staging/src/k8s.io/api///generated.pb.go` To regenerate them run: @@ -831,7 +832,7 @@ The preferred approach adds an alpha field to the existing object, and ensures i 1. Add a feature gate to the API server to control enablement of the new field (and associated function): - In [k8s.io/apiserver/pkg/util/feature/feature_gate.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/util/feature/feature_gate.go): + In [staging/src/k8s.io/apiserver/pkg/features/kube_features.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/features/kube_features.go): ```go // owner: @you @@ -950,7 +951,3 @@ client which uses the other version. Therefore, this is not a preferred option. A related issue is how a cluster manager can roll back from a new version with a new feature, that is already being used by users. See https://github.com/kubernetes/kubernetes/issues/4855. - - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/api_changes.md?pixel)]() -