fix: surface reconcileUsersAcl errors in cluster status#140
Conversation
b0df181 to
6a7b182
Compare
|
I considered failing soft (skip the user, set a However, the And the warning event fires every reconcile cycle unless you add dedup logic, but the above problem persists. The hard error is simpler and keeps the problem visible. Any input here is welcome! |
6a7b182 to
bd86d50
Compare
|
@daanvinken I ran CI checks, would you be able to take a look at those that have failed please? |
reconcileUsersAcl silently skipped users with missing password secrets and returned nil, causing the cluster to report Ready with incomplete ACLs. Return an error instead so the cluster status reflects the misconfiguration. Also add the missing updateStatus call on the reconcileUsersAcl error path so the condition is persisted to the API server. Skip password lookup for disabled users since they don't need credentials. Signed-off-by: Daan Vinken <daanvinken@tythus.com>
bd86d50 to
ff0ab55
Compare
|
Yeah should be good now! |
This PR closes #139
Summary
When a user in
spec.usersreferences a password secret that doesn't exist,reconcileUsersAcllogs an error but skips the user and returns nil. The ACL file is written without that user, and the cluster reports Ready. I think it makes sense to fail hard.Additionally, when
reconcileUsersAcldoes return an error (e.g. internal secret creation fails), the condition is set butupdateStatusis never called here, so the error isn't persisted to the status either.Implementation
users.go: replacecontinuewithreturn fmt.Errorf(...)whenfetchUserPasswordsfailsvalkeycluster_controller.go: add missingupdateStatuscall on thereconcileUsersAclerror pathTesting
Before the fix, a missing password secret is invisible:
After the fix:
Limitations
None.
Checklist
pre-commit run --all-filesor hooks on commit)