Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit d83836c

Browse files
committed
refactor: use Patch instead of Update to update a config
1 parent 166cae2 commit d83836c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/kubeadmconfig_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ func (r *KubeadmConfigReconciler) Reconcile(req ctrl.Request) (ctrl.Result, erro
271271

272272
config.Status.BootstrapData = joinData
273273
config.Status.Ready = true
274-
if err := r.Update(ctx, &config); err != nil {
275-
log.Error(err, "failed to update config")
274+
if err := r.patchConfig(ctx, &config, patchConfig); err != nil {
275+
log.Error(err, "failed to patch config")
276276
return ctrl.Result{}, err
277277
}
278278
return ctrl.Result{}, nil

0 commit comments

Comments
 (0)