feat: support manually configuring VM IP (#315)

* feat: add annotations

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>

* feat: map annotation

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>

* feat: add annotaion to template

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>

---------

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yiya Chen
2025-06-06 10:03:37 +08:00
committed by GitHub
parent 01528f7429
commit 29b1ab2fb9
6 changed files with 86 additions and 10 deletions
@@ -255,9 +255,10 @@ export default {
cloneVersionVM.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
// Update labels and instance labels value
// Update labels, instance labels and annotations
this.value.metadata.labels = cloneVersionVM.metadata.labels;
this.value.spec.template.metadata.labels = cloneVersionVM.spec.template.metadata.labels;
this.value.metadata.annotations = cloneVersionVM.metadata.annotations;
this.getInitConfig({
value: cloneVersionVM, existUserData: true, fromTemplate: true
@@ -764,10 +765,31 @@ export default {
/>
</Tab>
<Tab
name="annotations"
:label="t('harvester.tab.annotations')"
:weight="-11"
>
<Banner color="info">
<t k="harvester.virtualMachine.annotations.banner" />
</Banner>
<KeyValue
key="annotations"
:value="value.annotations"
:protected-keys="value.systemAnnotations || []"
:toggle-filter="toggler"
:add-label="t('labels.addAnnotation')"
:mode="mode"
:read-allowed="false"
:value-can-be-empty="true"
@update:value="value.setAnnotations($event)"
/>
</Tab>
<Tab
name="advanced"
:label="t('harvester.tab.advanced')"
:weight="-11"
:weight="-12"
>
<div class="row mb-20">
<div class="col span-6">