Skip to content

Commit

Permalink
[backport] Add vGPU allocatable warning banner #11017
Browse files Browse the repository at this point in the history
- Add vGPU allocatable warning banner
- Update shell/assets/translations/en-us.yaml
- Fix wording
- Show allocation warning only when allocation info are available

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
  • Loading branch information
torchiaf committed Oct 4, 2024
1 parent c54995f commit c0b51d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/harvester-manager/machine-config/harvester.vue
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ export default {
]);
return vGpuTypes;
},
showVGpuAllocationInfo() {
return this.mode !== _VIEW && !!Object.values(this.vGpuDevices).find((d) => d.allocatable);
}
},
Expand Down Expand Up @@ -1405,6 +1409,11 @@ export default {
{{ t("harvesterManager.vGpu.title") }}
</h3>
<div>
<Banner
v-if="showVGpuAllocationInfo"
color="warning"
:label="t('cluster.credential.harvester.vGpus.warnings.minimumAllocatable')"
/>
<ArrayListSelect
v-model="vGpus"
class="mt-20"
Expand Down
2 changes: 2 additions & 0 deletions shell/assets/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,8 @@ cluster:
macAddress: Mac Address
macFormat: 'Invalid MAC address format.'
vGpus:
warnings:
minimumAllocatable: It's highly recommended to select a vGPU with a number of allocatable devices greater than the number of nodes (Machine Count) to avoid "un-schedulable" errors after cluster updates.
errors:
notAllocatable: '[{vGpu}] vGPU device is not allocatable; required: {allocated}, allocatable: {allocatable}'
volume:
Expand Down

0 comments on commit c0b51d4

Please sign in to comment.