92 lines
1.9 KiB
YAML
92 lines
1.9 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: joel-bot
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: joel-bot-data
|
|
namespace: joel-bot
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 5Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: joel-bot
|
|
namespace: joel-bot
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 2
|
|
selector:
|
|
matchLabels:
|
|
app: joel-bot
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: joel-bot
|
|
spec:
|
|
containers:
|
|
- name: joel-bot
|
|
image: ghcr.io/your-org/joel-bot:latest
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: LOG_LEVEL
|
|
value: "info"
|
|
- name: DATABASE_PATH
|
|
value: /data/db.sqlite3
|
|
- name: WEB_PORT
|
|
value: "3000"
|
|
envFrom:
|
|
- secretRef:
|
|
name: joel-bot-env
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: joel-bot-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: joel-bot
|
|
namespace: joel-bot
|
|
spec:
|
|
selector:
|
|
app: joel-bot
|
|
ports:
|
|
- name: http
|
|
port: 3000
|
|
targetPort: http
|