Reject KongVault
with duplicate spec.prefix
and generate translation error events
#5423
Closed
1 of 3 tasks
Is there an existing issue for this?
Problem Statement
Split from #5333 and #5395.
Since
prefix
field of vault should be unique in Kong gateway, when multipleKongVault
s with the samespec.prefix
are in the controller's cache (in case webhook is not enabled, or came to race condition that otherKongVault
s not yet sunxed to cache), the translator should pick only one of them and reject the others to avoid invalid Kong configuration that will cause stuck.The tie breaker would be:
KongVault
created earlier (earliercreationTimestamp
) should be chosenKongVault
s have thecreationTimestamp
, the one with the smallest alphabetical order should be chosenProposed Solution
spec.prefix
in translator'sFillVaults
method,KongVault
s with duplicatespec.prefix
Additional information
No response
Acceptance Criteria
prefix
fieldKongVault
s have the samespec.vault
field, only one will get translated, and others will have translation failure event recordedThe text was updated successfully, but these errors were encountered: