From 8c0fe8162c6ec3c5458978e99701523801055667 Mon Sep 17 00:00:00 2001 From: Bryce Palmer Date: Wed, 18 Mar 2026 09:13:56 -0400 Subject: [PATCH] tools: manifestmerge: update CRD schema to use atomic x-kubernetes-validations Signed-off-by: Bryce Palmer --- .../machines.machine.openshift.io/MachineAPIMigration.yaml | 2 ++ .../MachineAPIMigration.yaml | 2 ++ tools/codegen/pkg/manifestmerge/crd-schema.json | 7 +------ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/machine/v1beta1/manual-override-crd-manifests/machines.machine.openshift.io/MachineAPIMigration.yaml b/machine/v1beta1/manual-override-crd-manifests/machines.machine.openshift.io/MachineAPIMigration.yaml index f0ca33e37a3..bc2f39aaf95 100644 --- a/machine/v1beta1/manual-override-crd-manifests/machines.machine.openshift.io/MachineAPIMigration.yaml +++ b/machine/v1beta1/manual-override-crd-manifests/machines.machine.openshift.io/MachineAPIMigration.yaml @@ -21,3 +21,5 @@ spec: && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == ''Migrating'' && self.authoritativeAPI != ''Migrating'')' + - message: authoritativeAPI may not be removed once set + rule: has(self.authoritativeAPI) || !has(oldSelf.authoritativeAPI) diff --git a/machine/v1beta1/manual-override-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml b/machine/v1beta1/manual-override-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml index 2f78133cba3..8cd4700d7f7 100644 --- a/machine/v1beta1/manual-override-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml +++ b/machine/v1beta1/manual-override-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml @@ -21,3 +21,5 @@ spec: && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == ''Migrating'' && self.authoritativeAPI != ''Migrating'')' + - message: authoritativeAPI may not be removed once set + rule: has(self.authoritativeAPI) || !has(oldSelf.authoritativeAPI) diff --git a/tools/codegen/pkg/manifestmerge/crd-schema.json b/tools/codegen/pkg/manifestmerge/crd-schema.json index 0fe236e86aa..03a3d3ce832 100644 --- a/tools/codegen/pkg/manifestmerge/crd-schema.json +++ b/tools/codegen/pkg/manifestmerge/crd-schema.json @@ -727,12 +727,7 @@ "default": {} }, "type": "array", - "x-kubernetes-list-map-keys": [ - "rule" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "rule", - "x-kubernetes-patch-strategy": "merge" + "x-kubernetes-list-type": "atomic" } }, "type": "object"