Fix image handling.
This commit is contained in:
parent
db3b533c5d
commit
9745e854f7
2 changed files with 19 additions and 17 deletions
|
|
@ -21,24 +21,24 @@ spec:
|
||||||
The image to use for the pod. Must run a runner.
|
The image to use for the pod. Must run a runner.
|
||||||
type: object
|
type: object
|
||||||
oneOf:
|
oneOf:
|
||||||
- properties:
|
- required:
|
||||||
source: {}
|
- source
|
||||||
path: {}
|
- required:
|
||||||
|
- repository
|
||||||
|
- path
|
||||||
|
default: { source: "ghcr.io/mnlipp/org.jdrupes.vmoperator.runner.qemu-arch:latest" }
|
||||||
properties:
|
properties:
|
||||||
source:
|
source:
|
||||||
description: >-
|
description: >-
|
||||||
The image to use for the pod. Must run a "runner".
|
Specifies the image to use for the pod in a single line
|
||||||
|
(repo:path[:version]). Must be a "runner" image.
|
||||||
type: string
|
type: string
|
||||||
default: "ghcr.io/mnlipp/org.jdrupes.vmoperator.runner.qemu-arch:latest"
|
|
||||||
repository:
|
repository:
|
||||||
type: string
|
type: string
|
||||||
default: "ghcr.io"
|
|
||||||
path:
|
path:
|
||||||
type: string
|
type: string
|
||||||
default: "mnlipp/org.jdrupes.vmoperator.runner.qemu-arch"
|
|
||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
default: "latest"
|
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
description: >-
|
description: >-
|
||||||
Image pull policy. One of Always, Never, IfNotPresent.
|
Image pull policy. One of Always, Never, IfNotPresent.
|
||||||
|
|
@ -50,9 +50,10 @@ spec:
|
||||||
type: object
|
type: object
|
||||||
description: Defines the VM.
|
description: Defines the VM.
|
||||||
oneOf:
|
oneOf:
|
||||||
- properties:
|
- required:
|
||||||
maximumCpus: {}
|
- maximumCpus
|
||||||
cpuTopology: {}
|
- required:
|
||||||
|
- cpuTopology
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
description: >-
|
description: >-
|
||||||
|
|
@ -142,9 +143,10 @@ spec:
|
||||||
Supported types are "tap" and "user" (for debugging).
|
Supported types are "tap" and "user" (for debugging).
|
||||||
type: object
|
type: object
|
||||||
oneOf:
|
oneOf:
|
||||||
- properties:
|
- required:
|
||||||
tap: {}
|
- tap
|
||||||
user: {}
|
- required:
|
||||||
|
- user
|
||||||
properties:
|
properties:
|
||||||
tap:
|
tap:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: ${ cr.metadata.name.asString }
|
- name: ${ cr.metadata.name.asString }
|
||||||
<#assign image = cr.spec.image>
|
<#assign image = cr.spec.image>
|
||||||
<#if image.repository?? && image.path??>
|
<#if image.source??>
|
||||||
image: ${ image.repository.asString }/${ image.path.asString }<#if image.version??>:${ image.version.asString }</#if>
|
|
||||||
<#else>
|
|
||||||
image: ${ source.asString }
|
image: ${ source.asString }
|
||||||
|
<#else>
|
||||||
|
image: ${ image.repository.asString }/${ image.path.asString }<#if image.version??>:${ image.version.asString }</#if>
|
||||||
</#if>
|
</#if>
|
||||||
resources: {}
|
resources: {}
|
||||||
<#if image.pullPolicy??>
|
<#if image.pullPolicy??>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue