Skip to content

Commit 06e7b70

Browse files
Merge pull request #5332 from djoshy/add-cpms-support
MCO-1807: Add CPMS support in the MCO's boot image controller
2 parents af8b81d + 09b1528 commit 06e7b70

File tree

66 files changed

+5505
-5408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5505
-5408
lines changed

cmd/machine-config-controller/start.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ func runStartCmd(_ *cobra.Command, _ []string) {
134134
ctrlctx.ClientBuilder.MachineClientOrDie("machine-set-boot-image-controller"),
135135
ctrlctx.KubeNamespacedInformerFactory.Core().V1().ConfigMaps(),
136136
ctrlctx.MachineInformerFactory.Machine().V1beta1().MachineSets(),
137+
ctrlctx.MachineInformerFactory.Machine().V1().ControlPlaneMachineSets(),
137138
ctrlctx.ConfigInformerFactory.Config().V1().Infrastructures(),
138139
ctrlctx.ClientBuilder.OperatorClientOrDie(componentName),
139140
ctrlctx.OperatorInformerFactory.Operator().V1().MachineConfigurations(),

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ require (
3535
github.com/onsi/gomega v1.36.2
3636
github.com/opencontainers/go-digest v1.0.0
3737
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250722101414-8083129ab8f9
38-
github.com/openshift/api v0.0.0-20250911131931-2acafd4d1ed2
38+
github.com/openshift/api v0.0.0-20251013165757-fe48e8fd548b
3939
github.com/openshift/client-go v0.0.0-20250911202206-1bc0cb0da03b
4040
github.com/openshift/library-go v0.0.0-20250911074910-e2c18d5abc3a
4141
github.com/openshift/runtime-utils v0.0.0-20230921210328-7bdb5b9c177b

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ github.com/opencontainers/selinux v1.12.0 h1:6n5JV4Cf+4y0KNXW48TLj5DwfXpvWlxXplU
595595
github.com/opencontainers/selinux v1.12.0/go.mod h1:BTPX+bjVbWGXw7ZZWUbdENt8w0htPSrlgOOysQaU62U=
596596
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250722101414-8083129ab8f9 h1:4ZeSM80DVCb5WWB3Q/fyCI9jYXAl9bfrGnFvFONqzN4=
597597
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250722101414-8083129ab8f9/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
598-
github.com/openshift/api v0.0.0-20250911131931-2acafd4d1ed2 h1:orbYgUTUMs2asHZhT792jeXlVzOqGFaGo8FbD9ihnsE=
599-
github.com/openshift/api v0.0.0-20250911131931-2acafd4d1ed2/go.mod h1:SPLf21TYPipzCO67BURkCfK6dcIIxx0oNRVWaOyRcXM=
598+
github.com/openshift/api v0.0.0-20251013165757-fe48e8fd548b h1:X18aj8dcvmGC9T7xiHHz3B9YRT4b5KiX/snG27cj9mc=
599+
github.com/openshift/api v0.0.0-20251013165757-fe48e8fd548b/go.mod h1:SPLf21TYPipzCO67BURkCfK6dcIIxx0oNRVWaOyRcXM=
600600
github.com/openshift/client-go v0.0.0-20250911202206-1bc0cb0da03b h1:VQpSjWE8jmsPj+EXB+XABTLmDgg9xtT8/fudB/31/aI=
601601
github.com/openshift/client-go v0.0.0-20250911202206-1bc0cb0da03b/go.mod h1:w7sV33ASK/HcuEb0Ll9qvChZdJwNwqo8GocVAnd7fVY=
602602
github.com/openshift/kubernetes v1.30.1-0.20250716113245-b94367cabf3e h1:M5BrUTglTltZjcRz5ouJBqSw0a60p760Bl520ndOGS0=

manifests/machineconfigcontroller/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rules:
3737
resources: ["daemonsets"]
3838
verbs: ["get"]
3939
- apiGroups: ["machine.openshift.io"]
40-
resources: ["machinesets","machines"]
40+
resources: ["machinesets","machines","controlplanemachinesets"]
4141
verbs: ["get", "list", "watch", "patch"]
4242
- apiGroups: ["operator.openshift.io"]
4343
resources: ["machineconfigurations/status"]

pkg/controller/machine-set-boot-image/cpms_helpers.go

Lines changed: 346 additions & 0 deletions
Large diffs are not rendered by default.

pkg/controller/machine-set-boot-image/machine_set_boot_image_controller.go

Lines changed: 120 additions & 22 deletions
Large diffs are not rendered by default.

pkg/controller/machine-set-boot-image/ms_helpers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
)
2525

2626
// syncMAPIMachineSets will attempt to enqueue every machineset
27+
// nolint:dupl // I separated this from syncControlPlaneMachineSets for readability
2728
func (ctrl *Controller) syncMAPIMachineSets(reason string) {
2829

2930
ctrl.mapiSyncMutex.Lock()

pkg/controller/machine-set-boot-image/platform_helpers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func checkMachineSet(infra *osconfigv1.Infrastructure, machineSet *machinev1beta
6262
}
6363

6464
// Generic reconcile function that handles the common pattern across all platforms
65+
// nolint:dupl // I separated this from reconcilePlatformCPMS for readability
6566
func reconcilePlatform[T any](
6667
machineSet *machinev1beta1.MachineSet,
6768
infra *osconfigv1.Infrastructure,

vendor/github.com/openshift/api/.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/.golangci.go-validated.yaml

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)