Skip to content

Commit bb08087

Browse files
authored
Merge branch 'main' into better-status-condition
2 parents 52fad45 + dddc9e2 commit bb08087

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

internal/controller/user/reconcile.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,16 @@ func (r *S3UserReconciler) handleUpdate(
446446
s3v1alpha1.Reconciling,
447447
fmt.Sprintf("The user %s will be deleted from the S3 backend, then recreated (through another reconcile), the secret %s will be kept.", userResource.Name, currentUserSecret.Name))
448448

449+
450+
}
451+
} else {
452+
logger.Info(
453+
"The user will be deleted from the S3 backend, then recreated (through another reconcile), the secret will be kept.",
454+
"userResource",
455+
userResource.Name,
456+
"NamespacedName",
457+
req.NamespacedName.String(),
458+
)
449459
}
450460

451461
err = s3Client.DeleteUser(userResource.Spec.AccessKey)
@@ -644,6 +654,7 @@ func (r *S3UserReconciler) handleCreate(
644654
if r.OverrideExistingSecret || r.ReadExistingSecret {
645655
if r.ReadExistingSecret {
646656
// Case 3.2a : read existing secret instead of updating it
657+
647658
r.SetProgressingCondition(ctx,
648659
req,
649660
userResource,

internal/controller/user/reconcile_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ func TestHandleUpdate(t *testing.T) {
400400
Name: "existing-valid-user",
401401
}, s3UserResourceUpdated)
402402
assert.NoError(t, err)
403+
403404
var conditions = s3UserResourceUpdated.Status.Conditions
404405
var lastCondition = conditions[len(conditions) - 1]
405406
assert.Equal(t, s3v1alpha1.Reconciled, lastCondition.Reason)

0 commit comments

Comments
 (0)