Skip to content

Commit e9d7299

Browse files
committed
CLOUDP-321083: fix reconciliation loop on dbuser
In 140ba21 I added the ability to set a description on AtlasDatabaseUser. However, I overlooked that a description could already exist on the user in Atlas, in which case the operator will fetch it, realize it's different, and then... omit the change, because `omitempty` is set on the struct field. With this patch we send an empty string instead.
1 parent 56fa397 commit e9d7299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/translation/dbuser/conversion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func toAtlas(au *User) (*admin.CloudDatabaseUser, error) {
156156
X509Type: pointer.MakePtrOrNil(au.X509Type),
157157
AwsIAMType: pointer.MakePtrOrNil(au.AWSIAMType),
158158
GroupId: au.ProjectID,
159-
Description: pointer.MakePtrOrNil(au.Description),
159+
Description: pointer.MakePtr(au.Description),
160160
Labels: labelsToAtlas(au.Labels),
161161
Roles: rolesToAtlas(au.Roles),
162162
Scopes: scopesToAtlas(au.Scopes),

0 commit comments

Comments
 (0)