Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit 03c6609

Browse files
authored
🐞 fix(controller):update deployment or daemonset error (#158)
Authored-by: lintong.sun <lintong.sun@cloudminds.com>
1 parent 3a61229 commit 03c6609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/nginxingresscontroller_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (r *NginxIngressControllerReconciler) Reconcile(ctx context.Context, req ct
164164
} else if err != nil {
165165
log.Error(err, "Failed to get Deployment")
166166
return ctrl.Result{}, err
167-
} else if hasDeploymentChanged(dep, instance) {
167+
} else if hasDeploymentChanged(found, instance) {
168168
log.Info("NginxIngressController spec has changed, updating Deployment")
169169
updated := updateDeployment(found, instance)
170170
err = r.Update(ctx, updated)
@@ -198,7 +198,7 @@ func (r *NginxIngressControllerReconciler) Reconcile(ctx context.Context, req ct
198198
}
199199
} else if err != nil {
200200
return ctrl.Result{}, err
201-
} else if hasDaemonSetChanged(ds, instance) {
201+
} else if hasDaemonSetChanged(found, instance) {
202202
log.Info("NginxIngressController spec has changed, updating DaemonSet")
203203
updated := updateDaemonSet(found, instance)
204204
err = r.Update(ctx, updated)

0 commit comments

Comments
 (0)