added another vm

This commit is contained in:
maximilian.bartz 2025-05-06 16:23:26 +02:00
parent 8a1dcefe44
commit 2f8a63eb74
3 changed files with 67 additions and 0 deletions

View file

@ -6,6 +6,7 @@ resources:
- echo-server/ks.yaml
- ubuntu-vm-1/ks.yaml
- ubuntu-vm-2/ks.yaml
- ubuntu-vm-3/ks.yaml
- container/ks-debug.yaml
- templates/image-server/ks-nginx.yaml
- templates/image-server/ks-pvc.yaml

18
ubuntu-vm-3/ks.yaml Normal file
View file

@ -0,0 +1,18 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app ubuntu-vm-3
namespace: ${TENANT_NAMESPACE}
spec:
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./ubuntu-vm-3/ubuntu
prune: true
sourceRef:
kind: GitRepository
name: tenant-repos
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m

View file

@ -0,0 +1,48 @@
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: ubuntu-vm-3
namespace: kubevirt-vms
spec:
running: true
template:
metadata:
labels:
kubevirt.io/domain: ubuntu-vm-3
spec:
domain:
cpu:
cores: 2
devices:
disks:
- disk:
bus: virtio
name: containerdisk
- disk:
bus: virtio
name: cloudinitdisk
resources:
requests:
memory: 2Gi
cpu: 1
limits:
memory: 2Gi
cpu: 2
memory:
guest: 2Gi
volumes:
- name: containerdisk
containerDisk:
image: quay.io/containerdisks/ubuntu:22.04
- name: cloudinitdisk
cloudInitNoCloud:
userData: |
#cloud-config
hostname: ubuntu-vm-1
ssh_pwauth: True
users:
- name: ubuntu
ssh-authorized-keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqlhZW/pPLK8zENt3o6tgl0QVinhGAF1sHvajqq3UvI ubuntu
sudo: ['ALL=(ALL) NOPASSWD:ALL']
shell: /bin/bash