Fix bookstack deployment to use existing resources
- Change MySQL from StatefulSet to Deployment to match existing setup - Use existing PVC mysql-data-encrypted (contains live data) instead of creating new mysql-data - Add PersistentVolumeClaim for bookstack-config to persist APP_KEY and configuration - Remove duplicate MySQL resource definitions - Align with current working deployment while making Forgejo the source of truth Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
62c4398787
commit
bfbd791103
1 changed files with 20 additions and 40 deletions
|
|
@ -4,28 +4,13 @@ kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: bookstack
|
name: bookstack
|
||||||
---
|
---
|
||||||
# MySQL PersistentVolumeClaim
|
# MySQL Deployment
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: mysql-data
|
|
||||||
namespace: bookstack
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
storageClassName: hcloud-volumes-encrypted
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
---
|
|
||||||
# MySQL StatefulSet
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: mysql
|
name: mysql
|
||||||
namespace: bookstack
|
namespace: bookstack
|
||||||
spec:
|
spec:
|
||||||
serviceName: mysql
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|
@ -70,32 +55,12 @@ spec:
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
limits:
|
limits:
|
||||||
memory: "2Gi"
|
memory: "1Gi"
|
||||||
cpu: "1000m"
|
cpu: "1000m"
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- mysqladmin
|
|
||||||
- ping
|
|
||||||
- -h
|
|
||||||
- localhost
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- mysqladmin
|
|
||||||
- ping
|
|
||||||
- -h
|
|
||||||
- localhost
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 5
|
|
||||||
timeoutSeconds: 3
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: mysql-data
|
- name: mysql-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: mysql-data
|
claimName: mysql-data-encrypted
|
||||||
---
|
---
|
||||||
# MySQL Service
|
# MySQL Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|
@ -112,6 +77,20 @@ spec:
|
||||||
targetPort: 3306
|
targetPort: 3306
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
---
|
---
|
||||||
|
# Bookstack Config PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: bookstack-config
|
||||||
|
namespace: bookstack
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: hcloud-volumes-encrypted
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
---
|
||||||
# Bookstack Deployment
|
# Bookstack Deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|
@ -236,7 +215,8 @@ spec:
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
volumes:
|
volumes:
|
||||||
- name: bookstack-config
|
- name: bookstack-config
|
||||||
emptyDir: {}
|
persistentVolumeClaim:
|
||||||
|
claimName: bookstack-config
|
||||||
---
|
---
|
||||||
# Bookstack Service
|
# Bookstack Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue