-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: questions-ui.yml missing latest configuration. #29
Conversation
8a22b27
to
aae18ce
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.
LGTM
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.
I added suggestion for info message (ignore if you prefer yours), but I found an issue:
- I create policy initially with some values
- I edit policy and select
Ignore values
UI does not clean hidden inputs when I select checkbox, so it produces yaml:
settings:
cpu:
ignoreValues: true
memory:
defaultLimit: '100'
defaultRequest: '100'
ignoreValues: true
maxLimit: '100'
Which results in Values cannot be true when any quantities are defined
error:
2024-04-11T18:54:06.256680Z INFO validate_settings{self=PolicyEvaluator { runtime: "wapc" } settings={"allowedHostPaths": Array [Object {"pathPrefix": String("/tmp"), "readOnly": Bool(true)}]}}:policy_log{self=EvaluationContext { policy_id: "clusterwide-do-not-share-host-paths", callback_channel: Some(...), allowed_kubernetes_resources: {} }}: policy_log: accepting settings data={}
Error: [clusterwide-crs] settings are not valid: Some("Provided settings are not valid: invalid memory settings\nignoreValues cannot be true when any quantities are defined")
f622788
to
a0daa6d
Compare
a0daa6d
to
27fd371
Compare
I set both CPU & Memory to ignoreValues and I can still create pod without requests section.
I found this in kubernetes doc:
It's a bit misleading considering that in README we say Otherwise it works fine. |
6cae077
to
67dfc50
Compare
The questions-ui.yml file is missing the latest configuration added: ignoreValues. This commits adds this new field in the file. As well as, configures the other fields to be hidden when user sets ignoreValue to false. Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Updates the README.md file mentioning that other admission controller could mutate the request before the policy. Which can leads to confusing result like a resource that looks first invalid get being accepted by the policy due a previous mutation fixing the resource. Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
67dfc50
to
84a923c
Compare
Yeah, this can be misleading indeed. To help clarify that, I've added a note in the README to explain to the user that others controllers (e.g. kubernetes ones) can be mutating the resource before the policy. Which is the case that you reported. I decided to not change the original sentence that you highlighted because that will happen depending of the admission controller configuration. Are you fine with that change? |
Description
The questions-ui.yml file is missing the latest configuration added: ignoreValues. This commits adds this new field in the file. As well as, configures the other fields to be hidden when user sets ignoreValue to false.