add kubernetes manifest, add code block regex

This commit is contained in:
mii
2022-12-06 13:01:32 +00:00
parent 68a73a4dae
commit d525636060
3 changed files with 71 additions and 1 deletions

56
manifest/ncb-tts.yaml Normal file
View File

@ -0,0 +1,56 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ncb-tts-deployment
spec:
replicas: 1
selector:
matchLabels:
app: ncb-tts
template:
metadata:
labels:
app: ncb-tts
spec:
containers:
- name: redis
image: redis:7.0.4-alpine
ports:
- containerPort: 6379
name: ncb-redis
volumeMounts:
- name: ncb-redis-pvc
mountPath: /data
- name: tts
image: ghcr.io/morioka22/ncb-tts-r2
volumeMounts:
- name: gcp-credentials
mountPath: /ncb-tts-r2/credentials.json
subPath: credentials.json
env:
- name: NCB_REDIS_URL
value: "redis://localhost:6379/"
- name: NCB_PREFIX
value: "t2!"
- name: NCB_TOKEN
valueFrom:
secretKeyRef:
name: ncb-secret
key: BOT_TOKEN
- name: NCB_VOICEVOX_KEY
valueFrom:
secretKeyRef:
name: ncb-secret
key: VOICEVOX_KEY
- name: NCB_APP_ID
valueFrom:
secretKeyRef:
name: ncb-secret
key: APP_ID
volumes:
- name: ncb-redis-pvc
persistentVolumeClaim:
claimName: ncb-redis-pvc
- name: gcp-credentials
secret:
secretName: gcp-credentials

12
manifest/pvc.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ncb-redis-pvc
labels:
app: ncb-redis
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi