From dce3251025c714700796e31271772f8691f12046 Mon Sep 17 00:00:00 2001 From: ahmadhamzh Date: Wed, 11 Oct 2023 08:50:11 +0300 Subject: [PATCH] add osp to the md patch object --- src/app/core/services/node.ts | 6 ++++++ src/app/shared/entity/machine-deployment.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/app/core/services/node.ts b/src/app/core/services/node.ts index 91d8df04b2..1404ce7f46 100644 --- a/src/app/core/services/node.ts +++ b/src/app/core/services/node.ts @@ -59,6 +59,12 @@ export class NodeService { }, }; + if (data.nodeData.operatingSystemProfile) { + patch.annotations = { + [OPERATING_SYSTEM_PROFILE_ANNOTATION]: data.nodeData.operatingSystemProfile, + }; + } + // As we are using merge patch to send whole spec we need to ensure that previous values will be unset // and replaced by the values from patch. That's why we need to set undefined fields to null. // It is not part of API service as it is not required in all cases (i.e. replicas count change). diff --git a/src/app/shared/entity/machine-deployment.ts b/src/app/shared/entity/machine-deployment.ts index 6b6b465512..4e387bbbf8 100644 --- a/src/app/shared/entity/machine-deployment.ts +++ b/src/app/shared/entity/machine-deployment.ts @@ -43,6 +43,7 @@ export class MachineDeploymentStatus { } export class MachineDeploymentPatch { + annotations?: object; spec: MachineDeploymentSpecPatch; }