mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-21 05:26:49 +00:00
92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mariadb-nextcloud
|
|
namespace: nextcloud
|
|
labels:
|
|
app: mariadb-nextcloud
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mariadb-nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mariadb-nextcloud
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 999
|
|
runAsGroup: 999
|
|
fsGroup: 999
|
|
containers:
|
|
- name: mariadb
|
|
image: mariadb:11.4
|
|
securityContext:
|
|
runAsUser: 999
|
|
runAsGroup: 999
|
|
runAsNonRoot: true
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
args:
|
|
- --character-set-server=utf8mb4
|
|
- --collation-server=utf8mb4_unicode_ci
|
|
- --init-connect=SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
|
env:
|
|
- name: MARIADB_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mariadb-nextcloud
|
|
key: root-password
|
|
- name: MARIADB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mariadb-nextcloud
|
|
key: password
|
|
- name: MARIADB_USER
|
|
value: nextcloud
|
|
- name: MARIADB_DATABASE
|
|
value: nextcloud
|
|
ports:
|
|
- containerPort: 3306
|
|
volumeMounts:
|
|
- name: mariadb-data
|
|
mountPath: /var/lib/mysql
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: run-mysqld
|
|
mountPath: /run/mysqld
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir: {}
|
|
- name: run-mysqld
|
|
emptyDir: {}
|
|
- name: mariadb-data
|
|
persistentVolumeClaim:
|
|
claimName: mariadb-nextcloud-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mariadb-nextcloud
|
|
namespace: nextcloud
|
|
spec:
|
|
selector:
|
|
app: mariadb-nextcloud
|
|
ports:
|
|
- port: 3306
|
|
targetPort: 3306
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: mariadb-nextcloud-pvc
|
|
namespace: nextcloud
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: rook-ceph-block
|
|
resources:
|
|
requests:
|
|
storage: 10Gi |