Skip to content

Commit 1efdba0

Browse files
committed
Make isProgressing a simple function
1 parent ef98c7d commit 1efdba0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/operator/csi/csidrivernodeservicecontroller/csi_driver_node_service_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (c *CSIDriverNodeServiceController) syncManaged(ctx context.Context, opSpec
223223
WithMessage("DaemonSet is not progressing").
224224
WithReason("AsExpected")
225225

226-
if ok, msg := c.isProgressing(daemonSet); ok {
226+
if ok, msg := isProgressing(daemonSet); ok {
227227
progressingCondition = progressingCondition.
228228
WithStatus(opv1.ConditionTrue).
229229
WithMessage(msg).
@@ -259,7 +259,7 @@ func (c *CSIDriverNodeServiceController) getDaemonSet(opSpec *opv1.OperatorSpec)
259259
return required, nil
260260
}
261261

262-
func (c *CSIDriverNodeServiceController) isProgressing(daemonSet *appsv1.DaemonSet) (bool, string) {
262+
func isProgressing(daemonSet *appsv1.DaemonSet) (bool, string) {
263263
// Progressing means "[the component] is actively rolling out new code, propagating config
264264
// changes (e.g, a version change), or otherwise moving from one steady state to another."
265265
// This controller expects that all "config changes" result in increased DaemonSet generation
@@ -344,7 +344,7 @@ func (c *CSIDriverNodeServiceController) storeLastStableGeneration(ctx context.C
344344
return daemonSet, nil
345345
}
346346

347-
if isProgressing, _ := c.isProgressing(daemonSet); isProgressing {
347+
if isProgressing, _ := isProgressing(daemonSet); isProgressing {
348348
return daemonSet, nil
349349
}
350350

0 commit comments

Comments
 (0)