From 3c118b0796f115bdb6c3cc97e109143661a15028 Mon Sep 17 00:00:00 2001 From: Nathan Rashleigh Date: Tue, 8 Apr 2025 23:33:50 +1000 Subject: [PATCH] mnml back --- .gitignore | 3 +- mnml/mnml.ingress.yaml | 16 +++++---- mnml/mnml.yaml | 78 +++++++++++++++++------------------------- 3 files changed, 42 insertions(+), 55 deletions(-) diff --git a/.gitignore b/.gitignore index 5d1f676..658c0c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ pvs/ *.sql -*.tar.gz \ No newline at end of file +*.tar.gz +mnml/mnml.secret.yaml diff --git a/mnml/mnml.ingress.yaml b/mnml/mnml.ingress.yaml index 3d802ad..b176dba 100644 --- a/mnml/mnml.ingress.yaml +++ b/mnml/mnml.ingress.yaml @@ -7,16 +7,17 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: mnml-client + namespace: mnml annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" spec: ingressClassName: haproxy tls: - hosts: - - mnml.gg + - mnml.ntwl.xyz secretName: mnml-tls rules: - - host: mnml.gg + - host: mnml.ntwl.xyz http: paths: - path: / @@ -33,7 +34,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: mnml-api - namespace: default + namespace: mnml annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" haproxy.org/websocket-support: "true" @@ -41,10 +42,10 @@ spec: ingressClassName: haproxy tls: - hosts: - - mnml.gg + - mnml.ntwl.xyz secretName: mnml-tls rules: - - host: mnml.gg + - host: mnml.ntwl.xyz http: paths: - path: /api @@ -61,6 +62,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: mnml-ws + namespace: mnml annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" haproxy.org/websocket-support: "true" @@ -69,10 +71,10 @@ spec: ingressClassName: haproxy tls: - hosts: - - mnml.gg + - mnml.ntwl.xyz secretName: mnml-tls rules: - - host: mnml.gg + - host: mnml.ntwl.xyz http: paths: - path: /api/ws diff --git a/mnml/mnml.yaml b/mnml/mnml.yaml index 95b2141..a6505be 100644 --- a/mnml/mnml.yaml +++ b/mnml/mnml.yaml @@ -1,35 +1,24 @@ +--- + +apiVersion: v1 +kind: Namespace +metadata: + name: mnml + # ----------------------------------------------------------------------- # VOLUMES # ----------------------------------------------------------------------- --- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: mnml-postgres-pv -spec: - storageClassName: local-path - capacity: - storage: 1Gi - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - claimRef: - namespace: default - name: mnml-postgres-pvc - hostPath: - path: "/var/lib/rancher/k3s/storage/mnml-postgres-pv" - type: DirectoryOrCreate - ---- - kind: PersistentVolumeClaim apiVersion: v1 + metadata: + namespace: mnml name: mnml-postgres-pvc spec: - volumeName: mnml-postgres-pv + storageClassName: fast accessModes: - ReadWriteOnce resources: @@ -38,38 +27,19 @@ spec: --- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: mnml-imgs-pv -spec: - storageClassName: local-path - capacity: - storage: 1Gi - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - claimRef: - namespace: default - name: mnml-imgs-pvc - hostPath: - path: "/var/lib/rancher/k3s/storage/mnml-imgs-pv" - type: DirectoryOrCreate - - ---- - kind: PersistentVolumeClaim apiVersion: v1 + metadata: + namespace: mnml name: mnml-imgs-pvc spec: - volumeName: mnml-imgs-pv + storageClassName: fast accessModes: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 2Gi --- @@ -80,7 +50,9 @@ spec: apiVersion: apps/v1 kind: Deployment + metadata: + namespace: mnml name: mnml-postgres spec: replicas: 1 @@ -94,7 +66,7 @@ spec: spec: containers: - name: postgres - image: postgres:latest + image: postgres:16 ports: - containerPort: 5432 env: @@ -126,7 +98,9 @@ spec: apiVersion: apps/v1 kind: Deployment + metadata: + namespace: mnml name: mnml-api spec: replicas: 1 @@ -140,7 +114,7 @@ spec: spec: containers: - name: mnml-api - image: registry.strix.systems/mnml-api + image: registry.ntwl.xyz/mnml-api imagePullPolicy: IfNotPresent ports: - containerPort: 40000 @@ -191,7 +165,9 @@ spec: apiVersion: apps/v1 kind: Deployment + metadata: + namespace: mnml name: mnml-client spec: replicas: 1 @@ -205,7 +181,7 @@ spec: spec: containers: - name: mnml-client - image: registry.strix.systems/mnml-client + image: registry.ntwl.xyz/mnml-client imagePullPolicy: IfNotPresent ports: - containerPort: 8080 @@ -225,7 +201,9 @@ spec: apiVersion: v1 kind: Service + metadata: + namespace: mnml name: mnml-api spec: selector: @@ -238,7 +216,9 @@ spec: apiVersion: v1 kind: Service + metadata: + namespace: mnml name: mnml-ws spec: selector: @@ -251,7 +231,9 @@ spec: apiVersion: v1 kind: Service + metadata: + namespace: mnml name: mnml-postgres spec: selector: @@ -263,7 +245,9 @@ spec: apiVersion: v1 kind: Service + metadata: + namespace: mnml name: mnml-client spec: selector: