-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
ValidatingAdmissionPolicy: typed variables support. #121001
ValidatingAdmissionPolicy: typed variables support. #121001
Conversation
3a4ace7
to
8b80ca6
Compare
/triage accepted |
8b80ca6
to
49cfb3d
Compare
/test pull-kubernetes-e2e-kind-alpha-features |
/lgtm /assign @jpbetz |
LGTM label has been added. Git tree hash: 129b1eb867fe8f68be59182ee8cd87017996bac3
|
@@ -196,3 +197,39 @@ func (a *variableAccessor) Callback(_ *lazy.MapValue) ref.Val { | |||
} | |||
return v | |||
} | |||
|
|||
func convertCelTypeToDeclType(celType *cel.Type) *apiservercel.DeclType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to capture type params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is! Added support for type params.
However, note that the object is still Dyn so any access to its field remains Dyn.
49cfb3d
to
826b44b
Compare
826b44b
to
c03579b
Compare
/lgtm |
LGTM label has been added. Git tree hash: fb4efbe54eb715c28baeac3ce410efd4412caf5d
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cici37, jiahuif, jpbetz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jiahuif Would you open the cherry pick for this one as well? Thank you! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds tracking of the type of each compiled composition variable for further compilation in following variables and validation expressions.
Which issue(s) this PR fixes:
Fixes #120239
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: