92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server
|
|
spec:
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
# Image only supports amd64
|
|
- key: kubernetes.io/arch
|
|
operator: In
|
|
values:
|
|
- amd64
|
|
containers:
|
|
- name: sillytavern
|
|
image: ghcr.io/sillytavern/sillytavern:latest
|
|
resources:
|
|
requests:
|
|
memory: 256Mi
|
|
cpu: 200m
|
|
limits:
|
|
memory: 256Mi
|
|
cpu: 200m
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
volumeMounts:
|
|
# - name: sillytavern-plugins
|
|
# mountPath: /home/node/app/plugins
|
|
- name: sillytavern-config
|
|
mountPath: /home/node/app/config/config.yaml
|
|
subPath: config.yaml
|
|
- name: sillytavern-data
|
|
mountPath: /home/node/app/data
|
|
volumes:
|
|
# - name: sillytavern-plugins
|
|
# persistentVolumeClaim:
|
|
# claimName: server-plugins
|
|
- name: sillytavern-config
|
|
configMap:
|
|
name: server-config
|
|
- name: sillytavern-data
|
|
persistentVolumeClaim:
|
|
claimName: server-data
|
|
---
|
|
# apiVersion: v1
|
|
# kind: PersistentVolumeClaim
|
|
# metadata:
|
|
# name: server-plugins
|
|
# spec:
|
|
# accessModes:
|
|
# - ReadWriteOnce
|
|
# resources:
|
|
# requests:
|
|
# storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: server-data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: server
|
|
labels:
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/component: server
|
|
ports:
|
|
- name: http
|
|
port: 8000
|
|
targetPort: http |