Object defaults reference

Uses: APIOps decK

Kong Gateway sets some default values for most objects, including Kong plugins. You can see what the defaults are for each object in the Admin API reference, or use the /schemas endpoint to check the latest object schemas for your instance of the Kong Gateway.

decK recognizes value defaults and doesn’t interpret them as changes to configuration. If you push a config for an object to Kong Gateway with sync, Kong Gateway applies its default values to the object, but a further diff or sync does not show any changes.

If you upgrade Kong Gateway to a version that introduces a new property with a default value, a diff will catch the difference.

You can also configure your own custom defaults to enforce a set of standard values and avoid repetition in your configuration.

Value order of precedence

decK assigns values in the following order of precedence, from highest to lowest:

  1. Values set for a specific instance of an object in the state file (for example, for a service named example_service defined in kong.yml).
  2. Values set in the {_info: defaults:} object in the state file.
  3. Self-managed Kong Gateway only: Values are checked against the Kong Admin API schemas.
  4. Konnect Cloud only: Values are checked against the Kong Admin API for plugins, and against hardcoded defaults for Service, Route, Upstream, and Target objects.

Find defaults for an object

Kong Gateway defines all the defaults it applies in object schema files. Check the schemas to find the most up-to-date default values for an object.

If you want to completely avoid differences between the configuration file and the Kong Gateway, set all possible default values for an object in your kong.yaml file.

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!