You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using deck gateway sync to keep a declarative kong config in sync with a gateway. Trying out upstreams with targets, I noticed DecK identifies all target as new and recreates them. sync will fail because of a UNIQUE violation. Is recreating them intentional, or is there a way for targets to be unique? feels like a bug?
Example Below
_format_version: "3.0"
upstreams:
- name: example
targets:
- target: www.google.com
% deck gateway diff ./config/*.yaml
creating target www.google.com for upstream b3b52864-4ca4-4b6c-87d6-ffc80889108e
deleting target www.google.com:8000 for upstream b3b52864-4ca4-4b6c-87d6-ffc80889108e
Summary:
Created: 1
Updated: 0
Deleted: 1
% deck gateway sync ./config/*.yaml
creating target www.google.com for upstream b3b52864-4ca4-4b6c-87d6-ffc80889108e
Summary:
Created: 0
Updated: 0
Deleted: 0
Error: 1 errors occurred:
while processing event: Create target www.google.com for upstream b3b52864-4ca4-4b6c-87d6-ffc80889108e failed: HTTP status 409 (message: "UNIQUE violation detected on '{target=\"www.google.com:8000\",upstream={id=\"b3b52864-4ca4-4b6c-87d6-ffc80889108e\"}}'")
The text was updated successfully, but these errors were encountered:
@mheap This looks like a bug to me too. Does it happen if you include the port number in the target?
Adding the port number works 🙌
I am using SRV records which is why there is no port number - I should have specified that in the issue 🙈. Including a port with the SRV record - e.g. srv_recorname:port - works. It's inaccurate as the port included will be ignored and instead the resolved port is used, but it does allow DecK to sync correctly.
GuyStone
changed the title
Failed to create existing targets for upstream - UNIQUE violation
SRV Record failed to create existing targets for upstream when port is not defined - UNIQUE violation
Mar 11, 2025
Kong Version 3.9.0.0
decK Version: 1.45.0
I'm using
deck gateway sync
to keep a declarative kong config in sync with a gateway. Trying out upstreams with targets, I noticed DecK identifies all target as new and recreates them.sync
will fail because of aUNIQUE violation
. Is recreating them intentional, or is there a way for targets to be unique? feels like a bug?Example Below
The text was updated successfully, but these errors were encountered: