-
Notifications
You must be signed in to change notification settings - Fork 6
Implements User controller #368
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
base: main
Are you sure you want to change the base?
Conversation
return fmt.Errorf("failed to remove effective BMCSecret: %w", err) | ||
} | ||
// Update the BMC account with the new password | ||
if err := bmcClient.CreateOrUpdateAccount(ctx, user.Spec.UserName, user.Spec.RoleID, password, r.Insecure); err != nil { |
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.
Don't we loose the reference to the password, if this call fails? I would propose to not remove the effective secret ref. Instead at the start of the reconciliation try to log in with the effective secret ref and if that fails try .spec.secretRef
(if different). In case the second log in call succeeds, I would patch the effective secret ref.
Proposed Changes
Implement User controller which handles the creation of user accounts in a bmc