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

fetch Kong entity schema and validate KongCustomEntity resources #6006

Merged
merged 5 commits into from May 15, 2024

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented May 11, 2024

What this PR does / why we need it:

Fetch entity schema and validate KongCustomEntity against Kong gateway.
Added unit tests and envtest tests to verify the parsing of entity schema and validations.

Which issue this PR fixes:

fixes #5975

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@randmonkey randmonkey force-pushed the feat/kong_custom_entity_schema_and_validate branch 2 times, most recently from b29cd92 to b1a5665 Compare May 13, 2024 08:41
@randmonkey randmonkey marked this pull request as ready for review May 13, 2024 08:45
@randmonkey randmonkey requested a review from a team as a code owner May 13, 2024 08:45
@randmonkey randmonkey added area/CRD Changes in existing CRDs or introduction of new ones area/admission labels May 13, 2024
Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 52.3%. Comparing base (d8c30ad) to head (aeadb93).
Report is 3 commits behind head on main.

❗ Current head aeadb93 differs from pull request most recent head 0886d34. Consider uploading reports for the commit 0886d34 to get more accurate results

Files Patch % Lines
internal/admission/handler.go 0.0% 11 Missing ⚠️
internal/admission/validator.go 70.3% 5 Missing and 3 partials ⚠️
internal/dataplane/kongstate/customentity.go 79.3% 3 Missing and 3 partials ⚠️
internal/admission/adminapi_provider.go 0.0% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #6006      +/-   ##
========================================
- Coverage   74.0%   52.3%   -21.7%     
========================================
  Files        182     183       +1     
  Lines      18345   18417      +72     
========================================
- Hits       13582    9644    -3938     
- Misses      3825    8138    +4313     
+ Partials     938     635     -303     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@randmonkey randmonkey force-pushed the feat/kong_custom_entity_schema_and_validate branch from aeadb93 to cceb10b Compare May 14, 2024 09:27
@randmonkey randmonkey force-pushed the feat/kong_custom_entity_schema_and_validate branch from cceb10b to 01b0dff Compare May 14, 2024 09:32
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Show resolved Hide resolved
internal/dataplane/kongstate/customentity.go Outdated Show resolved Hide resolved
@randmonkey randmonkey force-pushed the feat/kong_custom_entity_schema_and_validate branch from 0886d34 to 827f534 Compare May 15, 2024 06:24
@randmonkey randmonkey requested a review from rainest May 15, 2024 06:39
@rainest rainest merged commit adf1cc5 into main May 15, 2024
36 checks passed
@rainest rainest deleted the feat/kong_custom_entity_schema_and_validate branch May 15, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admission area/CRD Changes in existing CRDs or introduction of new ones size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store schema of custom entity and validate KongCustomEntity against Kong gateway
2 participants