Skip to content

Commit 4141a69

Browse files
authored
ACM-8593: Update ignition token on refresh (#91)
The call to Update was replaced by ensureSecretLabel in commit 83908f2. This introduces a bug because ensureSecretLabel calls Update only if a label doesn't already exist, whereas we need to call it every time.
1 parent a55a6c0 commit 4141a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/agentmachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func (r *AgentMachineReconciler) processBootstrapDataSecret(ctx context.Context,
500500
if apierrors.IsAlreadyExists(err) {
501501
log.Infof("ignitionTokenSecret %s already exists, updating secret content",
502502
fmt.Sprintf("agent-%s", *machine.Spec.Bootstrap.DataSecretName))
503-
err = ensureSecretLabel(ctx, r.Client, ignitionTokenSecret)
503+
err = r.Client.Update(ctx, ignitionTokenSecret)
504504
}
505505
if err != nil {
506506
log.WithError(err).Error("Failed to create ignitionTokenSecret")

0 commit comments

Comments
 (0)