💥 add all the files

This commit is contained in:
2024-06-19 11:39:18 +01:00
commit 745751723f
7 changed files with 254 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
apiVersion: v1
kind: Namespace
metadata:
name: bookstack
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bookstack-database
namespace: bookstack
spec:
replicas: 1
selector:
matchLabels:
app: bookstack-database
template:
metadata:
labels:
app: bookstack-database
spec:
containers:
- name: bookstack-database
image: lscr.io/linuxserver/mariadb
imagePullPolicy: Always
ports:
- containerPort: 3306
name: database-port
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: bookstack-credentials
key: DB_PASS
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
name: bookstack-credentials
key: DB_DATABASE
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: bookstack-credentials
key: DB_USER
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: bookstack-credentials
key: DB_PASS
envFrom:
# - secretRef:
# name: bookstack-credentials
- configMapRef:
name: config
volumeMounts:
- name: bookstack-database
mountPath: /config
volumes:
- name: bookstack-database
persistentVolumeClaim:
claimName: bookstack-database
securityContext:
fsGroup: 33
---
apiVersion: v1
kind: Service
metadata:
name: db
namespace: bookstack
spec:
ports:
- name: db
port: 3306
protocol: TCP
selector:
app: bookstack-database
+63
View File
@@ -0,0 +1,63 @@
apiVersion: v1
kind: Namespace
metadata:
name: bookstack
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bookstack-webserver
namespace: bookstack
spec:
replicas: 1
selector:
matchLabels:
app: bookstack-webserver
template:
metadata:
labels:
app: bookstack-webserver
spec:
nodeName: kube-master
containers:
- name: bookstack-webserver
image: lscr.io/linuxserver/bookstack
imagePullPolicy: Always
ports:
- containerPort: 80
name: webserver-port
envFrom:
- secretRef:
name: bookstack-credentials
- configMapRef:
name: config
resources:
requests:
cpu: 300m
memory: 300M
volumeMounts:
- name: bookstack-webserver
mountPath: /config
volumes:
- name: bookstack-webserver
persistentVolumeClaim:
claimName: bookstack-webserver
securityContext:
fsGroup: 33
---
apiVersion: v1
kind: Service
metadata:
name: webserver
namespace: bookstack
spec:
ports:
- name: http
port: 80
protocol: TCP
selector:
app: bookstack-webserver
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: config
namespace: bookstack
data:
LOCAL_UID: "1000"
LOCAL_GID: "1000"
TZ: "Europe/London"
APP_URL: "https://bookstack.tryton.geeraert.eu"
DB_PORT: "3306"
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
data:
DB_DATABASE: Ym9va3N0YWNrYXBw
DB_HOST: ZGIuYm9va3N0YWNrLnN2Yw==
DB_PASS: VW5oYXBweS1Db21tZW5jZS1FdmVyeW9uZTQ=
DB_USER: Ym9va3N0YWNrX3VzZXJuYW1l
kind: Secret
metadata:
creationTimestamp: "2024-06-13T07:37:49Z"
name: bookstack-credentials
namespace: bookstack
resourceVersion: "20756717"
uid: 66d4cc7d-741a-49cc-979d-a8b95ffb983a
type: Opaque
+56
View File
@@ -0,0 +1,56 @@
apiVersion: v1
kind: Namespace
metadata:
name: bookstack
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bookstack
namespace: bookstack
spec:
replicas: 1
selector:
matchLabels:
app: bookstack
template:
metadata:
labels:
app: bookstack
spec:
containers:
- image: bookstack:latest
imagePullPolicy: IfNotPresent
name: bookstack
ports:
- containerPort: 8080
name: bookstack-port
volumeMounts:
- name: bookstack-config
mountPath: /data
- name: bookstack-configfile
mountPath: /docker-entrypoint-initdb.d/init-mongo.jsconfigfile.txt
volumes:
- name: bookstack-config
hostPath:
path: /opt/kubernetes/bookstack_kube/config/
- name: bookstack-configfile
hostPath:
path: /opt/kubernetes/bookstack_kube/configfile.txt
type: File
---
apiVersion: v1
kind: Service
metadata:
name: bookstack
namespace: bookstack
spec:
ports:
- port: 8080
targetPort: bookstack-port
protocol: TCP
nodePort: 30007
type: NodePort
selector:
app: bookstack
+5
View File
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: bookstack
+25
View File
@@ -0,0 +1,25 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: bookstack-webserver
namespace: bookstack
spec:
storageClassName: nfs-storage-intelligent
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: bookstack-database
namespace: bookstack
spec:
storageClassName: nfs-storage-intelligent
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi