-
Notifications
You must be signed in to change notification settings - Fork 486
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(kgo): added ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding for validating DataPlane ports #1215
base: main
Are you sure you want to change the base?
Conversation
1dff7d3
to
22a6133
Compare
Wait for #1216 to add chartsnap validation. |
…icyBinding for validating DataPlane ports
22a6133
to
fe6aad1
Compare
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.
One thing I'm worried about is that we end up with the logic responsible for validating objects (we have CEL rules defined on CRDs in KCFG and now ValidatingAdmissionPolicy/Binding
here) scattered over different places.
What do you think about defining these in KCFG, e.g. in a separate directory under config/validation/gateway-operator
? That would allow testing them using the same test machinery we use for CRDs there and we would have a single place to live for the validation logic. We could "import" them in charts the same way we do with CRDs - copy them over to charts/gateway-operator/charts/gateway-operator-validation
. One thing that is not clear to me is whether we could make the installation of a subchart depend on the capabilities like you did. Edit: We could have a dedicated script in charts/gateway-operator/scripts
that would do the copying and adding conditional on capabilities to every file.
Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
I share this concern.
That would be nice to put in kcfg which is a dedicated repo ATM for these things. I'm worried this will make the workflow here unnecessarily complicated and error prone 🤔 The subcharts approach seems to me quite problematic to update and maintain but perhaps the reason for this is not enough automation on our side. The problem I see with using kcfg is that we might not want to create numerous releases in that repo which then would create unnecessary dependency updates in other repositories (and also be user facing) I'm happy to discuss this further as I believe the approach you proposed has advantages.
That I believe would not be possible as according to https://helm.sh/docs/topics/charts/#the-chartyaml-file the |
As agreed on slack: we keep the definition of policies for now both in charts and in KGO repositories. When we decide to move the charts internals (the releases would remain in Waiting on this one to get a final review in Kong/gateway-operator#1007. |
What this PR does / why we need it:
Move
DataPlane
ports validation toValidatingAdmissionPolicy
.Testing of these rules remains an aspect to tackle.
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
main
branch.