@@ -18,7 +18,7 @@ import (
18
18
"github.com/openshift/library-go/pkg/operator/resource/resourceread"
19
19
"github.com/openshift/library-go/pkg/operator/v1helpers"
20
20
21
- "github.com/openshift/cluster-image-registry-operator/bindata"
21
+ assets "github.com/openshift/cluster-image-registry-operator/bindata"
22
22
"github.com/openshift/cluster-image-registry-operator/pkg/defaults"
23
23
)
24
24
@@ -70,27 +70,26 @@ func (ds *generatorNodeCADaemonSet) Create() (runtime.Object, error) {
70
70
}
71
71
72
72
func (ds * generatorNodeCADaemonSet ) Update (o runtime.Object ) (runtime.Object , bool , error ) {
73
- daemonSet := ds .expected ()
73
+ desiredDaemonSet := ds .expected ()
74
74
75
75
_ , opStatus , _ , err := ds .operatorClient .GetOperatorState ()
76
76
if err != nil {
77
77
return nil , false , err
78
78
}
79
-
80
- dep , updated , err := resourceapply .ApplyDaemonSet (
79
+ actualDaemonSet , updated , err := resourceapply .ApplyDaemonSet (
81
80
context .TODO (),
82
81
ds .client ,
83
82
ds .recorder ,
84
- daemonSet ,
85
- resourcemerge .ExpectedDaemonSetGeneration (daemonSet , opStatus .Generations ),
83
+ desiredDaemonSet ,
84
+ resourcemerge .ExpectedDaemonSetGeneration (desiredDaemonSet , opStatus .Generations ),
86
85
)
87
86
if err != nil {
88
87
return o , updated , err
89
88
}
90
89
91
90
if updated {
92
91
updateStatusFn := func (newStatus * operatorv1.OperatorStatus ) error {
93
- resourcemerge .SetDaemonSetGeneration (& newStatus .Generations , daemonSet )
92
+ resourcemerge .SetDaemonSetGeneration (& newStatus .Generations , actualDaemonSet )
94
93
return nil
95
94
}
96
95
@@ -100,11 +99,11 @@ func (ds *generatorNodeCADaemonSet) Update(o runtime.Object) (runtime.Object, bo
100
99
updateStatusFn ,
101
100
)
102
101
if err != nil {
103
- return dep , updated , err
102
+ return actualDaemonSet , updated , err
104
103
}
105
104
}
106
105
107
- return dep , updated , nil
106
+ return actualDaemonSet , updated , nil
108
107
}
109
108
110
109
func (ds * generatorNodeCADaemonSet ) Delete (opts metav1.DeleteOptions ) error {
0 commit comments