Closed erikgb closed 3 months ago
Thanks for the PR! Would it be difficult to add tests for this feature?
I thought about tests when preparing the PR, and I think it's a bit more difficult than usual. But I agree there should ideally be tests for everything and will take another look!
I have now added some initial tests to this feature. Please let me know if more detailed testing is required.
@erikgb Thanks!
This PR adds more validation of configuration on startup. The operator must have cluster-wide RBAC to CRUD all configured watches to function as intended by the user. At startup, we will now use SelfSubjectAccessReview to check the required RBAC for all configured watches and crash if anything is missing.
Note: After migrating to SSA, we no longer need the
update
verb. I included this minor change in this PR, but please let me know if a dedicated PR is required.Close https://github.com/cybozu-go/accurate/issues/102