Skip to content

Commit

Permalink
add osp to the md patch object (#6265)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhamzh committed Oct 11, 2023
1 parent b77a338 commit 3f3df1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/core/services/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/entity/machine-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class MachineDeploymentStatus {
}

export class MachineDeploymentPatch {
annotations?: object;
spec: MachineDeploymentSpecPatch;
}

Expand Down

0 comments on commit 3f3df1e

Please sign in to comment.