astrololo: manifesty k8s (data+logic+presentation)

This commit is contained in:
2026-07-17 13:54:46 +02:00
commit 748c450a85
5 changed files with 121 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: data
namespace: astrololo
spec:
replicas: 1
selector: { matchLabels: { app: data } }
template:
metadata: { labels: { app: data } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
containers:
- name: data
image: gitea.czernobog.pl/gitea/astrololo-data:v0.1.0
ports: [{ containerPort: 8002 }]
env:
- name: DATA_PROVIDER
value: "excel"
- name: EXCEL_DIR
value: "/app/data_files" # pliki są W OBRAZIE (COPY . .)
- name: CACHE_DIR
value: "/app/.cache"
- name: INDEXED_KEYS
value: "name,id,symbol"
volumeMounts:
- name: cache
mountPath: /app/.cache
resources:
requests: { cpu: "100m", memory: "256Mi" }
limits: { cpu: "500m", memory: "512Mi" }
volumes:
- name: cache
emptyDir: {} # cache ulotny; odbuduje się po restarcie
---
apiVersion: v1
kind: Service
metadata:
name: data
namespace: astrololo
spec:
selector: { app: data }
ports: [{ port: 8002, targetPort: 8002 }]
+7
View File
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- data.yaml
- logic.yaml
- presentation.yaml
+34
View File
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: logic
namespace: astrololo
spec:
replicas: 1
selector: { matchLabels: { app: logic } }
template:
metadata: { labels: { app: logic } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
containers:
- name: logic
image: gitea.czernobog.pl/gitea/astrololo-logic:v0.1.0
ports: [{ containerPort: 8001 }]
env:
- name: DATA_URL
value: "http://data:8002" # discovery po nazwie Service
- name: EPHEMERIS_ENGINE
value: "own" # silnik własny; swisseph pominięty
# ENGINE_SWISSEPH_URL celowo NIE ustawiamy — engine-swisseph nie jest wdrażany
resources:
requests: { cpu: "100m", memory: "128Mi" }
limits: { cpu: "500m", memory: "512Mi" }
---
apiVersion: v1
kind: Service
metadata:
name: logic
namespace: astrololo
spec:
selector: { app: logic }
ports: [{ port: 8001, targetPort: 8001 }]
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: astrololo
+33
View File
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: presentation
namespace: astrololo
spec:
replicas: 1
selector: { matchLabels: { app: presentation } }
template:
metadata: { labels: { app: presentation } }
spec:
imagePullSecrets: [{ name: gitea-registry }]
containers:
- name: presentation
image: gitea.czernobog.pl/gitea/astrololo-presentation:v0.1.0
ports: [{ containerPort: 8000 }]
env:
- name: LOGIC_URL
value: "http://logic:8001"
resources:
requests: { cpu: "100m", memory: "128Mi" }
limits: { cpu: "300m", memory: "256Mi" }
---
apiVersion: v1
kind: Service
metadata:
name: presentation
namespace: astrololo
spec:
type: NodePort # wejście z przeglądarki
selector: { app: presentation }
ports: [{ port: 8000, targetPort: 8000 }]