Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Fix machine CRD application
Browse files Browse the repository at this point in the history
```improvement developer
A bug in the `worker` controller's utility function for applying the machine CRDs has been fixed.
```
  • Loading branch information
rfranzke committed Apr 7, 2020
1 parent 7933cad commit d910022
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/worker/machine_crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,12 @@ func ApplyMachineResources(ctx context.Context, c client.Client) error {
Name: crd.Name,
},
}
spec := crd.Spec.DeepCopy()

fns = append(fns, func(ctx context.Context) error {
_, err := controllerutil.CreateOrUpdate(ctx, c, obj, func() error {
obj.Labels = utils.MergeStringMaps(obj.Labels, deletionProtectionLabels)
obj.Spec = crd.Spec
obj.Spec = *spec
return nil
})
return err
Expand Down

0 comments on commit d910022

Please sign in to comment.