diff --git a/charts/kubevirt-vm/Chart.yaml b/charts/kubevirt-vm/Chart.yaml index ac065d3..87973f5 100644 --- a/charts/kubevirt-vm/Chart.yaml +++ b/charts/kubevirt-vm/Chart.yaml @@ -3,7 +3,7 @@ name: kubevirt-vm description: Configure a virtual machine for use with Kubevirt type: application -version: 0.3.0 +version: 0.3.1 appVersion: "0.1.0" maintainers: diff --git a/charts/kubevirt-vm/README.md b/charts/kubevirt-vm/README.md index 586a78c..dddb611 100644 --- a/charts/kubevirt-vm/README.md +++ b/charts/kubevirt-vm/README.md @@ -1,6 +1,6 @@ # kubevirt-vm -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.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) +![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.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) Configure a virtual machine for use with Kubevirt @@ -17,7 +17,9 @@ Configure a virtual machine for use with Kubevirt | cloudinit | object | `{"enabled":true,"secretName":"friend-scrapmetal-user-data"}` | enable or disable usage of cloud-init | | diskErrorPolicy | string | `"report"` | controls hypervisor behavior when IO errors occur on disk read or write. Possible values are: 'report', 'ignore', 'enospace' | | disks | list | `[{"bootorder":2,"bus":"virtio","name":"harddrive","nodePlacement":"scremlin","pvaccessMode":"ReadWriteOnce","pvcname":"debian12","pvcnamespace":"kubevirt","pvsize":"64G","pvstorageClassName":"raid","readonly":false,"source":"pvc","type":"disk"}]` | List of disks to create for the VM, Will be used to create Datavolumes or PVCs. | -| service | list | `[{"externalTrafficPolicy":"Cluster","name":"service","ports":[{"name":"ssh","nodePort":30001,"port":22,"protocol":"TCP","targetPort":22},{"name":"vnc","nodePort":30005,"port":5900,"protocol":"TCP","targetPort":5900}],"type":"LoadBalancer"}]` | Service objects are used to expose the VM to the outside world. Just like int he cloud each VM starts off isolated and will need to be exposed via a LoadBalancer, NodePort, or ClusterIp service. | +| livenessProbe | object | `{"initialDelaySeconds":120,"periodSeconds":20,"tcpSocket":{"port":1500},"timeoutSeconds":10}` | set tieming and port number for liveness probe | +| readinessProbe | object | `{"failureThreshold":3,"httpGet":{"port":1500},"initialDelaySeconds":120,"periodSeconds":20,"successThreshold":3,"timeoutSeconds":10}` | set tieming and port number for readiness probe | +| service | list | `[{"externalTrafficPolicy":"Cluster","name":"service","ports":[{"name":"ssh","nodePort":30001,"port":22,"protocol":"TCP","targetPort":22},{"name":"status","nodePort":30001,"port":1500,"protocol":"TCP","targetPort":1500},{"name":"vnc","nodePort":30005,"port":5900,"protocol":"TCP","targetPort":5900}],"type":"NodePort"}]` | Service objects are used to expose the VM to the outside world. Just like int he cloud each VM starts off isolated and will need to be exposed via a LoadBalancer, NodePort, or ClusterIp service. | | 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 | diff --git a/charts/kubevirt-vm/templates/virtualmachine.yaml b/charts/kubevirt-vm/templates/virtualmachine.yaml index 9f45e86..327e2ad 100644 --- a/charts/kubevirt-vm/templates/virtualmachine.yaml +++ b/charts/kubevirt-vm/templates/virtualmachine.yaml @@ -83,6 +83,14 @@ spec: networks: - name: default pod: {} + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: {{- range $reg, $props := .Values.disks }} {{- if ne "cloudinitvolume" $props.name }} diff --git a/charts/kubevirt-vm/values.yaml b/charts/kubevirt-vm/values.yaml index e4a2dea..7a9c286 100644 --- a/charts/kubevirt-vm/values.yaml +++ b/charts/kubevirt-vm/values.yaml @@ -218,6 +218,11 @@ service: targetPort: 22 protocol: TCP nodePort: 30001 + - name: status + port: 1500 + targetPort: 1500 + protocol: TCP + nodePort: 30001 - name: vnc port: 5900 targetPort: 5900 @@ -242,3 +247,21 @@ service: cloudinit: enabled: true secretName: friend-scrapmetal-user-data + +# -- set tieming and port number for liveness probe +livenessProbe: + initialDelaySeconds: 120 + periodSeconds: 20 + tcpSocket: + port: 1500 + timeoutSeconds: 10 + +# -- set tieming and port number for readiness probe +readinessProbe: + initialDelaySeconds: 120 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 3 + successThreshold: 3 + httpGet: + port: 1500