75 lines
1.4 KiB
YAML
75 lines
1.4 KiB
YAML
![]() |
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: nlp
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
replicas: 2
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: nlp
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: nlp
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nlp
|
||
|
image: generalbotsproject/nlp:latest
|
||
|
ports:
|
||
|
- containerPort: 8080
|
||
|
env:
|
||
|
- name: RUST_LOG
|
||
|
value: info
|
||
|
- name: MODEL_CACHE_DIR
|
||
|
value: /models
|
||
|
volumeMounts:
|
||
|
- name: models
|
||
|
mountPath: /models
|
||
|
resources:
|
||
|
requests:
|
||
|
memory: "4Gi"
|
||
|
cpu: "2000m"
|
||
|
limits:
|
||
|
memory: "8Gi"
|
||
|
cpu: "4000m"
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /health
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 30
|
||
|
periodSeconds: 10
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /health
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 60
|
||
|
periodSeconds: 20
|
||
|
volumes:
|
||
|
- name: models
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nlp-models
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: nlp
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
app: nlp
|
||
|
ports:
|
||
|
- port: 8080
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: nlp-models
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 50Gi
|