Initial commit: k8s cluster manifests and scripts
This commit is contained in:
43
apps/codimd/manifests/05-codimd-app-deployment.yaml
Normal file
43
apps/codimd/manifests/05-codimd-app-deployment.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: codimd-app
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: codimd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: codimd
|
||||
spec:
|
||||
securityContext: # <-- 這裡開始
|
||||
runAsUser: 0
|
||||
fsGroup: 0 # <-- 結束
|
||||
containers:
|
||||
- name: codimd
|
||||
image: hackmdio/hackmd:latest
|
||||
env:
|
||||
- name: CMD_DB_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: codimd-secrets
|
||||
key: CMD_DB_URL
|
||||
- name: CMD_USECDN
|
||||
value: "false"
|
||||
- name: CMD_DOMAIN
|
||||
value: "codimd.lotimmy.com"
|
||||
- name: CMD_PROTOCOL_USESSL
|
||||
value: "true"
|
||||
- name: CMD_CSP_ENABLE
|
||||
value: "false"
|
||||
volumeMounts:
|
||||
- mountPath: "/home/hackmd/app/public/uploads"
|
||||
name: upload-data
|
||||
volumes:
|
||||
- name: upload-data
|
||||
persistentVolumeClaim:
|
||||
claimName: codimd-upload-pvc
|
||||
Reference in New Issue
Block a user