Skip to content

[o2k] add defaults for services & upstreams#3319

Closed
Tieske wants to merge 3 commits intodevelopfrom
more-defaults
Closed

[o2k] add defaults for services & upstreams#3319
Tieske wants to merge 3 commits intodevelopfrom
more-defaults

Conversation

@Tieske
Copy link
Copy Markdown
Contributor

@Tieske Tieske commented Apr 23, 2021

This adds support for 2 keys; x-kong-service-defaults, and x-kong-upstream-defaults.

This allows to configure specific techincal properties for the generated Kong configuration that cannot be derived from the OAS spec itself.

for example:

openapi: "3.0.0"
info:
  title: Simple API overview
  version: v2
servers:
  - url: http://backend.com/path
x-kong-service-defaults:
  retries: 10
  connect_timeout: 30000
  write_timeout: 30000
  read_timeout: 30000
x-kong-upstream-defaults:
  hash_on: ip
  healthchecks:
    passive:
      unhealthy:
        http_failures: 3
        tcp_failures: 3
        timeouts: 3
paths:
  /:
    x-kong-name: x-kong-name-override-at-path-item
    get:
      x-kong-name: x-kong-name-override-at-method
      operationId: listVersionsv2
      summary: List API versions

closes INS-653

EDIT: also added a replacement commit for PR #3273, which fixes INS-122

Tieske added 2 commits April 24, 2021 11:51
This allows to set the properties that cannot be derived from the
OAS spec itself, like timeouts, retries, etc.
This allows to set the properties that cannot be derived from the
OAS spec itself, like hash-keys, health-checks, etc.
This allows to set the properties that cannot be derived from the
OAS spec itself, like preserve_host, etc.

The precedence is most-specific to least-specific, so defaults
at operations level override path level, which in turn overrides
root level.

replaces #3273
@Tieske
Copy link
Copy Markdown
Contributor Author

Tieske commented Apr 26, 2021

these commits were added through #3273 , closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PA-openapi-2-kong Package: OpenAPI 2 Kong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant