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

Store schema of custom entity and validate KongCustomEntity against Kong gateway #5975

Closed
2 of 5 tasks
randmonkey opened this issue May 7, 2024 · 0 comments · Fixed by #6006
Closed
2 of 5 tasks

Comments

@randmonkey
Copy link
Contributor

randmonkey commented May 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Does this enhancement require public documentation?

  • I have added an Acceptance Criteria item for adding and/or adjusting public documentation (if applicable)

Problem Statement

Split from #4556.
To validate a KongCustomEntity CR, we need to know the schema of "supported" entity in Kong gateway to

  • Validate its type
  • Fill in "foreign" fields to send it to /schemas/{type}/validate endpoints of validating

Proposed Solution

  • Maintain a map to store schema of "Known" Kong entities
  • When a KongCustomEntity CR created/updated, check its schema and store it
  • In validating webhooks, fill in the "foreign" fields according to the stored schema.

Additional information

No response

Acceptance Criteria

  • KIC has the storage for schema of supported Kong entities
  • For each KongCustomEntity CR, its entity type is stored in KIC if the type exists in Kong gateway
  • KIC can fill in the "foreign" fields of entity according to stored schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant