-
Notifications
You must be signed in to change notification settings - Fork 33
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
PolicyServer
CRD is missing some validation
#1016
Comments
What are the advantages of doing this? |
Take the recent issue with the broken metadata inside of Sigstore's TUF repository. We had to do a patch release of PolicyServer, but we didn't have to touch the controller. However, I would prefer to have a constant defined somewhere clear inside of the source code, instead of injecting something at build time. It's less "magical", everything is clearly found when editing the source code (the IDE can bring you straight to the constant that defines the image of Policy Server to be used). The approach that relies on the |
Considering that we have statement that the patch versions are free from among the components of the stack (controller, kwctl, etc). I think adding the latest version in the controller code or injected maybe not the best solution. Otherwise, everytime we patch policy server, for any reason like a security issue, also means updating the controller. Witch remove the advantage of bumping the policy server independently. |
Ok good point.
This will not happen if we use the webhook defaulter. |
Cannot we have just a controller CLI flag with the default policy server version to be used in case the user miss to set it in the resource definition? We can even add another CLI flag to say "please, also upgrade to this version the running policy servers" |
Is there an existing issue for this?
Current Behavior
It's currently possible to create a
PolicyServer
resource that looks like that:This
PolicyServer
instance does not specify which image has to be used (spec.image
is omitted).The PolicyServer is created, but the controller will keep failing while trying to reconcile the
Deployment
resource associated with it:Expected Behavior
No response
Steps To Reproduce
PolicyServer
resource like the one described aboveThe
Deployment
associated to thisPolicyServer
is never created.Environment
- Any version of Kubewarden
Anything else?
We have to decide which approach we should take. I see two possible solutions:
spec.image
mandatory and reject the creation of thePolicyServer
resource if the mandatory fields. While we're at that, let's make sure all the mandatory fields are properly configuredspec.image
optional, let the controller fill the value using the latest stable release of the policy-server image.The first solution is the easiest one.
The second solution has some pros and cons:
kubewarden-controller
helm chartThe text was updated successfully, but these errors were encountered: