diff --git a/deploy/crds/vms-crd.yaml b/deploy/crds/vms-crd.yaml index 0292b8d..1863afe 100644 --- a/deploy/crds/vms-crd.yaml +++ b/deploy/crds/vms-crd.yaml @@ -933,6 +933,12 @@ spec: update: type: boolean default: true + guestShutdownStops: + description: >- + If true, sets the VM's state to "Stopped" when + the VM terminates due to a shutdown by the guest. + type: boolean + default: false loadBalancerService: description: >- Data to be merged with the loadBalancerService @@ -999,12 +1005,6 @@ spec: type: string enum: [ "Stopped", "Running" ] default: "Stopped" - guestShutdownStops: - description: >- - If true, sets the state to "Stopped" when - the VM terminates due to a shutdown by the guest. - type: boolean - default: false machineUuid: description: >- The machine's uuid. If none is specified, a uuid diff --git a/dev-example/test-vm.yaml b/dev-example/test-vm.yaml index dcb3454..0a8a098 100644 --- a/dev-example/test-vm.yaml +++ b/dev-example/test-vm.yaml @@ -13,7 +13,9 @@ spec: requests: cpu: 1 memory: 2Gi - + + guestShutdownStops: true + cloudInit: {} vm: diff --git a/org.jdrupes.vmoperator.manager/resources/org/jdrupes/vmoperator/manager/runnerConfig.ftl.yaml b/org.jdrupes.vmoperator.manager/resources/org/jdrupes/vmoperator/manager/runnerConfig.ftl.yaml index 64822a5..451a465 100644 --- a/org.jdrupes.vmoperator.manager/resources/org/jdrupes/vmoperator/manager/runnerConfig.ftl.yaml +++ b/org.jdrupes.vmoperator.manager/resources/org/jdrupes/vmoperator/manager/runnerConfig.ftl.yaml @@ -45,6 +45,9 @@ data: updateTemplate: ${ cr.spec.runnerTemplate.update.asBoolean?c } + # Whether a shutdown initiated by the guest stops the pod deployment + guestShutdownStops: ${ cr.spec.guestShutdownStops!false?c } + # Forward the cloud-init data if provided <#if cr.spec.cloudInit??> cloudInit: @@ -63,8 +66,6 @@ data: - guestShutdownStops: ${ cr.spec.vm.guestShutdownStops!false?c } - # Define the VM (required) vm: # The VM's name (required)