From a77c4f8bb4567077cdd0da7ce209b5249759ec6e Mon Sep 17 00:00:00 2001 From: "maximilian.bartz" Date: Thu, 14 Aug 2025 17:01:29 +0200 Subject: [PATCH] added vitabyte test --- kustomization.yaml | 1 + ubuntu-vm-5/ks.yaml | 18 +++++++++ ubuntu-vm-5/pvc/ubuntu-datadisk.yaml | 14 +++++++ ubuntu-vm-5/ubuntu/ubuntu-vm.yaml | 49 ++++++++++++++++++++++++ vars/demo/ubuntu-cloud-init.secrets.yaml | 23 +++++++++++ 5 files changed, 105 insertions(+) create mode 100644 ubuntu-vm-5/ks.yaml create mode 100644 ubuntu-vm-5/pvc/ubuntu-datadisk.yaml create mode 100644 ubuntu-vm-5/ubuntu/ubuntu-vm.yaml create mode 100644 vars/demo/ubuntu-cloud-init.secrets.yaml diff --git a/kustomization.yaml b/kustomization.yaml index 6135f02..4fe26e8 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -13,6 +13,7 @@ resources: - ubuntu-vm-2/ks.yaml - ubuntu-vm-3/ks.yaml - ubuntu-vm-4-john/ks.yaml + - ubuntu-vm-5/ks.yaml - container/ks-debug.yaml - templates/image-server/ks-nginx.yaml - templates/image-server/ks-pvc.yaml diff --git a/ubuntu-vm-5/ks.yaml b/ubuntu-vm-5/ks.yaml new file mode 100644 index 0000000..38d2fe4 --- /dev/null +++ b/ubuntu-vm-5/ks.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app ubuntu-vm-5 + namespace: ${TENANT_NAMESPACE} +spec: + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./ubuntu-vm-5 + prune: true + sourceRef: + kind: GitRepository + name: tenant-repos + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m diff --git a/ubuntu-vm-5/pvc/ubuntu-datadisk.yaml b/ubuntu-vm-5/pvc/ubuntu-datadisk.yaml new file mode 100644 index 0000000..d6ce155 --- /dev/null +++ b/ubuntu-vm-5/pvc/ubuntu-datadisk.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ubuntu-datadisk-1 + namespace: ${TENANT_NAMESPACE} + labels: + app: ubuntu-vm-1 +spec: + volumeMode: Filesystem + accessModes: + - ReadWriteMany + resources: + requests: + storage: 50Gi \ No newline at end of file diff --git a/ubuntu-vm-5/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-5/ubuntu/ubuntu-vm.yaml new file mode 100644 index 0000000..a30a590 --- /dev/null +++ b/ubuntu-vm-5/ubuntu/ubuntu-vm.yaml @@ -0,0 +1,49 @@ +apiVersion: kubevirt.io/v1 +kind: VirtualMachine +metadata: + name: &name ubuntu-vm-1 + namespace: ${TENANT_NAMESPACE} +spec: + running: true + template: + metadata: + labels: + app: *name + kubevirt.io/domain: *name + spec: + hostname: ubuntu + subdomain: vitabyte + domain: + devices: + disks: + - disk: + bus: scsi + name: ubuntu-rootdisk + - disk: + bus: scsi + name: ubuntu-datadisk + - disk: + bus: virtio + name: cloudinit-disk + cpu: + sockets: 1 + cores: 2 + threads: 1 + resources: + requests: + cpu: 2 + memory: 2Gi + limits: + cpu: 2 + memory: 2Gi + volumes: + - name: ubuntu-rootdisk + containerDisk: + image: quay.io/containerdisks/ubuntu:22.04 + - name: ubuntu-datadisk + persistentVolumeClaim: + claimName: ubuntu-datadisk-1 + - name: cloudinit-disk + cloudInitNoCloud: + secretRef: + name: ubuntu-cloud-init \ No newline at end of file diff --git a/vars/demo/ubuntu-cloud-init.secrets.yaml b/vars/demo/ubuntu-cloud-init.secrets.yaml new file mode 100644 index 0000000..a6c8857 --- /dev/null +++ b/vars/demo/ubuntu-cloud-init.secrets.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Secret +metadata: + name: ubuntu-cloud-init +stringData: + userData: |- + #cloud-config + hostname: ubuntu + fqdn: ubuntu.vitabyte.basel.kvant.cloud + prefer_fqdn_over_hostname: false + users: + - name: vitabyte + ssh-authorized-keys: + - ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHUMdz8TOsgNVavPkFkNoe6AtvTJi29t4ncS+EzX5gpG8LDsxLjTmUeFkTnyyP9Lw1y3JCo1dqF3HIzbaDRyc1MIgGinb6HoDAGzyTRAr/TzAPSlKeTVbGHVaLcneaLtuyKblgdGwl9VH2DWVZL+/s+IXVINubxxQjxHEVxRXJuOqnloQ== kubevirt@phoenix-systems.ch + sudo: ['ALL=(ALL) NOPASSWD:ALL'] + shell: /bin/bash + fs_setup: + - label: data + filesystem: ext4 + device: /dev/vdb + overwrite: false + mounts: + - [ /dev/vdb, /data, "ext4", "defaults,nofail", "0", "2" ]