Support alternate image specification.
This commit is contained in:
parent
8acd98d703
commit
e1ea5f473d
2 changed files with 21 additions and 3 deletions
|
|
@ -20,7 +20,16 @@ spec:
|
||||||
description: >-
|
description: >-
|
||||||
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:
|
||||||
|
- properties:
|
||||||
|
source: {}
|
||||||
|
path: {}
|
||||||
properties:
|
properties:
|
||||||
|
source:
|
||||||
|
description: >-
|
||||||
|
The image to use for the pod. Must run a "runner".
|
||||||
|
type: string
|
||||||
|
default: "ghcr.io/mnlipp/org.jdrupes.vmoperator.runner.qemu-arch:latest"
|
||||||
repository:
|
repository:
|
||||||
type: string
|
type: string
|
||||||
default: "ghcr.io"
|
default: "ghcr.io"
|
||||||
|
|
@ -31,9 +40,12 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
default: "latest"
|
default: "latest"
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
|
description: >-
|
||||||
|
Image pull policy. One of Always, Never, IfNotPresent.
|
||||||
|
Defaults to Always if :latest tag is specified, or IfNotPresent
|
||||||
|
otherwise.
|
||||||
|
enum: [ "Always", "Never", "IfNotPresent" ]
|
||||||
type: string
|
type: string
|
||||||
enum: [ "IfNotPresent", "Always" ]
|
|
||||||
default: "IfNotPresent"
|
|
||||||
vm:
|
vm:
|
||||||
type: object
|
type: object
|
||||||
description: Defines the VM.
|
description: Defines the VM.
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,15 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: ${ cr.metadata.name.asString }
|
- name: ${ cr.metadata.name.asString }
|
||||||
<#assign image = cr.spec.image>
|
<#assign image = cr.spec.image>
|
||||||
image: ${ image.repository.asString }/${ image.path.asString }:${ image.version.asString }
|
<#if image.repository?? && image.path??>
|
||||||
|
image: ${ image.repository.asString }/${ image.path.asString }<#if image.version??>:${ image.version.asString }</#if>
|
||||||
|
<#else>
|
||||||
|
image: ${ source.asString }
|
||||||
|
</#if>
|
||||||
resources: {}
|
resources: {}
|
||||||
|
<#if image.pullPolicy??>
|
||||||
imagePullPolicy: ${ image.pullPolicy.asString }
|
imagePullPolicy: ${ image.pullPolicy.asString }
|
||||||
|
</#if>
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
# Not needed because pod is priviledged:
|
# Not needed because pod is priviledged:
|
||||||
# - mountPath: /dev/kvm
|
# - mountPath: /dev/kvm
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue