Support template configuration.
This commit is contained in:
parent
81128f9289
commit
6cf5ecadc2
3 changed files with 18 additions and 1 deletions
|
|
@ -914,6 +914,15 @@ spec:
|
|||
type: array
|
||||
type: object
|
||||
type: object
|
||||
runnerTemplate:
|
||||
description: >-
|
||||
Runner template configuration.
|
||||
type: object
|
||||
properties:
|
||||
source:
|
||||
type: string
|
||||
update:
|
||||
type: boolean
|
||||
vm:
|
||||
type: object
|
||||
description: Defines the VM.
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ spec:
|
|||
path: vmoperator/org.jdrupes.vmoperator.runner.qemu-arch
|
||||
pullPolicy: Always
|
||||
|
||||
runnerTemplate:
|
||||
update: true
|
||||
|
||||
vm:
|
||||
state: Running
|
||||
bootMenu: yes
|
||||
|
|
|
|||
|
|
@ -27,10 +27,15 @@ data:
|
|||
|
||||
# The template to use. Resolved relative to /usr/share/vmrunner/templates.
|
||||
# template: "Standard-VM-latest.ftl.yaml"
|
||||
<#if cr.spec.runnerTemplate?? && cr.spec.runnerTemplate.source?? >
|
||||
template: ${ cr.spec.runnerTemplate.source.asString }
|
||||
</#if>
|
||||
|
||||
# The template is copied to the data diretory when the VM starts for
|
||||
# the first time. Subsequent starts use the copy unless this option is set.
|
||||
updateTemplate: true
|
||||
<#if cr.spec.runnerTemplate?? && cr.spec.runnerTemplate.update?? >
|
||||
updateTemplate: ${ cr.spec.runnerTemplate.update.asBoolean?c }
|
||||
</#if>
|
||||
|
||||
# Define the VM (required)
|
||||
vm:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue