From 479da1cf44738cf7d3a9aae986ed5014224a2033 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 12 Sep 2024 10:48:08 +0300 Subject: [PATCH] chore(core): add comments to prevent accidental adding status subresource Some resources for KubeVirt and CDI store status field as "main" fields, not as a subresource. Set status to subresource will break update operation for these resources. Signed-off-by: Ivan Mikheykin --- crds/embedded/cdi.yaml | 5 +++++ crds/embedded/virtualmachineinstances.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/crds/embedded/cdi.yaml b/crds/embedded/cdi.yaml index 8057b6554..7b47d2e1c 100644 --- a/crds/embedded/cdi.yaml +++ b/crds/embedded/cdi.yaml @@ -2320,3 +2320,8 @@ spec: served: true storage: true subresources: {} +# IMPORTANT! Do not add status subresource, as it breaks the status update +# in CDI components. +# Delete this precaution when future CDI updates add status subresource. +# subresources: +# status: {} diff --git a/crds/embedded/virtualmachineinstances.yaml b/crds/embedded/virtualmachineinstances.yaml index 9b8cb6641..c6624ebef 100644 --- a/crds/embedded/virtualmachineinstances.yaml +++ b/crds/embedded/virtualmachineinstances.yaml @@ -4054,3 +4054,8 @@ spec: type: object served: true storage: true +# IMPORTANT! Do not add status subresource, as it breaks the status update +# in Kubevirt components. +# Delete this precaution when future Kubevirt updates add status subresource. +# subresources: +# status: {}