fix: Set debug level for "getting system users secret" output - #330
Conversation
Signed-off-by: Nicolai Antiferov <nicolai.antiferov@bolt.eu>
|
| Filename | Overview |
|---|---|
| internal/controller/users.go | Log verbosity for 'getting system users secret' demoted from Info (V(0)) to Debug (V(1)), consistent with the rest of the file's logging conventions. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[reconcileUsersAcl] --> B[createSystemUsersAcl]
B --> C{"log.V(1).Info\n'getting system users secret'"}
C -->|"V(1) — debug only\n--zap-log-level=debug"| D[r.Get system password secret]
D -->|Found| E[validateSystemUserPasswordSecret]
D -->|NotFound| F[upsertSystemUsersPasswordSecret]
F --> E
E -->|Valid| G[Build ACL strings per system user]
E -->|errMissingSystemUser| F
E -->|errUnknownSystemUser| H[log.Error — always visible]
G --> I[Return ACL string]
Reviews (1): Last reviewed commit: "fix: Set debug level for "getting system..." | Re-trigger Greptile
|
Thanks! |
This PR closes #328
Summary
This PR sets proper log level for the "getting system users secret" message from
internal/controller/users.go, which repeats on every reconcile loop, added in #129Features / Behaviour Changes
"getting system users secret" message will be shown only if operator started with "--zap-log-level=debug"
Implementation
As sigs.k8s.io/controller-runtime/pkg/log doesn't have method for
log.Debug,log.V(1).Info()used instead, like in other parts of operator.Limitations
No
Testing
No testing required I think.
Checklist
Before submitting the PR make sure the following are checked:
pre-commit run --all-filesor hooks on commit)Recreated PR due to malformed branch name in #329