Skip to content

Commit d11a818

Browse files
authored
Merge pull request #119 from cloudymax/netdata
fix templating issues with networkdata
2 parents 37a725c + 96c5722 commit d11a818

File tree

5 files changed

+79
-79
lines changed

5 files changed

+79
-79
lines changed

charts/kubevirt-vm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: kubevirt-vm
33
description: Configure a virtual machine for use with Kubevirt
44

55
type: application
6-
version: 0.7.0
6+
version: 0.7.1
77
appVersion: "0.1.0"
88

99
maintainers:

charts/kubevirt-vm/README.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# kubevirt-vm
22

3-
![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-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)
3+
![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-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)
44

55
Configure a virtual machine for use with Kubevirt
66

@@ -48,28 +48,11 @@ Configure a virtual machine for use with Kubevirt
4848
| cloudinit.wireguard | list | `[]` | add wireguard configuration from existing secret or as plain-text See https://cloudinit.readthedocs.io/en/latest/reference/modules.html#wireguard |
4949
| cloudinit.write_files | list | `[]` | Write arbitrary files to disk. Files my be provided as plain-text or downloaded from a url See https://cloudinit.readthedocs.io/en/latest/reference/modules.html#write-files |
5050
| diskErrorPolicy | string | `"report"` | controls hypervisor behavior when I/O errors occur on disk read or write. Possible values are: 'report', 'ignore', 'enospace' |
51-
| disks | list | `[{"bootorder":2,"bus":"virtio","name":"harddrive","pvaccessMode":"ReadWriteOnce","pvsize":"16Gi","pvstorageClassName":"fast-raid","readonly":false,"source":"url","type":"disk","url":"https://buildstars.online/debian-12-generic-amd64-daily.qcow2"}]` | List of disks to create for the VM, Will be used to create Datavolumes or PVCs. |
52-
| disks[0].bootorder | int | `2` | Sets disk position in boot order, lower numbers are checked earlier |
53-
| disks[0].bus | string | `"virtio"` | Bus type: sata or virtio |
54-
| disks[0].pvaccessMode | string | `"ReadWriteOnce"` | Access mode for the PVC |
55-
| disks[0].pvsize | string | `"16Gi"` | Size of disk in GB |
56-
| disks[0].pvstorageClassName | string | `"fast-raid"` | Storage class to use for the pvc |
57-
| disks[0].readonly | bool | `false` | Set disk to be Read-only |
58-
| disks[0].source | string | `"url"` | source type of the disk image. One of `url`, `pvc` |
59-
| disks[0].type | string | `"disk"` | Disk type: disk, cdrom, filesystem, or lun |
60-
| disks[0].url | string | `"https://buildstars.online/debian-12-generic-amd64-daily.qcow2"` | URL of cloud-image |
51+
| disks | list | `[{"bootorder":1,"bus":"virtio","image":"quay.io/containerdisks/debian:13","name":"harddrive","readonly":false,"type":"disk"}]` | List of disks to create for the VM, Will be used to create Datavolumes or PVCs. |
6152
| ingress | object | `{"annotations":{},"className":"nginx","enabled":false,"hostname":"novnc.buildstar.online","tls":[]}` | Ingress configuration |
62-
| networkPolicy.egress[0].ports[0].port | int | `53` | |
63-
| networkPolicy.egress[0].ports[0].protocol | string | `"UDP"` | |
64-
| networkPolicy.egress[0].to[0].namespaceSelector.matchLabels."kubernetes.io/metadata.name" | string | `"kube-system"` | |
65-
| networkPolicy.egress[0].to[1].podSelector.matchLabels.k8s-app | string | `"kube-dns"` | |
66-
| networkPolicy.egress[1].to[0].ipBlock.cidr | string | `"0.0.0.0/0"` | |
67-
| networkPolicy.egress[1].to[0].ipBlock.except[0] | string | `"10.0.0.0/8"` | |
68-
| networkPolicy.egress[1].to[0].ipBlock.except[1] | string | `"172.16.0.0/12"` | |
69-
| networkPolicy.egress[1].to[0].ipBlock.except[2] | string | `"192.168.0.0/16"` | |
53+
| networkPolicy.egress | list | `[]` | |
7054
| networkPolicy.enabled | bool | `false` | Enable the creation of network policies |
71-
| networkPolicy.ingress[0].from[0].namespaceSelector.matchLabels."kubernetes.io/metadata.name" | string | `"ingress-nginx"` | |
72-
| networkPolicy.ingress[0].from[1].podSelector.matchLabels."app.kubernetes.io/name" | string | `"ingress-nginx"` | |
55+
| networkPolicy.ingress | list | `[]` | |
7356
| service | list | `[]` | Service cinfiguration. Used to expose VM to the outside world. Accepts a list of ports to open. |
7457
| userDataSecret | object | `{"enabled":false,"name":""}` | Use an existing cloud-init userdata secret ignored if cloudinit subchart is enabled. |
7558
| virtualMachine.capiMachineTemplate | bool | `false` | Create the VM as a KubevirtMachineTemplate for use with Cluster API Does not support VM Pools |
@@ -112,7 +95,7 @@ Configure a virtual machine for use with Kubevirt
11295
| virtualMachine.networks[0].pod | object | `{}` | |
11396
| virtualMachine.runStrategy | string | `"Always"` | One of 'Always' `RerunOnFailure` `Manual` `Halted` `Once` See: https://kubevirt.io/user-guide/compute/run_strategies/#runstrategy |
11497
| virtualMachinePool.enabled | bool | `false` | |
115-
| virtualMachinePool.hpa.enabled | bool | `true` | |
98+
| virtualMachinePool.hpa.enabled | bool | `false` | |
11699
| virtualMachinePool.hpa.maxReplicas | int | `5` | |
117100
| virtualMachinePool.hpa.minReplicas | int | `1` | |
118101
| virtualMachinePool.replicas | int | `2` | number of replicas to create. Ignored when hpa is set to 'true' |

charts/kubevirt-vm/templates/virtualmachine.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ spec:
263263
name: {{ .Values.cloudinit.secret_name }}
264264
{{- end }}
265265
{{- if eq .Values.cloudinit.enabled true }}
266-
{{- if .Values.cloudinit.staticIPs }}
266+
{{- if .Values.cloudinit.networkData.enabled }}
267267
networkDataSecretRef:
268268
{{- if eq .Values.userDataSecret.enabled true }}
269269
name: {{ .Values.userDataSecret.name }}
@@ -272,7 +272,6 @@ spec:
272272
{{- end }}
273273
{{- end }}
274274
{{- end }}
275-
276275
{{- end }}
277276
{{- end }}
278277
{{- end }}

charts/kubevirt-vm/templates/virtualmachinepool.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,15 @@ spec:
277277
{{- if eq .Values.cloudinit.enabled true }}
278278
name: {{ .Values.cloudinit.secret_name }}
279279
{{- end }}
280+
{{- if eq .Values.cloudinit.enabled true }}
281+
{{- if .Values.cloudinit.networkData.enabled }}
282+
networkDataSecretRef:
283+
{{- if eq .Values.userDataSecret.enabled true }}
284+
name: {{ .Values.userDataSecret.name }}
285+
{{- else }}
286+
name: {{ .Values.cloudinit.secret_name }}
287+
{{- end }}
288+
{{- end }}
289+
{{- end }}
280290
{{- end }}
281291
{{- end }}

charts/kubevirt-vm/values.yaml

Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ virtualMachinePool:
180180
# -- number of replicas to create. Ignored when hpa is set to 'true'
181181
replicas: 2
182182
hpa:
183-
enabled: true
183+
enabled: false
184184
maxReplicas: 5
185185
minReplicas: 1
186186

@@ -200,25 +200,25 @@ disks:
200200
#################################################
201201
# DataVolume disk with URL source example
202202
#################################################
203-
- name: harddrive
204-
# -- Disk type: disk, cdrom, filesystem, or lun
205-
type: disk
206-
# -- Bus type: sata or virtio
207-
bus: virtio
208-
# -- Sets disk position in boot order, lower numbers are checked earlier
209-
bootorder: 2
210-
# -- Set disk to be Read-only
211-
readonly: false
212-
# -- Size of disk in GB
213-
pvsize: 16Gi
214-
# -- Storage class to use for the pvc
215-
pvstorageClassName: fast-raid
216-
# -- Access mode for the PVC
217-
pvaccessMode: ReadWriteOnce
218-
# -- source type of the disk image. One of `url`, `pvc`
219-
source: url
220-
# -- URL of cloud-image
221-
url: "https://buildstars.online/debian-12-generic-amd64-daily.qcow2"
203+
# - name: harddrive
204+
# # -- Disk type: disk, cdrom, filesystem, or lun
205+
# type: disk
206+
# # -- Bus type: sata or virtio
207+
# bus: virtio
208+
# # -- Sets disk position in boot order, lower numbers are checked earlier
209+
# bootorder: 2
210+
# # -- Set disk to be Read-only
211+
# readonly: false
212+
# # -- Size of disk in GB
213+
# pvsize: 16Gi
214+
# # -- Storage class to use for the pvc
215+
# pvstorageClassName: fast-raid
216+
# # -- Access mode for the PVC
217+
# pvaccessMode: ReadWriteOnce
218+
# # -- source type of the disk image. One of `url`, `pvc`
219+
# source: url
220+
# # -- URL of cloud-image
221+
# url: "https://buildstars.online/debian-12-generic-amd64-daily.qcow2"
222222

223223
#########################################################
224224
# Ephemeral disk example
@@ -279,13 +279,21 @@ disks:
279279

280280
##########################################################
281281
# Container Disk Example
282+
# see: https://github.com/kubevirt/containerdisks
282283
##########################################################
283-
# - name: virtio-drivers
284-
# type: cdrom
285-
# bus: sata
286-
# bootorder: 3
287-
# readonly: true
288-
# image: "quay.io/kubevirt/virtio-container-disk:v1.0.0-rc.1-amd64"
284+
- name: harddrive
285+
type: disk
286+
bus: virtio
287+
bootorder: 1
288+
readonly: false
289+
image: "quay.io/containerdisks/debian:13"
290+
291+
# - name: virtio-drivers
292+
# type: cdrom
293+
# bus: sata
294+
# bootorder: 3
295+
# readonly: true
296+
# image: "quay.io/kubevirt/virtio-container-disk:v1.0.0-rc.1-amd64"
289297

290298
###########################################################
291299
# Local Disk example
@@ -570,38 +578,38 @@ ingress:
570578
networkPolicy:
571579
# -- Enable the creation of network policies
572580
enabled: false
573-
egress:
581+
egress: []
574582
# Allow communication to Kubernetes DNS service
575-
- to:
576-
- namespaceSelector:
577-
matchLabels:
578-
kubernetes.io/metadata.name: kube-system
579-
- podSelector:
580-
matchLabels:
581-
k8s-app: kube-dns
582-
ports:
583-
- protocol: UDP
584-
port: 53
583+
#- to:
584+
# - namespaceSelector:
585+
# matchLabels:
586+
# kubernetes.io/metadata.name: kube-system
587+
# - podSelector:
588+
# matchLabels:
589+
# k8s-app: kube-dns
590+
# ports:
591+
# - protocol: UDP
592+
# port: 53
585593

586594
# Allow internet access
587-
- to:
588-
- ipBlock:
589-
cidr: 0.0.0.0/0
590-
# Exclude traffic to Kubernetes service IPs and pods
591-
except:
592-
- 10.0.0.0/8
593-
- 172.16.0.0/12
594-
- 192.168.0.0/16
595-
596-
ingress:
595+
#- to:
596+
# - ipBlock:
597+
# cidr: 0.0.0.0/0
598+
# # Exclude traffic to Kubernetes service IPs and pods
599+
# except:
600+
# - 10.0.0.0/8
601+
# - 172.16.0.0/12
602+
# - 192.168.0.0/16
603+
604+
ingress: []
597605
# Allow internet access from the ingress controller
598-
- from:
599-
- namespaceSelector:
600-
matchLabels:
601-
kubernetes.io/metadata.name: "ingress-nginx"
602-
- podSelector:
603-
matchLabels:
604-
app.kubernetes.io/name: "ingress-nginx"
606+
#- from:
607+
# - namespaceSelector:
608+
# matchLabels:
609+
# kubernetes.io/metadata.name: "ingress-nginx"
610+
# - podSelector:
611+
# matchLabels:
612+
# app.kubernetes.io/name: "ingress-nginx"
605613

606614
################################################################################
607615
# ____ _

0 commit comments

Comments
 (0)