Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump deck format version to 3.0 #4405

Merged
merged 2 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/_hub/kong-inc/acme/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ users can set this config to `system` to auto pick CA-bundle from OS.
Here's a sample declarative configuration with `redis` as storage:

```yaml
_format_version: "1.1"
_format_version: "3.0"
# this section is not necessary if there's already a route that matches
# /.well-known/acme-challenge path with http protocol
services:
Expand Down
2 changes: 1 addition & 1 deletion app/_hub/kong-inc/grpc-gateway/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ but proxies to a `Service` with the `grpc(s)` protocol.
Sample configuration via declarative (YAML):

```yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- protocol: grpc
host: localhost
Expand Down
4 changes: 2 additions & 2 deletions app/_hub/kong-inc/grpc-web/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ but proxies to a Service with the `grpc(s)` protocol.
Sample configuration via declarative (YAML):

```yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- protocol: grpc
host: localhost
Expand Down Expand Up @@ -140,7 +140,7 @@ message HelloResponse {
The declarative configuration becomes:

```yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- protocol: grpc
host: localhost
Expand Down
6 changes: 3 additions & 3 deletions src/deck/guides/defaults-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ want to use, skip to [setting defaults](#set-defaults).
2. Add the following sample service and route to the file:

```yaml
_format_version: "0.1"
_format_version: "3.0"
services:
- host: mockbin.org
name: example_service
Expand Down Expand Up @@ -163,7 +163,7 @@ Summary:
`defaults`:

```yaml
_format_version: "0.1"
_format_version: "3.0"
_info:
defaults:
services:
Expand All @@ -189,7 +189,7 @@ Summary:
For example:

```yaml
_format_version: "0.1"
_format_version: "3.0"
_info:
defaults:
route:
Expand Down
10 changes: 5 additions & 5 deletions src/deck/guides/defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ again to see how decK interprets default values.
1. Add the following sample service, route, and plugin to the file:

```yaml
_format_version: "0.1"
_format_version: "3.0"
services:
- host: mockbin.org
name: example_service
Expand Down Expand Up @@ -127,7 +127,7 @@ overwriting your current state file, specify a different filename:
default values populated for the service, route, and Basic Auth plugin:

```yaml
_format_version: "1.1"
_format_version: "3.0"
plugins:
- config:
anonymous: null
Expand Down Expand Up @@ -196,7 +196,7 @@ configuration would overwrite the value in your environment.
`defaults`:

```yaml
_format_version: "0.1"
_format_version: "3.0"
_info:
defaults:
services:
Expand All @@ -223,7 +223,7 @@ configuration would overwrite the value in your environment.
Service object:

```yaml
_format_version: "0.1"
_format_version: "3.0"
_info:
defaults:
service:
Expand All @@ -242,7 +242,7 @@ configuration would overwrite the value in your environment.
Or you could define custom default values for all available fields:

```yaml
_format_version: "0.1"
_format_version: "3.0"
_info:
defaults:
route:
Expand Down
2 changes: 1 addition & 1 deletion src/deck/guides/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can use this method for any sensitive content.
2. Save the following snippet into a `env-demo.yaml` file:

```yaml
_format_version: "1.1"
_format_version: "3.0"
consumers:
- keyauth_credentials:
- key: {%raw%}${{ env "DECK_API_KEY" }}{%endraw%}
Expand Down
4 changes: 2 additions & 2 deletions src/deck/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ If you already have {{site.base_gateway}} set up with the configuration of your
configuration in this guide, the file should look like this:

```yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- connect_timeout: 60000
host: example.com
Expand Down Expand Up @@ -168,7 +168,7 @@ Edit the `kong.yaml` file, making the following changes:
Your `kong.yaml` file should now look like this:

```yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- connect_timeout: 60000
host: example.com
Expand Down
2 changes: 1 addition & 1 deletion src/deck/guides/kong-enterprise.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To set a workspace directly in the state file, use the `_workspace` parameter.
For example:

```yaml
_format_version: "1.1"
_format_version: "3.0"
_workspace: default
services:
- name: example_service
Expand Down
4 changes: 2 additions & 2 deletions src/deck/guides/konnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ or use a flag when running any decK command.
* Target a runtime group in your state file with the `konnect_runtime_group` parameter:

```yaml
_format_version: "1.1"
_format_version: "3.0"
_konnect:
runtime_group_name: staging
```
Expand Down Expand Up @@ -181,7 +181,7 @@ If the {{site.konnect_short_name}} service doesn't exist, setting a `_Konnect` t
For example, see the following configuration snippet, where the Gateway service named `example_service` is attached to the {{site.konnect_short_name}} service `example`:

```yaml
_format_version: "1.1"
_format_version: "3.0"
_konnect:
runtime_group_name: default
services:
Expand Down
6 changes: 3 additions & 3 deletions src/deck/guides/multi-file-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ deck dump --select-tag team-svc1 -o svc1.yaml

```sh
$ cat svc1.yaml
_format_version: "1.1"
_format_version: "3.0"
_info:
defaults: {}
select_tags:
Expand All @@ -70,7 +70,7 @@ deck dump --select-tag team-svc2 -o svc2.yaml

```sh
$ cat svc2.yaml
_format_version: "1.1"
_format_version: "3.0"
_info:
defaults: {}
select_tags:
Expand Down Expand Up @@ -114,4 +114,4 @@ Summary:
> As a best practice, the way you `sync` configurations should be consistent with the way you
initially `dump`ed them.

{% endif_version %}
{% endif_version %}
4 changes: 2 additions & 2 deletions src/gateway/install/docker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ using the URL specified in `KONG_ADMIN_GUI_URL`:
Now that you have a running Gateway instance, Kong provides a series of
[getting started guides](/gateway/{{page.kong_version}}/get-started/services-and-routes/)
to help you set up and enhance your first Service.


In particular, right after installation you might want to:
* [Create a service and a route](/gateway/{{page.kong_version}}/get-started/services-and-routes)
Expand Down Expand Up @@ -284,7 +284,7 @@ backed up by a Redis cluster).
could look something like this:

```yaml
_format_version: "1.1"
_format_version: "3.0"
_transform: true

services:
Expand Down
4 changes: 2 additions & 2 deletions src/gateway/kong-enterprise/plugin-ordering/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ http -f post :8001/plugins \
Your file should now look like this:

``` yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- host: mockbin.org
name: example_service
Expand Down Expand Up @@ -167,7 +167,7 @@ http -f post :8001/plugins \
Your file should now look like this:

``` yaml
_format_version: "1.1"
_format_version: "3.0"
services:
- host: mockbin.org
name: example_service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ entities and their attributes. This is a small yet complete
example that illustrates a number of features:

```yaml
_format_version: "2.1"
_format_version: "3.0"
_transform: true

services:
Expand All @@ -162,7 +162,7 @@ consumers:
- key: my-key
```

The only mandatory piece of metadata is `_format_version: "2.1"`, which
The only mandatory piece of metadata is `_format_version: "3.0"`, which
specifies the version number of the declarative configuration syntax format.
This also matches the minimum version of Kong required to parse the file.

Expand Down Expand Up @@ -238,13 +238,13 @@ http :8001/config config=@kong.yml
The `/config` endpoint replaces the entire set of entities in memory
with the ones specified in the given file.

Or another way you can start Kong in DB-less mode is with a
Or another way you can start Kong in DB-less mode is with a
declarative configuration in a string using the `KONG_DECLARATIVE_CONFIG_STRING`
environment variable.
environment variable.

```
export KONG_DATABASE=off
export KONG_DECLARATIVE_CONFIG_STRING='{"_format_version":"1.1", "services":[{"host":"mockbin.com","port":443,"protocol":"https", "routes":[{"paths":["/"]}]}],"plugins":[{"name":"rate-limiting", "config":{"policy":"local","limit_by":"ip","minute":3}}]}'
export KONG_DATABASE=off
export KONG_DECLARATIVE_CONFIG_STRING='{"_format_version":"1.1", "services":[{"host":"mockbin.com","port":443,"protocol":"https", "routes":[{"paths":["/"]}]}],"plugins":[{"name":"rate-limiting", "config":{"policy":"local","limit_by":"ip","minute":3}}]}'
kong start
```

Expand Down
2 changes: 1 addition & 1 deletion src/gateway/production/running-kong/secure-admin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ normally to any other Kong API.
If you are using Docker to host {{site.ee_product_name}}, you can accomplish a similar task using a declarative configuration such as this one:

``` yaml
_format_version: "1.1"
_format_version: "3.0"

services:
- name: admin-api
Expand Down