This is the new style for indicating a file is WiP and subject to
breaking changes. Rather than rely on alpha major versions, which are
coarse grained and introduce migration difficulties for operators, we
use a file-level annotation.
Risk level: Low
Testing: API/docs build, manual inspection of docs.
Fixes#9769.
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Co-authored-by: htuch <htuch@users.noreply.github.com>
Mirrored from https://github.com/envoyproxy/envoy @ 423fe76d5572bb4f1505391ccaaacf39b2bf2c85
@ -120,6 +120,10 @@ Extensions must currently be added as v2 APIs following the [package
organization](#package-organization) above.
To add an extension config to the API, the steps below should be followed:
1. If this is still WiP and subject to breaking changes, use `vNalpha` instead of `vN` in steps
below. Refer to the [Cache filter config](envoy/config/filter/http/cache/v2alpha/cache.proto)
as an example of `v2alpha`, and the
[Buffer filter config](envoy/config/filter/http/buffer/v2/buffer.proto) as an example of `v2`.
1. Place the v2 extension configuration `.proto` in `api/envoy/config`, e.g.
`api/envoy/config/filter/http/foobar/v2/foobar.proto` together with an initial BUILD file:
```
@ -132,13 +136,15 @@ To add an extension config to the API, the steps below should be followed:
)
```
1. Add to the v2 extension config proto `import "udpa/annotations/migrate.proto";`
2. Add to the v2 extension config proto a package level `option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.foobar.v3";`.
This places the filter in the correct [v3 package hierarchy](#package-organization).
3. Add a reference to the v2 extension config in (1) in [api/docs/BUILD](docs/BUILD).
4. Run `./tools/proto_format fix`. This should regenerate the `BUILD` file,
1. Add to the v2 extension config proto a file level `option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.foobar.v3";`.
This places the filter in the correct [v3 package hierarchy](#package-organization).
1. If this is still WiP and subject to breaking changes, import
`udpa/annotations/status.proto` and set `option (udpa.annotations.file_status).work_in_progress = true;`.
1. Add a reference to the v2 extension config in (1) in [api/docs/BUILD](docs/BUILD).
1. Run `./tools/proto_format fix`. This should regenerate the `BUILD` file,
reformat `foobar.proto` as needed and also generate the v3 extension config,
together with shadow API protos.
4. `git add api/ generated_api_shadow/` to add any new files to your Git index.
1. `git add api/ generated_api_shadow/` to add any new files to your Git index.
## API annotations
@ -177,3 +183,5 @@ metadata. We describe these annotations below by category.