Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5 #45

Merged
merged 8 commits into from
Dec 14, 2024
Merged

4.5 #45

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/cloud-init/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: cloud-init
description: A Helm chart that generates cloud-init config files
type: application
version: 0.2.6
version: 0.2.7
maintainers:
- name: cloudymax
2 changes: 1 addition & 1 deletion charts/cloud-init/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloud-init

![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.2.7](https://img.shields.io/badge/Version-0.2.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart that generates cloud-init config files

Expand Down
7 changes: 7 additions & 0 deletions charts/cloud-init/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ spec:
command: ["/bin/bash", "/optimize.sh"]
{{- end }}
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 250m
memory: 512M
requests:
cpu: 250m
memory: 512M
volumeMounts:
- name: userdata
mountPath: /secrets/user-data.yaml
Expand Down
1 change: 0 additions & 1 deletion charts/cloud-init/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ extraEnvVars: []
# name: test
# key: "test.yaml"


# -- virtual-machine hostname
hostname: random

Expand Down
2 changes: 1 addition & 1 deletion charts/kubevirt-vm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: kubevirt-vm
description: Configure a virtual machine for use with Kubevirt

type: application
version: 0.4.4
version: 0.4.5
appVersion: "0.1.0"

maintainers:
Expand Down
22 changes: 14 additions & 8 deletions charts/kubevirt-vm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kubevirt-vm

![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

Configure a virtual machine for use with Kubevirt

Expand Down Expand Up @@ -56,31 +56,37 @@ Configure a virtual machine for use with Kubevirt
| disks[0].url | string | `"https://buildstars.online/debian-12-generic-amd64-daily.qcow2"` | URL of cloud-image |
| service | list | `[{"externalTrafficPolicy":"Cluster","name":"service","ports":[{"name":"ssh","port":22,"protocol":"TCP","targetPort":22},{"name":"vnc","port":5900,"protocol":"TCP","targetPort":5900}],"type":"NodePort"}]` | Service cinfiguration. Used to expose VM to the outside world. Accepts a list of ports to open. |
| userDataSecret | object | `{"enabled":false,"name":""}` | Use an existing cloud-init userdata secret ignored if cloudinit subchart is enabled. |
| virtualMachine.clock | object | `{"enabled":true,"hpet":{"enabled":true,"present":false},"hyperv":false,"kvm":true,"pit":{"enabled":true,"tickPolicy":"delay"},"rtc":{"enabled":true,"tickPolicy":"catchup"},"timezone":"utc"}` | Options for machine clock |
| virtualMachine.clock.hpet | object | `{"enabled":true,"present":false}` | High Precision Event Timer |
| virtualMachine.clock.hyperv | bool | `false` | Hyper-V's reference time counter for use with Windows guests. |
| virtualMachine.clock.kvm | bool | `true` | Paravirtualized clock that provides better accuracy and performance. Recommended clock source for KVM guest virtual machines. |
| virtualMachine.clock.pit | object | `{"enabled":true,"tickPolicy":"delay"}` | Programmable interval timer |
| virtualMachine.clock.rtc | object | `{"enabled":true,"tickPolicy":"catchup"}` | Real-Time Clock |
| virtualMachine.clock.timezone | string | `"utc"` | Set clock timezone eg: "Europe/Amsterdam" or "utc" |
| virtualMachine.features.acpiEnabled | bool | `true` | |
| virtualMachine.features.autoattachGraphicsDevice | bool | `true` | Attach a basic graphics device for VNC access |
| virtualMachine.features.autoattachPodInterface | bool | `true` | Make pod network interface the default for the VM |
| virtualMachine.features.autoattachSerialConsole | bool | `true` | Attach a serial console device |
| virtualMachine.features.clock | object | `{"enabled":true,"hpet":{"enabled":true,"present":false},"hyperv":false,"kvm":true,"pit":{"enabled":true,"tickPolicy":"delay"},"rtc":{"enabled":true,"tickPolicy":"catchup"}}` | Options for machine clock |
| virtualMachine.features.clock.hpet | object | `{"enabled":true,"present":false}` | High Precision Event Timer |
| virtualMachine.features.hyperv | bool | `false` | |
| virtualMachine.features.kvm | object | `{"enabled":true,"hidden":true}` | Enable KVM acceleration |
| virtualMachine.features.kvm | object | `{"enabled":true,"hidden":false}` | Enable KVM acceleration |
| virtualMachine.features.networkInterfaceMultiqueue | bool | `true` | Enhances network performance by allowing multiple TX and RX queues. |
| virtualMachine.firmware.efi | object | `{"enabled":true,"secureBoot":false}` | Enable EFI bios and secureboot |
| virtualMachine.firmware.smmEnabled | bool | `false` | |
| virtualMachine.firmware.uuid | string | `"5d307ca9-b3ef-428c-8861-06e72d69f223"` | |
| virtualMachine.gpus | list | `[]` | GPUs to pass to guest, requires that the GPUs are pre-configured in the kubevirt custom resource. ignored when instancetype is defined. ramFB & display may only be enabled on 1 vGPU |
| virtualMachine.interfaces | list | `[{"masquerade":{},"model":"virtio","name":"default"}]` | virtual network interface config options. See: https://kubevirt.io/user-guide/network/interfaces_and_networks/#interfaces |
| virtualMachine.interfaces[0] | object | `{"masquerade":{},"model":"virtio","name":"default"}` | bridge mode, vms are connected to the network via a linux "bridge". Pod network IP is delegated to vm via DHCPv4. VM must use DHCP for an IP |
| virtualMachine.machine.architecture | string | `"amd64"` | Arch |
| virtualMachine.machine.architecture | string | `"amd64"` | System Arch. Supported options are amd64 and arm64 |
| virtualMachine.machine.cpuModel | string | `"host-passthrough"` | Specify hots-passthrough or a named cpu model https://www.qemu.org/docs/master/system/qemu-cpu-models.html |
| virtualMachine.machine.hyperThreadingEnabled | bool | `true` | Enable the use of Hyperthreading on Intel CPUs. Disable on AMD CPUs. |
| virtualMachine.machine.hyperThreadingEnabled | bool | `false` | Enable simulation of Hyperthre ading on Intel CPUs or SMT AMD CPUs. ignored if pinCores set to "true" |
| virtualMachine.machine.instancetype | object | `{"enabled":false,"kind":"virtualMachineClusterInstancetype","name":"standard-small"}` | Define CPU, RAM, GPU, HostDevice settings for VMs. Overrides: vCores, memory, gpus |
| virtualMachine.machine.machineType | string | `"q35"` | QEMU virtual-machine type |
| virtualMachine.machine.machineType | string | `"q35"` | QEMU virtual-machine type. Options are q35 and i440fx |
| virtualMachine.machine.memory | object | `{"base":"4Gi","overcommit":{"enabled":false,"limit":"8Gi","overhead":false}}` | Amount of RAM to pass to the Guest. Ignored when instancetype is defined |
| virtualMachine.machine.memory.overcommit.enabled | bool | `false` | Enable memory overcommitment. Tells VM it has more RAM than requested. VMI becomes Burtable QOS class and may be preempted when node is under memory pressure. GPU passthrough and vGPU will not function with overcommit enabled. |
| virtualMachine.machine.memory.overcommit.overhead | bool | `false` | Do not allocate hypervisor overhead memory to VM. Will work for as long as most of the VirtualMachineInstances do not request the full memory. |
| virtualMachine.machine.pinCores | bool | `false` | Pin QEMU process to specific physical core Requires `--cpu-manager-policy` enabled in kubelet |
| virtualMachine.machine.pinCores | bool | `false` | Pin QEMU process threads to specific physical cores Requires `--cpu-manager-policy` enabled in kubelet |
| virtualMachine.machine.priorityClassName | string | `"vm-standard"` | If a Pod cannot be scheduled, lower priorityClass Pods will be evicted |
| virtualMachine.machine.sockets | int | `1` | Number of simulated CPU sockets. ignored if pinCores set to "true" |
| virtualMachine.machine.vCores | int | `4` | Number of Virtual cores to pass to the Guest ignored when instancetype is defined |
| virtualMachine.name | string | `"test"` | name of the virtualMachine or virtualMachinePool object |
| virtualMachine.namespace | string | `"kubevirt"` | namespace to deploy to |
Expand Down
40 changes: 23 additions & 17 deletions charts/kubevirt-vm/templates/virtualmachine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,30 @@ spec:
domain:
machine:
type: {{ .Values.virtualMachine.machine.machineType }}
{{- if eq .Values.virtualMachine.features.clock.enabled true }}
{{- if eq .Values.virtualMachine.clock.enabled true }}
clock:
{{- if eq .Values.virtualMachine.clock.timezone "utc" }}
utc: {}
{{ else }}
timezone: {{ .Values.virtualMachine.clock.timezone }}
{{- end }}
timer:
{{- if eq .Values.virtualMachine.features.clock.hpet.enabled true }}
{{- if eq .Values.virtualMachine.clock.hpet.enabled true }}
hpet:
present: {{ .Values.virtualMachine.features.clock.hpet.present }}
present: {{ .Values.virtualMachine.clock.hpet.present }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.pit.enabled true }}
{{- if eq .Values.virtualMachine.clock.pit.enabled true }}
pit:
tickPolicy: {{ .Values.virtualMachine.features.clock.pit.tickPolicy }}
tickPolicy: {{ .Values.virtualMachine.clock.pit.tickPolicy }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.rtc.enabled true }}
{{- if eq .Values.virtualMachine.clock.rtc.enabled true }}
rtc:
tickPolicy: {{ .Values.virtualMachine.features.clock.rtc.tickPolicy }}
tickPolicy: {{ .Values.virtualMachine.clock.rtc.tickPolicy }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.hyperv true }}
{{- if eq .Values.virtualMachine.clock.hyperv true }}
hyperv: {}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.kvm true }}
{{- if eq .Values.virtualMachine.clock.kvm true }}
kvm: {}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -84,14 +88,16 @@ spec:
{{- end }}
model: {{ .Values.virtualMachine.machine.cpuModel }}
{{- if eq .Values.virtualMachine.machine.instancetype.enabled false }}
sockets: 1
cores: {{ .Values.virtualMachine.machine.vCores -}}
{{- if .Values.virtualMachine.machine.hyperThreadingEnabled -}}
{{- if eq .Values.virtualMachine.machine.pinCores false }}
sockets: {{ .Values.virtualMachine.machine.sockets }}
cores: {{ .Values.virtualMachine.machine.vCores }}
{{- if .Values.virtualMachine.machine.hyperThreadingEnabled }}
{{- "threads: 2" | nindent 10 -}}
{{ else }}
{{- "threads: 1" | nindent 10 -}}
{{- end }}
{{- end }}
{{- end }}
{{- if eq .Values.virtualMachine.machine.instancetype.enabled false }}
memory:
{{- if eq .Values.virtualMachine.machine.memory.overcommit.enabled false }}
Expand Down Expand Up @@ -172,15 +178,15 @@ spec:
overcommitGuestOverhead: {{ .Values.virtualMachine.machine.memory.overcommit.overhead }}
{{- end }}
requests:
memory: {{ .Values.virtualMachine.machine.memory.base }}
cpu: {{ .Values.virtualMachine.machine.vCores }}
memory: {{ .Values.virtualMachine.machine.memory.base | quote }}
cpu: {{ .Values.virtualMachine.machine.vCores | quote }}
limits:
{{- if eq .Values.virtualMachine.machine.memory.overcommit.enabled true }}
memory: {{ .Values.virtualMachine.machine.memory.overcommit.limit }}
memory: {{ .Values.virtualMachine.machine.memory.overcommit.limit | quote }}
{{ else }}
memory: {{ .Values.virtualMachine.machine.memory.base }}
memory: {{ .Values.virtualMachine.machine.memory.base | quote }}
{{- end }}
cpu: {{ .Values.virtualMachine.machine.vCores }}
cpu: {{ .Values.virtualMachine.machine.vCores | quote }}
{{- end }}
{{- with .Values.virtualMachine.networks }}
networks:
Expand Down
40 changes: 23 additions & 17 deletions charts/kubevirt-vm/templates/virtualmachinepool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,30 @@ spec:
domain:
machine:
type: {{ .Values.virtualMachine.machine.machineType }}
{{- if eq .Values.virtualMachine.features.clock.enabled true }}
{{- if eq .Values.virtualMachine.clock.enabled true }}
clock:
{{- if eq .Values.virtualMachine.clock.timezone "utc" }}
utc: {}
{{ else }}
timezone: {{ .Values.virtualMachine.clock.timezone }}
{{- end }}
timer:
{{- if eq .Values.virtualMachine.features.clock.hpet.enabled true }}
{{- if eq .Values.virtualMachine.clock.hpet.enabled true }}
hpet:
present: {{ .Values.virtualMachine.features.clock.hpet.present }}
present: {{ .Values.virtualMachine.clock.hpet.present }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.pit.enabled true }}
{{- if eq .Values.virtualMachine.clock.pit.enabled true }}
pit:
tickPolicy: {{ .Values.virtualMachine.features.clock.pit.tickPolicy }}
tickPolicy: {{ .Values.virtualMachine.clock.pit.tickPolicy }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.rtc.enabled true }}
{{- if eq .Values.virtualMachine.clock.rtc.enabled true }}
rtc:
tickPolicy: {{ .Values.virtualMachine.features.clock.rtc.tickPolicy }}
tickPolicy: {{ .Values.virtualMachine.clock.rtc.tickPolicy }}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.hyperv true }}
{{- if eq .Values.virtualMachine.clock.hyperv true }}
hyperv: {}
{{- end }}
{{- if eq .Values.virtualMachine.features.clock.kvm true }}
{{- if eq .Values.virtualMachine.clock.kvm true }}
kvm: {}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -100,14 +104,16 @@ spec:
{{- end }}
model: {{ .Values.virtualMachine.machine.cpuModel }}
{{- if eq .Values.virtualMachine.machine.instancetype.enabled false }}
sockets: 1
cores: {{ .Values.virtualMachine.machine.vCores -}}
{{- if .Values.virtualMachine.machine.hyperThreadingEnabled -}}
{{- if eq .Values.virtualMachine.machine.pinCores false }}
sockets: {{ .Values.virtualMachine.machine.sockets }}
cores: {{ .Values.virtualMachine.machine.vCores }}
{{- if .Values.virtualMachine.machine.hyperThreadingEnabled }}
{{- "threads: 2" | nindent 14 -}}
{{ else }}
{{- "threads: 1" | nindent 14 -}}
{{- end }}
{{- end }}
{{- end }}
{{- if eq .Values.virtualMachine.machine.instancetype.enabled false }}
memory:
{{- if eq .Values.virtualMachine.machine.memory.overcommit.enabled false }}
Expand Down Expand Up @@ -188,15 +194,15 @@ spec:
overcommitGuestOverhead: {{ .Values.virtualMachine.machine.memory.overcommit.overhead }}
{{- end }}
requests:
memory: {{ .Values.virtualMachine.machine.memory.base }}
cpu: {{ .Values.virtualMachine.machine.vCores }}
memory: {{ .Values.virtualMachine.machine.memory.base | quote }}
cpu: {{ .Values.virtualMachine.machine.vCores | quote }}
limits:
{{- if eq .Values.virtualMachine.machine.memory.overcommit.enabled true }}
memory: {{ .Values.virtualMachine.machine.memory.overcommit.limit }}
memory: {{ .Values.virtualMachine.machine.memory.overcommit.limit | quote }}
{{ else }}
memory: {{ .Values.virtualMachine.machine.memory.base }}
memory: {{ .Values.virtualMachine.machine.memory.base | quote }}
{{- end }}
cpu: {{ .Values.virtualMachine.machine.vCores }}
cpu: {{ .Values.virtualMachine.machine.vCores | quote }}
{{- end }}
{{- with .Values.virtualMachine.networks }}
networks:
Expand Down
62 changes: 37 additions & 25 deletions charts/kubevirt-vm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# -- Enable KVM acceleration
kvm:
enabled: true
hidden: true
hidden: false

# -- Set default hyperv settings for windows guests
hyperv: false
Expand All @@ -35,26 +35,34 @@
# -- Enhances network performance by allowing multiple TX and RX queues.
networkInterfaceMultiqueue: true

# -- Options for machine clock
clock:
# -- Options for machine clock
clock:
enabled: true

# -- Set clock timezone eg: "Europe/Amsterdam" or "utc"
timezone: utc

# -- High Precision Event Timer
hpet:
enabled: true
present: false

# -- High Precision Event Timer
hpet:
enabled: true
present: false
# -- Programmable interval timer
pit:
enabled: true
tickPolicy: delay

# -- Programmable interval timer
pit:
enabled: true
tickPolicy: delay
# -- Real-Time Clock
rtc:
enabled: true
tickPolicy: catchup

# -- Paravirtualized clock that provides better accuracy and performance.
# Recommended clock source for KVM guest virtual machines.
kvm: true

# -- Real-Time Clock
rtc:
enabled: true
tickPolicy: catchup
kvm: true
hyperv: false
# -- Hyper-V's reference time counter for use with Windows guests.
hyperv: false

firmware:
# Enable System Management Mode (required for secureboot)
Expand All @@ -78,10 +86,10 @@
name: standard-small
kind: virtualMachineClusterInstancetype

# -- Arch
# -- System Arch. Supported options are amd64 and arm64
architecture: amd64

# -- QEMU virtual-machine type
# -- QEMU virtual-machine type. Options are q35 and i440fx
machineType: q35

# -- Specify hots-passthrough or a named cpu model
Expand All @@ -92,13 +100,18 @@
# ignored when instancetype is defined
vCores: 4

# -- Pin QEMU process to specific physical core
# -- Number of simulated CPU sockets.
# ignored if pinCores set to "true"
sockets: 1

# -- Enable simulation of Hyperthre ading on Intel CPUs or SMT AMD CPUs.
# ignored if pinCores set to "true"
hyperThreadingEnabled: false

# -- Pin QEMU process threads to specific physical cores
# Requires `--cpu-manager-policy` enabled in kubelet
pinCores: false

# -- Enable the use of Hyperthreading on Intel CPUs. Disable on AMD CPUs.
hyperThreadingEnabled: true

# -- Amount of RAM to pass to the Guest. Ignored when instancetype is defined
memory:
base: 4Gi
Expand Down Expand Up @@ -145,7 +158,7 @@
# Vm pools should be used with ephemeral disks or containerdisks
# otherwise they would all fight over the same PVC.
virtualMachinePool:
enabled: false
enabled: true

# -- number of replicas to create. Ignored when hpa is set to 'true'
replicas: 1
Expand All @@ -166,7 +179,7 @@
#################################################
# DataVolume disk with URL source example
#################################################
- name: harddrive

Check failure on line 182 in charts/kubevirt-vm/values.yaml

View workflow job for this annotation

GitHub Actions / Lint

182:2 [indentation] wrong indentation: expected 2 but found 1

# -- Disk type: disk, cdrom, filesystem, or lun
type: disk
Expand Down Expand Up @@ -325,7 +338,6 @@
targetPort: 5900
protocol: TCP


# -- set tieming and port number for liveness probe
# livenessProbe:
# initialDelaySeconds: 120
Expand Down
Loading