generated from phoenix-oss/tenant-tpl
Ubuntu VM Test Helm
This commit is contained in:
parent
0af35b308b
commit
70c9cc437d
7 changed files with 99 additions and 0 deletions
|
@ -4,3 +4,4 @@ resources:
|
||||||
- vars/ks.yaml
|
- vars/ks.yaml
|
||||||
- repos/ks.yaml
|
- repos/ks.yaml
|
||||||
- echo-server/ks.yaml
|
- echo-server/ks.yaml
|
||||||
|
- ubuntu-vm-helm/ks.yaml
|
20
ubuntu-vm-helm/ks.yaml
Normal file
20
ubuntu-vm-helm/ks.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app ubuntu-vm-helm
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
spec:
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./ubuntu-vm-helm/ubuntu
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
4
ubuntu-vm-helm/ubuntu/charts/chart
Normal file
4
ubuntu-vm-helm/ubuntu/charts/chart
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: ubuntu-helm
|
||||||
|
description: Deploy an Unbuntu VirtualMachine using KubeVirt
|
||||||
|
version: 0.1.0
|
7
ubuntu-vm-helm/ubuntu/charts/values
Normal file
7
ubuntu-vm-helm/ubuntu/charts/values
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
vmName: ubuntu-helm
|
||||||
|
namespace: kubevirt-vms
|
||||||
|
imageURL: "quay.io/containerdisks/ubuntu:22.04"
|
||||||
|
storageSize: 40Gi
|
||||||
|
storageClassName: standard
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
23
ubuntu-vm-helm/ubuntu/helmrelease.yaml
Normal file
23
ubuntu-vm-helm/ubuntu/helmrelease.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: &app ubuntu-vm-helm
|
||||||
|
spec:
|
||||||
|
serviceAccountName: ${TECHNICAL_ACCOUNT}
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: ./charts # local path in Git repo
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: tenant-repos
|
||||||
|
namespace: ${TENANT_NAMESPACE}
|
||||||
|
values:
|
||||||
|
vmName: ubuntu-helm
|
||||||
|
namespace: kubevirt-vms
|
||||||
|
imageURL: "quay.io/containerdisks/ubuntu:22.04"
|
||||||
|
storageSize: 50Gi
|
||||||
|
cpu: 4
|
||||||
|
memory: 4Gi
|
17
ubuntu-vm-helm/ubuntu/template/datavolume
Normal file
17
ubuntu-vm-helm/ubuntu/template/datavolume
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: cdi.kubevirt.io/v1beta1
|
||||||
|
kind: DataVolume
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.vmName }}-dv
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
spec:
|
||||||
|
source:
|
||||||
|
http:
|
||||||
|
url: "{{ .Values.imageURL }}"
|
||||||
|
contentType: kubevirt
|
||||||
|
pvc:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.storageSize }}
|
||||||
|
storageClassName: {{ .Values.storageClassName }}
|
27
ubuntu-vm-helm/ubuntu/template/vm
Normal file
27
ubuntu-vm-helm/ubuntu/template/vm
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: kubevirt.io/v1
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.vmName }}
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
spec:
|
||||||
|
running: true
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubevirt.io/domain: {{ .Values.vmName }}
|
||||||
|
spec:
|
||||||
|
domain:
|
||||||
|
cpu:
|
||||||
|
cores: {{ .Values.cpu }}
|
||||||
|
devices:
|
||||||
|
disks:
|
||||||
|
- name: rootdisk
|
||||||
|
disk:
|
||||||
|
bus: virtio
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: {{ .Values.memory }}
|
||||||
|
volumes:
|
||||||
|
- name: rootdisk
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.vmName }}-dv
|
Loading…
Add table
Add a link
Reference in a new issue