remove LastAppliedConfig annotation after password encrypted

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-07-31 23:57:42 +08:00
parent 2c2f01d018
commit 6acea75a76

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,