bookstack

This commit is contained in:
2025-08-24 14:06:38 +02:00
parent 2aaae8ee0f
commit 67c2e0eaa4
5 changed files with 43 additions and 193 deletions

View File

@@ -1,140 +1,90 @@
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-csi-hourly
name: bookstack-csi-hourly
namespace: velero
labels:
velero.io/storage-location: ceph-bucket
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 15-22 * * * # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "0 15-22 * * *"
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: ["bookstack"]
ttl: 8h
snapshotVolumes: true
defaultVolumesToFsBackup: false
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: ceph-bucket
ttl: 8h0m0s
csiSnapshotTimeout: 10m
---
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-csi-daily
name: bookstack-csi-daily
namespace: velero
labels:
velero.io/storage-location: ceph-bucket
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 0 * * * # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "0 0 * * *"
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: ["bookstack"]
ttl: 168h
snapshotVolumes: true
defaultVolumesToFsBackup: false
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: ceph-bucket
ttl: 168h0m0s
csiSnapshotTimeout: 10m
---
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-csi-weekly
name: bookstack-csi-weekly
namespace: velero
labels:
velero.io/storage-location: ceph-bucket
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 0 * * 1 # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "0 0 * * 1"
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: ["bookstack"]
ttl: 730h
snapshotVolumes: true
defaultVolumesToFsBackup: false
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: ceph-bucket
ttl: 730h0m0s
csiSnapshotTimeout: 10m
---
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-restic-daily
name: bookstack-daily
namespace: velero
labels:
velero.io/storage-location: aux-balancer-minio
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 0 * * * # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "30 2 * * *" # tous les jours 02:30
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: [bookstack]
storageLocation: default
ttl: 336h # ~14 jours
snapshotVolumes: false
defaultVolumesToFsBackup: true
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: aux-balancer-minio
ttl: 168h0m0s
---
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-restic-weekly
name: bookstack-weekly
namespace: velero
labels:
velero.io/storage-location: aux-balancer-minio
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 0 * * 1 # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "0 3 * * 0" # chaque dimanche 03:00
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: [bookstack]
storageLocation: default
ttl: 1344h # ~8 semaines
snapshotVolumes: false
defaultVolumesToFsBackup: true
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: aux-balancer-minio
ttl: 730h0m0s
---
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: bookstack-backup-restic-monthly
name: bookstack-monthly
namespace: velero
labels:
velero.io/storage-location: aux-balancer-minio
spec:
# Schedule is a Cron expression defining when to run the Backup
schedule: 0 0 1 * * # every hour
# Specifies whether to use OwnerReferences on backups created by this Schedule.
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
schedule: "0 4 1 * *" # 1er du mois 04:00
useOwnerReferencesInBackup: true
template:
csiSnapshotTimeout: 10m0s
includedNamespaces: [bookstack]
storageLocation: default
ttl: 8760h # ~12 mois
snapshotVolumes: false
defaultVolumesToFsBackup: true
hooks: {}
includedNamespaces:
- bookstack
metadata: {}
storageLocation: aux-balancer-minio
ttl: 4380h0m0s

View File

@@ -31,7 +31,7 @@ data:
# If you change this in the future you may need to run a command
# to update stored URLs in the database. Command example:
# php artisan bookstack:update-url https://old.example.com https://new.example.com
APP_URL=https://bookstack.undercloud.cf
APP_URL=https://bookstack.apps.undercloud.dev
# Database details
DB_HOST='db'
@@ -66,14 +66,14 @@ data:
# The LDAP host, Adding a port is optional
#LDAP_SERVER=example.com:389
# If using LDAP over SSL you should also define the protocol:
LDAP_SERVER=ldaps://ldap.undercloud.cf:636
LDAP_SERVER=ldaps://ldap.undercloud.local:636
# The base DN from where users will be searched within
LDAP_BASE_DN="ou=users,dc=undercloud,dc=cf"
LDAP_BASE_DN="ou=users,dc=undercloud,dc=local"
# The full DN and password of the user used to search the server
# Can both be left as 'false' (without quotes) to bind anonymously
LDAP_DN="cn=bookstack,ou=serviceaccounts,ou=users,dc=undercloud,dc=cf"
LDAP_DN="cn=bookstack,ou=serviceaccounts,ou=users,dc=undercloud,dc=local"
LDAP_PASS="thisismysecureLDAPPWbookstack"
# A filter to use when searching for users
@@ -140,35 +140,6 @@ data:
echo "startup done."
#exit 123
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: bookstack
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
# clusterID is the namespace where the rook cluster is running
# If you change this namespace, also change the namespace below where the secret namespaces are defined
clusterID: rook-ceph
# CephFS filesystem name into which the volume shall be created
fsName: bookstack
# Ceph pool into which the volume shall be created
# Required for provisionVolume: "true"
pool: bookstack-replicated
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
# in the same namespace as the cluster.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Delete
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@@ -180,7 +151,7 @@ spec:
resources:
requests:
storage: 32Gi
storageClassName: bookstack
storageClassName: cephfs-hyper
---
apiVersion: apps/v1
kind: Deployment
@@ -246,7 +217,7 @@ spec:
- name: DB_PORT
value: "3306"
- name: APP_URL
value: "https://bookstack.undercloud.cf"
value: "https://bookstack.apps.undercloud.dev"
- name: DB_USER
valueFrom:
secretKeyRef:

View File

@@ -1,32 +1,3 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: bookstack-db
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
# clusterID is the namespace where the rook cluster is running
# If you change this namespace, also change the namespace below where the secret namespaces are defined
clusterID: rook-ceph
# CephFS filesystem name into which the volume shall be created
fsName: bookstack
# Ceph pool into which the volume shall be created
# Required for provisionVolume: "true"
pool: bookstack-replicated
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
# in the same namespace as the cluster.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Delete
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@@ -38,7 +9,7 @@ spec:
resources:
requests:
storage: 16Gi
storageClassName: bookstack-db
storageClassName: cephfs-hyper
---
apiVersion: apps/v1
kind: Deployment

View File

@@ -1,42 +0,0 @@
apiVersion: ceph.rook.io/v1
kind: CephFilesystem
metadata:
name: bookstack
namespace: rook-ceph
spec:
metadataPool:
failureDomain: host
replicated:
size: 3
dataPools:
- name: replicated
failureDomain: host
replicated:
size: 3
preserveFilesystemOnDelete: false
metadataServer:
activeCount: 1
activeStandby: true
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - mds-node
tolerations:
- key: node-role.kubernetes.io/storage-node
operator: Exists
effect: NoSchedule
# podAffinity:
# podAntiAffinity:
# topologySpreadConstraints:
#resources:
# limits:
# cpu: "80m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"

View File

@@ -10,10 +10,10 @@ metadata:
spec:
tls:
- hosts:
- bookstack.undercloud.cf
- bookstack.apps.undercloud.dev
secretName: bookstack-tls
rules:
- host: bookstack.undercloud.cf
- host: bookstack.apps.undercloud.dev
http:
paths:
- path: /