diff --git a/servers/legion/k8s/mudcraft/configmap-voicechat.yaml b/servers/legion/k8s/mudcraft/configmap-voicechat.yaml index 4a7dd80..84f7ce3 100644 --- a/servers/legion/k8s/mudcraft/configmap-voicechat.yaml +++ b/servers/legion/k8s/mudcraft/configmap-voicechat.yaml @@ -15,7 +15,7 @@ data: tcp_rate_limit=16 keep_alive=1000 enable_groups=true - voice_host=mudcraft.nook.family:24454 + voice_host=play.mudcraft.org:24454 allow_recording=true spectator_interaction=false spectator_player_possession=false diff --git a/servers/legion/k8s/mudcraft/deployment-core.yaml b/servers/legion/k8s/mudcraft/deployment-core.yaml new file mode 100644 index 0000000..c124437 --- /dev/null +++ b/servers/legion/k8s/mudcraft/deployment-core.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mudcraft-core + namespace: mudcraft + labels: + app: mudcraft-core +spec: + replicas: 1 + selector: + matchLabels: + app: mudcraft-core + template: + metadata: + labels: + app: mudcraft-core + spec: + containers: + - name: mudcraft-core + image: registry.neuralplatform.ai/mudcraft/core:latest + imagePullPolicy: Always + ports: + - containerPort: 8080 + env: + - name: DB_URL + value: "jdbc:postgresql://postgres-postgresql.platform.svc.cluster.local:5432/mudcraft" + - name: DB_USER + value: "mudcraft" + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: mudcraft-core-secrets + key: db-password + - name: JWT_SECRET + valueFrom: + secretKeyRef: + name: mudcraft-core-secrets + key: jwt-secret + - name: PLUGIN_API_KEY + valueFrom: + secretKeyRef: + name: mudcraft-core-secrets + key: plugin-api-key + readinessProbe: + httpGet: + path: /actuator/health + port: 8080 + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 5 + livenessProbe: + httpGet: + path: /actuator/health + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 30 + failureThreshold: 3 + resources: + requests: + memory: 512Mi + cpu: 250m + limits: + memory: 1Gi + cpu: 1000m diff --git a/servers/legion/k8s/mudcraft/external-secret-core.yaml b/servers/legion/k8s/mudcraft/external-secret-core.yaml new file mode 100644 index 0000000..3aca627 --- /dev/null +++ b/servers/legion/k8s/mudcraft/external-secret-core.yaml @@ -0,0 +1,26 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: mudcraft-core-secrets + namespace: mudcraft +spec: + refreshInterval: 1h + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: mudcraft-core-secrets + creationPolicy: Owner + data: + - secretKey: db-password + remoteRef: + key: secret/data/legion-db + property: mudcraft_db_password + - secretKey: jwt-secret + remoteRef: + key: secret/data/mudcraft + property: jwt_secret + - secretKey: plugin-api-key + remoteRef: + key: secret/data/mudcraft + property: plugin_api_key diff --git a/servers/legion/k8s/mudcraft/ingress-core.yaml b/servers/legion/k8s/mudcraft/ingress-core.yaml new file mode 100644 index 0000000..d7d0275 --- /dev/null +++ b/servers/legion/k8s/mudcraft/ingress-core.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: mudcraft-core-tls + namespace: mudcraft +spec: + secretName: mudcraft-core-tls + issuerRef: + name: letsencrypt-prod + kind: ClusterIssuer + dnsNames: + - api.mudcraft.org +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: mudcraft-core + namespace: mudcraft +spec: + entryPoints: + - websecure + routes: + - match: Host(`api.mudcraft.org`) + kind: Rule + services: + - name: mudcraft-core + port: 8080 + tls: + secretName: mudcraft-core-tls diff --git a/servers/legion/k8s/mudcraft/service-core.yaml b/servers/legion/k8s/mudcraft/service-core.yaml new file mode 100644 index 0000000..1895e3a --- /dev/null +++ b/servers/legion/k8s/mudcraft/service-core.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: mudcraft-core + namespace: mudcraft +spec: + selector: + app: mudcraft-core + ports: + - port: 8080 + targetPort: 8080 + type: ClusterIP