Skip to content

Commit

Permalink
enhancement: ambiguous function name of isSidecarSetNotUpdate (#1343)
Browse files Browse the repository at this point in the history
Signed-off-by: Colvin-Y <ykwhrimfaxi@gmail.com>
  • Loading branch information
Colvin-Y committed Jul 27, 2023
1 parent 4e35a1d commit d948587
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/sidecarset/sidecarset_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (p *Processor) UpdateSidecarSet(sidecarSet *appsv1alpha1.SidecarSet) (recon
}

// 4. SidecarSet upgrade strategy type is NotUpdate
if !isSidecarSetNotUpdate(sidecarSet) {
if isSidecarSetNotUpdate(sidecarSet) {
return reconcile.Result{}, nil
}

Expand Down Expand Up @@ -535,9 +535,9 @@ func calculateStatus(control sidecarcontrol.SidecarControl, pods []*corev1.Pod,
func isSidecarSetNotUpdate(s *appsv1alpha1.SidecarSet) bool {
if s.Spec.UpdateStrategy.Type == appsv1alpha1.NotUpdateSidecarSetStrategyType {
klog.V(3).Infof("sidecarSet spreading RollingUpdate config type, name: %s, type: %s", s.Name, s.Spec.UpdateStrategy.Type)
return false
return true
}
return true
return false
}

func updateContainerInPod(container corev1.Container, pod *corev1.Pod) {
Expand Down

0 comments on commit d948587

Please sign in to comment.