Skip to content

add CEL validation for BackendRef Group#3557

Merged
zirain merged 10 commits intoenvoyproxy:mainfrom
phantooom:rui.zou/add-cel-valid
Jun 18, 2024
Merged

add CEL validation for BackendRef Group#3557
zirain merged 10 commits intoenvoyproxy:mainfrom
phantooom:rui.zou/add-cel-valid

Conversation

@phantooom
Copy link
Copy Markdown
Contributor

What type of PR is this?

  • "add CEL validation for BackendRef Group"

Which issue(s) this PR fixes:
Fixes #3468

shawnh2 and others added 4 commits June 6, 2024 13:33
* initial dashboard addon helm chart

Signed-off-by: shawnh2 <[email protected]>

* rename addon name and remove gateway-helm support

Signed-off-by: shawnh2 <[email protected]>

* remove /charts from .helmignore

Signed-off-by: shawnh2 <[email protected]>

* rename to gateway-addons-helm and keep one source of truth

Signed-off-by: shawnh2 <[email protected]>

* restore examples values and fix comments

Signed-off-by: shawnh2 <[email protected]>

* rewrite helm makefile

Signed-off-by: shawnh2 <[email protected]>

---------

Signed-off-by: shawnh2 <[email protected]>
Signed-off-by: phantooom <[email protected]>
@phantooom phantooom requested a review from a team as a code owner June 6, 2024 12:02
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1
// +kubebuilder:validation:XValidation:message="BackendRefs only supports Service kind.",rule="self.all(f, f.kind == 'Service')"
// +kubebuilder:validation:XValidation:message="BackendRefs only supports Core group.",rule="self.all(f, f.group == '')"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f.group == '' is this correct ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core is also valid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core is invalid. core api has no group. so only group=='' is valid.

Correct me . if I'm wrong,thx~

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some usage about group: core in mesh and gep-709, @arkodg anything recall?

Copy link
Copy Markdown
Contributor

@arkodg arkodg Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phantooom phantooom changed the title add CEL validation for BackendRef Group WIP: add CEL validation for BackendRef Group Jun 6, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.30%. Comparing base (821916f) to head (f6a3c9c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3557      +/-   ##
==========================================
+ Coverage   68.27%   68.30%   +0.03%     
==========================================
  Files         169      169              
  Lines       20646    20646              
==========================================
+ Hits        14096    14103       +7     
+ Misses       5529     5522       -7     
  Partials     1021     1021              

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

// If unspecified, will send default format to stdout.
// +optional
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=50
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i add maxItems. if not do this cel estimation will timeout.

@phantooom phantooom changed the title WIP: add CEL validation for BackendRef Group add CEL validation for BackendRef Group Jun 6, 2024
@phantooom phantooom requested a review from shawnh2 June 6, 2024 15:43
@phantooom phantooom requested a review from zirain June 7, 2024 02:45
@zirain zirain merged commit 94f818c into envoyproxy:main Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add CEL validation for BackendRef Group

4 participants