From afd595fcc8732db7da5c593ea8662f3962e6430a Mon Sep 17 00:00:00 2001 From: Shard Date: Thu, 23 Apr 2026 00:13:06 +0000 Subject: [PATCH] Add SOR website deployment/service and ingress; align Argo revision --- deploy/argo/application.yaml | 2 +- deploy/k8s/deployment-website.yaml | 78 ++++++++++++++++++++++++++++++ deploy/k8s/ingress.yaml | 17 +++++++ deploy/k8s/service-website.yaml | 14 ++++++ 4 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 deploy/k8s/deployment-website.yaml create mode 100644 deploy/k8s/service-website.yaml diff --git a/deploy/argo/application.yaml b/deploy/argo/application.yaml index 811d009..8794adc 100644 --- a/deploy/argo/application.yaml +++ b/deploy/argo/application.yaml @@ -13,7 +13,7 @@ spec: source: # TODO: verify this matches your Gitea repository URL. repoURL: https://git.aeternalisgames.com/dingo/SOR.git - targetRevision: master + targetRevision: main # ArgoCD watches this path for changes and syncs when manifests are updated. path: deploy/k8s diff --git a/deploy/k8s/deployment-website.yaml b/deploy/k8s/deployment-website.yaml new file mode 100644 index 0000000..70cbde9 --- /dev/null +++ b/deploy/k8s/deployment-website.yaml @@ -0,0 +1,78 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: sor-website + namespace: stone-server + labels: + app: sor-website +spec: + replicas: 1 + selector: + matchLabels: + app: sor-website + template: + metadata: + annotations: + sor/redeploy-at: "initial" + labels: + app: sor-website + spec: + imagePullSecrets: + - name: harbor-credentials + + containers: + - name: sor-website + image: registry.aeternalisgames.com/sor/sor-website:latest + ports: + - containerPort: 8080 + + envFrom: + - configMapRef: + name: sor-config + + env: + - name: ConnectionStrings__Default + valueFrom: + secretKeyRef: + name: sor-app-secrets + key: ConnectionStrings__Default + + - name: ConnectionStrings__Redis + valueFrom: + secretKeyRef: + name: redis-credentials + key: connection-string + + - name: Cdn__PublicBaseUrl + valueFrom: + secretKeyRef: + name: sor-app-secrets + key: Cdn__PublicBaseUrl + + livenessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 15 + periodSeconds: 30 + timeoutSeconds: 5 + failureThreshold: 3 + + readinessProbe: + httpGet: + path: /health + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + + resources: + requests: + cpu: "100m" + memory: "128Mi" + limits: + cpu: "500m" + memory: "512Mi" diff --git a/deploy/k8s/ingress.yaml b/deploy/k8s/ingress.yaml index b90f733..4a38a7c 100644 --- a/deploy/k8s/ingress.yaml +++ b/deploy/k8s/ingress.yaml @@ -39,7 +39,24 @@ spec: - control.aeternalisgames.com secretName: control-tls + # aeternalisgames.com — public website. + - hosts: + - aeternalisgames.com + secretName: website-tls + rules: + # ── Public website ───────────────────────────────────────────────────────── + - host: aeternalisgames.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: sor-website + port: + number: 80 + # ── Game server / WebSocket gateway ──────────────────────────────────────── - host: hub.aeternalisgames.com http: diff --git a/deploy/k8s/service-website.yaml b/deploy/k8s/service-website.yaml new file mode 100644 index 0000000..2dacf23 --- /dev/null +++ b/deploy/k8s/service-website.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: sor-website + namespace: stone-server +spec: + selector: + app: sor-website + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 8080 + type: ClusterIP