astrololo: manifesty k8s (data+logic+presentation)
This commit is contained in:
@@ -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 }]
|
||||
Reference in New Issue
Block a user