Skip to content

Commit

Permalink
Use exclusive system-upgrade-controller plans
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
  • Loading branch information
anmazzotti committed Oct 24, 2024
1 parent 2895237 commit bc854a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions controllers/managedosimage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ func (r *ManagedOSImageReconciler) newFleetBundleResources(ctx context.Context,
Tolerations: []corev1.Toleration{{
Operator: corev1.TolerationOpExists,
}},
Exclusive: true,
ServiceAccountName: uniqueName,
NodeSelector: selector,
Cordon: cordon,
Expand Down
4 changes: 2 additions & 2 deletions controllers/managedosimage_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var _ = Describe("newFleetBundleResources", func() {
Expect(bundleResources[1].Name).To(Equal("ClusterRoleBinding--os-upgrader-test-name-cc7ce4275b54.yaml"))
Expect(bundleResources[2].Name).To(Equal("ServiceAccount-cattle-system-os-upgrader-test-name-08929531f5c0.yaml"))
Expect(bundleResources[3].Name).To(Equal("Secret-cattle-system-os-upgrader-test-name-52e9d8e041f4.yaml"))
Expect(bundleResources[4].Name).To(Equal("Plan-cattle-system-os-upgrader-test-name-2663ce8e6968.yaml"))
Expect(bundleResources[4].Name).To(Equal("Plan-cattle-system-os-upgrader-test-name-6c067d188526.yaml"))
})

It("should create fleet bundle when managedOSVersion exists", func() {
Expand Down Expand Up @@ -170,7 +170,7 @@ var _ = Describe("newFleetBundleResources", func() {
Expect(bundleResources[1].Name).To(Equal("ClusterRoleBinding--os-upgrader-test-name-cc7ce4275b54.yaml"))
Expect(bundleResources[2].Name).To(Equal("ServiceAccount-cattle-system-os-upgrader-test-name-08929531f5c0.yaml"))
Expect(bundleResources[3].Name).To(Equal("Secret-cattle-system-os-upgrader-test-name-52e9d8e041f4.yaml"))
Expect(bundleResources[4].Name).To(Equal("Plan-cattle-system-os-upgrader-test-name-2663ce8e6968.yaml"))
Expect(bundleResources[4].Name).To(Equal("Plan-cattle-system-os-upgrader-test-name-6c067d188526.yaml"))
})
})

Expand Down

0 comments on commit bc854a6

Please sign in to comment.