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

feat: add validation on secrets on generated plugin cofigs #5203

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Nov 20, 2023

What this PR does / why we need it:

validates secrets when they are referred by KongPlugin and KongClusterPlugin to check if they generate invalid Kong plugin configurations.

Which issue this PR fixes:

fixes #5190

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 requested a review from a team as a code owner November 20, 2023 09:30
@randmonkey randmonkey marked this pull request as draft November 20, 2023 09:30
@randmonkey randmonkey changed the title feat: add validation on secrets on generated plugin cofigs [WIP]feat: add validation on secrets on generated plugin cofigs Nov 20, 2023
@randmonkey randmonkey added the work in progress Work In Progress label Nov 20, 2023
@randmonkey randmonkey self-assigned this Nov 20, 2023
@randmonkey randmonkey added this to the KIC v3.1.x milestone Nov 20, 2023
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (a4f82f6) 75.9% compared to head (f651698) 75.8%.

Files Patch % Lines
internal/admission/handler.go 67.9% 13 Missing and 4 partials ⚠️
internal/controllers/reference/indexer.go 55.5% 8 Missing and 4 partials ⚠️
internal/manager/run.go 66.6% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5203     +/-   ##
=======================================
- Coverage   75.9%   75.8%   -0.1%     
=======================================
  Files        170     170             
  Lines      19447   19549    +102     
=======================================
+ Hits       14767   14837     +70     
- Misses      3851    3872     +21     
- Partials     829     840     +11     

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

@randmonkey randmonkey force-pushed the feat/validate_secrets_for_plugin_config branch 2 times, most recently from f570320 to ab828ad Compare November 30, 2023 07:51
@randmonkey randmonkey force-pushed the feat/validate_secrets_for_plugin_config branch 2 times, most recently from 0c6c452 to 0093f43 Compare December 1, 2023 11:49
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Dec 1, 2023
@randmonkey randmonkey force-pushed the feat/validate_secrets_for_plugin_config branch 2 times, most recently from 9dabe64 to 8134757 Compare December 4, 2023 07:47
@randmonkey randmonkey added area/admission area/feature New feature or request and removed size/XL work in progress Work In Progress labels Dec 4, 2023
@randmonkey randmonkey marked this pull request as ready for review December 4, 2023 07:54
@randmonkey randmonkey changed the title [WIP]feat: add validation on secrets on generated plugin cofigs feat: add validation on secrets on generated plugin cofigs Dec 4, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/handler.go Outdated Show resolved Hide resolved
internal/admission/handler.go Outdated Show resolved Hide resolved
internal/admission/handler.go Outdated Show resolved Hide resolved
@randmonkey randmonkey force-pushed the feat/validate_secrets_for_plugin_config branch from 8134757 to 6a92fa8 Compare December 7, 2023 06:29
@randmonkey randmonkey force-pushed the feat/validate_secrets_for_plugin_config branch from 6a92fa8 to f651698 Compare December 8, 2023 02:23
@randmonkey randmonkey merged commit 8ae1750 into main Dec 11, 2023
37 checks passed
@randmonkey randmonkey deleted the feat/validate_secrets_for_plugin_config branch December 11, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run validation on secrets if it is used for plugin config to prevent dataplane stuck
2 participants