add CEL validation for BackendRef Group#3557
Conversation
* 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]>
…urce Signed-off-by: phantooom <[email protected]>
Signed-off-by: phantooom <[email protected]>
| // +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 == '')" |
There was a problem hiding this comment.
f.group == '' is this correct ?
There was a problem hiding this comment.
https://github.com/kubernetes/api/blob/master/core/v1/register.go#L26
core api group is '' . it may works.
There was a problem hiding this comment.
core is invalid. core api has no group. so only group=='' is valid.
Correct me . if I'm wrong,thx~
There was a problem hiding this comment.
I found some usage about group: core in mesh and gep-709, @arkodg anything recall?
There was a problem hiding this comment.
Signed-off-by: phantooom <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
| // If unspecified, will send default format to stdout. | ||
| // +optional | ||
| // +kubebuilder:validation:MinItems=1 | ||
| // +kubebuilder:validation:MaxItems=50 |
There was a problem hiding this comment.
i add maxItems. if not do this cel estimation will timeout.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #3468