@@ -152,7 +152,7 @@ func (c *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Reque
152152 err = c .createOrUpdate (c .scc , func () error {
153153 // TODO: this is a hack to preserve the resourceVersion of the SCC
154154 resourceVersion := c .scc .ResourceVersion
155- csi .GetSecurityContextConstraints (c .OperatorNamespace ). DeepCopyInto ( c . scc )
155+ csi .SetSecurityContextConstraintsDesiredState (c .scc , c . OperatorNamespace )
156156 c .scc .ResourceVersion = resourceVersion
157157 return nil
158158 })
@@ -210,10 +210,10 @@ func (c *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Reque
210210 },
211211 }
212212 err = c .createOrUpdate (c .cephFSDeployment , func () error {
213- csi .GetCephFSDeployment (c .OperatorNamespace ).DeepCopyInto (c .cephFSDeployment )
214213 if err := c .own (c .cephFSDeployment ); err != nil {
215214 return err
216215 }
216+ csi .SetCephFSDeploymentDesiredState (c .cephFSDeployment )
217217 return nil
218218 })
219219 if err != nil {
@@ -223,15 +223,15 @@ func (c *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Reque
223223
224224 c .cephFSDaemonSet = & appsv1.DaemonSet {
225225 ObjectMeta : metav1.ObjectMeta {
226- Name : csi .CephFSDamonSetName ,
226+ Name : csi .CephFSDaemonSetName ,
227227 Namespace : c .OperatorNamespace ,
228228 },
229229 }
230230 err = c .createOrUpdate (c .cephFSDaemonSet , func () error {
231- csi .GetCephFSDaemonSet (c .OperatorNamespace ).DeepCopyInto (c .cephFSDaemonSet )
232231 if err := c .own (c .cephFSDaemonSet ); err != nil {
233232 return err
234233 }
234+ csi .SetCephFSDaemonSetDesiredState (c .cephFSDaemonSet )
235235 return nil
236236 })
237237 if err != nil {
@@ -246,10 +246,10 @@ func (c *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Reque
246246 },
247247 }
248248 err = c .createOrUpdate (c .rbdDeployment , func () error {
249- csi .GetRBDDeployment (c .OperatorNamespace ).DeepCopyInto (c .rbdDeployment )
250249 if err := c .own (c .rbdDeployment ); err != nil {
251250 return err
252251 }
252+ csi .SetRBDDeploymentDesiredState (c .rbdDeployment )
253253 return nil
254254 })
255255 if err != nil {
@@ -264,10 +264,10 @@ func (c *ClusterVersionReconciler) Reconcile(ctx context.Context, req ctrl.Reque
264264 },
265265 }
266266 err = c .createOrUpdate (c .rbdDaemonSet , func () error {
267- csi .GetRBDDaemonSet (c .OperatorNamespace ).DeepCopyInto (c .rbdDaemonSet )
268267 if err := c .own (c .rbdDaemonSet ); err != nil {
269268 return err
270269 }
270+ csi .SetRBDDaemonSetDesiredState (c .rbdDaemonSet )
271271 return nil
272272 })
273273 if err != nil {
0 commit comments