Repository navigation
Description
With DECK_SKIP_DEFAULTS_FILL=true (the workaround suggested in #2199 for the redis-ee partial drift), an upstream that declares only part of its healthchecks block is reported as changed on every deck gateway diff / sync, even right after a successful sync.
Konnect stores the full healthchecks tree (active, passive, threshold) with Kong's defaults. Since decK no longer fills defaults before diffing, the omitted nested fields are compared against the values Konnect returns.
Minimal configuration:
kong.yaml:
_format_version: "3.0"
services:
- name: example-service
host: example-upstream
port: 443
protocol: https
upstreams:
- name: example-upstream
healthchecks:
passive:
type: https
targets:
- target: backend.example.com:443
With DECK_SKIP_DEFAULTS_FILL=true, deck gateway sync kong.yaml followed by deck gateway diff kong.yaml should report no changes, but it reports an update on example-upstream, every time.
Actual:
DecK lists every healthchecks field that Konnect stores but the file does not declare as a - line, i.e. a field it would remove (output shortened, the long lists of HTTP status codes are replaced by { ... }):
updating upstream example-upstream {
"healthchecks": {
- "active": {
- "concurrency": 10,
- "healthy": {
- "http_statuses": [200, 302],
- "interval": 0,
- "successes": 0
- },
- "http_path": "/",
- "https_verify_certificate": true,
- "timeout": 1,
- "type": "http",
- "unhealthy": { ... }
- },
"passive": {
- "healthy": { ... },
"type": "https",
- "unhealthy": {
- "http_failures": 0,
- "http_statuses": [429, 500, 503],
- "tcp_failures": 0,
- "timeouts": 0
- }
},
- "threshold": 0
},
"id": "...",
"name": "example-upstream"
}
Summary:
Created: 0
Updated: 1
Deleted: 0
Workaround:
Write the whole healthchecks block that Konnect stores (active with both intervals at 0, passive healthy/unhealthy statuses, threshold 0). With the same DECK_SKIP_DEFAULTS_FILL=true, the next diff then reports Created: 0, Updated: 0, Deleted: 0. This means every default of the block has to be spelled out in the state file, and kept in line with Kong's defaults across upgrades.
Question:
Is this the intended behaviour of skipping the defaults fill? If so, could the docs for DECK_SKIP_DEFAULTS_FILL say that nested blocks must then be written in full? If not, should decK ignore omitted nested fields when the defaults fill is skipped?
Related to #2199
Environment:
decK version: 1.69
Konnect control plane (EU region, https://eu.api.konghq.com), type: [Hybrid, from Gateway Manager]
Activity