-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#6001) * fix(konnect) avoid collisions when redacting (#5964) When generating sanitized configuration for Konnect, use random values to redact unique fields. Internally, go-database-reconciler builds an in-memory database with certain fields as primary keys. Using static redacted values for these results in collisions in that database. (cherry picked from commit 4b60bf8) * add CHANGELOG entry to backport --------- Co-authored-by: Travis Raines <571832+rainest@users.noreply.github.com>
- Loading branch information
1 parent
949ab33
commit 61fb5ed
Showing
10 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package util | ||
|
||
import "github.com/google/uuid" | ||
|
||
// UUIDGenerator is an interface to generate UUIDs. | ||
type UUIDGenerator interface { | ||
NewString() string | ||
} | ||
|
||
// DefaultUUIDGenerator is the default implementation of UUIDGenerator. | ||
type DefaultUUIDGenerator struct{} | ||
|
||
func (DefaultUUIDGenerator) NewString() string { | ||
return uuid.NewString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package mocks | ||
|
||
import "github.com/kong/kubernetes-ingress-controller/v3/internal/util" | ||
|
||
var _ = util.UUIDGenerator(&StaticUUIDGenerator{}) | ||
|
||
type StaticUUIDGenerator struct { | ||
UUID string | ||
} | ||
|
||
func (s StaticUUIDGenerator) NewString() string { | ||
return s.UUID | ||
} |