Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check uniqueness of required fields in controller caches by Indexer instead of Store #5425

Open
1 of 4 tasks
randmonkey opened this issue Jan 11, 2024 · 0 comments
Open
1 of 4 tasks
Labels
Milestone

Comments

@randmonkey
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

For some of the resources, there is a uniqueness restraint on certain fields, like username of KongConsumer or prefix of KongVault.
To avoid conflicting resources be stored into cache, we can use Indexer instead of Store to store the objects and define the indexer to extract the unique fields, and reject the update to cache if the field is duplicate.

Proposed Solution

  • Use Indexer to store KongConsumer, KongVault and other objects requires some fields to be unique
  • Define IndexFunc to extract fields with uniqueness restraint as indices and reject object with dupe fields
  • Update the status of the object if it is rejected by the reason of dupe field

Additional information

No response

Acceptance Criteria

  • Use Indexer to store KongConsumer, KongVault and other objects having requirement of uniqueness on certain fields
  • These objects with dupe field will be rejected to store into the controller cache
  • If an object is rejected by dupe field, status can reflect this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants