Merge pull request #2730 from wansir/iam

remove LastAppliedConfig annotation after password encrypted
This commit is contained in:
KubeSphere CI Bot
2020-08-03 13:02:52 +08:00
committed by GitHub

View File

@@ -367,6 +367,8 @@ func (c *Controller) ensurePasswordIsEncrypted(user *iamv1alpha2.User) (*iamv1al
if user.Annotations == nil {
user.Annotations = make(map[string]string, 0)
}
// ensure plain text password won't be kept anywhere
delete(user.Annotations, corev1.LastAppliedConfigAnnotation)
user.Annotations[iamv1alpha2.PasswordEncryptedAnnotation] = "true"
user.Status = iamv1alpha2.UserStatus{
State: iamv1alpha2.UserActive,