aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-05-21 06:01:26 -0400
committerXe Iaso <me@xeiaso.net>2024-05-22 12:33:19 -0400
commit348d345b0759431b7c9db4eaadf39d1c1f8d0ddb (patch)
treecf24dae8c948ad7bade0ecf6e1d8b55bec4ac279
parent398cfaa92aef842fe26fe52573c32f63035d9db5 (diff)
downloadx-348d345b0759431b7c9db4eaadf39d1c1f8d0ddb.tar.xz
x-348d345b0759431b7c9db4eaadf39d1c1f8d0ddb.zip
kube: update stuff
Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--kube/alrest/waifud/arch.yaml6
-rw-r--r--kube/alrest/waifud/cipra.yaml51
-rw-r--r--kube/alrest/waifud/fedora-40.yaml63
-rw-r--r--kube/alrest/waifud/namespace.yaml2
-rw-r--r--kube/alrest/waifud/rocky-9.yaml (renamed from kube/alrest/waifud/rocky-9.3.yaml)7
-rw-r--r--kube/alrest/waifud/ubuntu-22.04.yaml6
-rw-r--r--kube/alrest/waifud/ubuntu-24.04.yaml54
-rw-r--r--kube/minecraft-vanilla.yaml109
8 files changed, 234 insertions, 64 deletions
diff --git a/kube/alrest/waifud/arch.yaml b/kube/alrest/waifud/arch.yaml
index 9637ba5..d9d6231 100644
--- a/kube/alrest/waifud/arch.yaml
+++ b/kube/alrest/waifud/arch.yaml
@@ -3,17 +3,17 @@ kind: DataVolume
metadata:
name: "arch-linux"
namespace: waifud
- annotations:
+ labels:
xeiaso.net/project: waifud
spec:
storage:
storageClassName: longhorn
- volumeMode: block # or filesystem
+ volumeMode: Block # or filesystem
accessModes:
- ReadWriteOnce # Necessary as it's no longer has a default
resources:
requests:
- storage: 2Gi
+ storage: 32Gi
source:
http:
url: "https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
diff --git a/kube/alrest/waifud/cipra.yaml b/kube/alrest/waifud/cipra.yaml
deleted file mode 100644
index 521c341..0000000
--- a/kube/alrest/waifud/cipra.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-apiVersion: kubevirt.io/v1
-kind: VirtualMachine
-metadata:
- creationTimestamp: 2018-07-04T15:03:08Z
- generation: 1
- labels:
- kubevirt.io/os: linux
- name: cipra
- namespace: waifud
-spec:
- running: true
- template:
- metadata:
- creationTimestamp: null
- labels:
- kubevirt.io/domain: cipra
- spec:
- domain:
- cpu:
- cores: 2
- devices:
- disks:
- - disk:
- bus: virtio
- name: disk0
- - cdrom:
- bus: sata
- readonly: true
- name: cloudinitdisk
- machine:
- type: q35
- resources:
- requests:
- memory: 2048M
- volumes:
- - name: disk0
- persistentVolumeClaim:
- claimName: cipra
- - cloudInitNoCloud:
- userData: |
- #cloud-config
- hostname: cipra
-
- users:
- - name: xe
- groups: [ wheel ]
- sudo: [ "ALL=(ALL) NOPASSWD:ALL" ]
- shell: /bin/sh
- ssh-authorized-keys:
- - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM6NPbPIcCTzeEsjyx0goWyj6fr2qzcfKCCdOUqg0N/v cadey@kos-mos
- name: cloudinitdisk
diff --git a/kube/alrest/waifud/fedora-40.yaml b/kube/alrest/waifud/fedora-40.yaml
new file mode 100644
index 0000000..1d59a64
--- /dev/null
+++ b/kube/alrest/waifud/fedora-40.yaml
@@ -0,0 +1,63 @@
+apiVersion: cdi.kubevirt.io/v1beta1
+kind: DataVolume
+metadata:
+ name: "fedora-40"
+ namespace: waifud
+spec:
+ storage:
+ storageClassName: longhorn
+ volumeMode: Block
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 32Gi
+ source:
+ http:
+ url: "https://mirror.xenyth.net/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2"
+---
+apiVersion: kubevirt.io/v1
+kind: VirtualMachine
+metadata:
+ labels:
+ kubevirt.io/os: linux
+ name: fedora-40
+ namespace: waifud
+spec:
+ running: true
+ template:
+ metadata:
+ creationTimestamp: null
+ labels:
+ kubevirt.io/domain: fedora-40
+ spec:
+ domain:
+ cpu:
+ cores: 2
+ devices:
+ disks:
+ - disk:
+ bus: virtio
+ name: disk0
+ - cdrom:
+ bus: sata
+ readonly: true
+ name: cloudinitdisk
+ machine:
+ type: q35
+ resources:
+ requests:
+ memory: 1024M
+ volumes:
+ - name: disk0
+ persistentVolumeClaim:
+ claimName: fedora-40
+ - cloudInitNoCloud:
+ userData: |
+ #cloud-config
+ hostname: fedora-40
+ ssh_pwauth: True
+ disable_root: false
+ ssh_authorized_keys:
+ - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF6/+q2dBHEfETomAH7rvDPXHulSXnhcV/szxTAWiKZA cadey@defoko.local
+ name: cloudinitdisk \ No newline at end of file
diff --git a/kube/alrest/waifud/namespace.yaml b/kube/alrest/waifud/namespace.yaml
index 91279f1..0b96d0c 100644
--- a/kube/alrest/waifud/namespace.yaml
+++ b/kube/alrest/waifud/namespace.yaml
@@ -2,5 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
name: waifud
- annotations:
+ labels:
xeiaso.net/project: waifud
diff --git a/kube/alrest/waifud/rocky-9.3.yaml b/kube/alrest/waifud/rocky-9.yaml
index ba6f064..cb38f05 100644
--- a/kube/alrest/waifud/rocky-9.3.yaml
+++ b/kube/alrest/waifud/rocky-9.yaml
@@ -2,18 +2,15 @@ apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
name: "rocky-9.3"
- namespace: waifud
- annotations:
- xeiaso.net/project: waifud
spec:
storage:
storageClassName: longhorn
- volumeMode: block # or filesystem
+ volumeMode: Block # or filesystem
accessModes:
- ReadWriteOnce # Necessary as it's no longer has a default
resources:
requests:
- storage: 10Gi
+ storage: 32Gi
source:
http:
url: "https://download.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud-Base.latest.x86_64.qcow2"
diff --git a/kube/alrest/waifud/ubuntu-22.04.yaml b/kube/alrest/waifud/ubuntu-22.04.yaml
index 3a80515..0d74144 100644
--- a/kube/alrest/waifud/ubuntu-22.04.yaml
+++ b/kube/alrest/waifud/ubuntu-22.04.yaml
@@ -7,9 +7,13 @@ metadata:
xeiaso.net/project: waifud
spec:
storage:
+ storageClassName: longhorn
+ volumeMode: Block # or filesystem
+ accessModes:
+ - ReadWriteOnce # Necessary as it's no longer has a default
resources:
requests:
- storage: 5Gi
+ storage: 32Gi
source:
http:
url: "https://cloud-images.ubuntu.com/daily/server/jammy/current/jammy-server-cloudimg-amd64.img"
diff --git a/kube/alrest/waifud/ubuntu-24.04.yaml b/kube/alrest/waifud/ubuntu-24.04.yaml
index 4c45c4c..55b1a9a 100644
--- a/kube/alrest/waifud/ubuntu-24.04.yaml
+++ b/kube/alrest/waifud/ubuntu-24.04.yaml
@@ -3,13 +3,61 @@ kind: DataVolume
metadata:
name: "ubuntu-24.04"
namespace: waifud
- annotations:
- xeiaso.net/project: waifud
spec:
storage:
+ storageClassName: longhorn
+ volumeMode: Block # or filesystem
+ accessModes:
+ - ReadWriteOnce # Necessary as it's no longer has a default
resources:
requests:
- storage: 5Gi
+ storage: 32Gi
source:
http:
url: "https://cloud-images.ubuntu.com/daily/server/noble/current/noble-server-cloudimg-amd64.img"
+---
+apiVersion: kubevirt.io/v1
+kind: VirtualMachine
+metadata:
+ labels:
+ kubevirt.io/os: linux
+ name: "ubuntu-24.04"
+ namespace: waifud
+spec:
+ running: true
+ template:
+ metadata:
+ creationTimestamp: null
+ labels:
+ kubevirt.io/domain: "ubuntu-22.04"
+ spec:
+ domain:
+ cpu:
+ cores: 2
+ devices:
+ disks:
+ - disk:
+ bus: virtio
+ name: disk0
+ - cdrom:
+ bus: sata
+ readonly: true
+ name: cloudinitdisk
+ machine:
+ type: q35
+ resources:
+ requests:
+ memory: 1024M
+ volumes:
+ - name: disk0
+ persistentVolumeClaim:
+ claimName: "ubuntu-24.04"
+ - cloudInitNoCloud:
+ userData: |
+ #cloud-config
+ hostname: noble
+ ssh_pwauth: True
+ disable_root: false
+ ssh_authorized_keys:
+ - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF6/+q2dBHEfETomAH7rvDPXHulSXnhcV/szxTAWiKZA cadey@defoko.local
+ name: cloudinitdisk \ No newline at end of file
diff --git a/kube/minecraft-vanilla.yaml b/kube/minecraft-vanilla.yaml
new file mode 100644
index 0000000..1c3aa29
--- /dev/null
+++ b/kube/minecraft-vanilla.yaml
@@ -0,0 +1,109 @@
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ labels:
+ app.kubernetes.io/name: minecraft
+ name: vanilla
+spec:
+ accessModes:
+ - ReadWriteMany
+ resources:
+ requests:
+ storage: 8Gi
+ storageClassName: longhorn
+ volumeMode: Filesystem
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: mc-vanilla
+spec:
+ defaultBackend:
+ service:
+ name: vanilla
+ port:
+ number: 25565
+ ingressClassName: tailscale
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: vanilla
+ labels:
+ app.kubernetes.io/name: minecraft
+spec:
+ type: ClusterIP
+ ports:
+ - port: 25565
+ name: main
+ - port: 25575
+ name: rcon
+ protocol: UDP
+ selector:
+ app.kubernetes.io/name: minecraft
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: vanilla
+ labels:
+ app.kubernetes.io/name: minecraft
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: minecraft
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: minecraft
+ spec:
+ containers:
+ - image: ghcr.io/xe/made-cap:latest
+ imagePullPolicy: Always
+ name: vanilla
+ env:
+ # Use secret in real usage
+ - name: EULA
+ value: "true"
+ - name: "MEMORY"
+ value: "4G"
+ - name: "USE_AIKAR_FLAGS"
+ value: "true"
+ securityContext:
+ runAsUser: 1000
+ runAsGroup: 1000
+ runAsNonRoot: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ seccompProfile:
+ type: RuntimeDefault
+ ports:
+ - containerPort: 25565
+ name: main
+ - containerPort: 25575
+ name: rcon
+ protocol: UDP
+ readinessProbe:
+ exec:
+ command: [ "/usr/local/bin/mc-monitor", "status", "--host", "localhost" ]
+ # Give it i + p * f seconds to be ready, so 120 seconds
+ initialDelaySeconds: 20
+ periodSeconds: 5
+ failureThreshold: 20
+ # Monitor ongoing liveness
+ livenessProbe:
+ exec:
+ command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
+ initialDelaySeconds: 120
+ periodSeconds: 60
+ volumeMounts:
+ - name: mc-data
+ mountPath: /data
+ volumes:
+ - name: mc-data
+ persistentVolumeClaim:
+ claimName: vanilla \ No newline at end of file