Repository navigation
Fix validation logic for SecretOrConfigMap - #3413
s-urbaniak merged 2 commits into
Conversation
This was flagged by [golangci-lint](https://staticcheck.io/docs/checks#SA4022). The check was for the address of the pointer, not the value. Add a test (failing on master) to verify this, and fix the validation logic. Follow-up to prometheus-operator#2716. Signed-off-by: Matthias Rampke <[email protected]>
|
The main question I have is: how has this not become a problem so far? I feel like I am missing something about how all this works together; if I understood the bug correctly this should fail any and all TLS configs? |
|
Thanks a lot!
If I read the code correctly, it would only manifest if you've set |
|
aha, that partially explains why exactly those two e2e tests are failing now … |
|
@matthiasr great catch thank you 👍 |
|
I believe the |
When local filesystem access is denied, values from secrets and config maps can still be used. This is the desired behavior, as this is the way to get secrets into Prometheus without access to its filesystem. The tests gave the wrong result because validation of the TLS configuration would always fail, not because it actually attempted to access local files. Signed-off-by: Matthias Rampke <[email protected]>
|
LGTM on green. |
After prometheus-operator#3413, it appears that some of the sub-tests in `testPromArbitraryFSAcc` aren't useful because the outcome doesn't depend on the value of ArbitraryFSAccessThroughSMsConfig.Deny. In all cases, the test should succeed. Signed-off-by: Simon Pasquier <[email protected]>
After #3413, it appears that some of the sub-tests in `testPromArbitraryFSAcc` aren't useful because the outcome doesn't depend on the value of ArbitraryFSAccessThroughSMsConfig.Deny. In all cases, the test should succeed. Signed-off-by: Simon Pasquier <[email protected]>
This was flagged by
golangci-lint. The check
was for the address of the pointer, not the value. Add a test (failing
on master) to verify this, and fix the validation logic.
Follow-up to #2716.
Signed-off-by: Matthias Rampke [email protected]