homelab/deployment/storage/owncloud-mariadb.yaml
Dan V deb6c38d7b chore: commit homelab setup — deployment, services, orchestration, skill
- Add .gitignore: exclude compiled binaries, build artifacts, and Helm
  values files containing real secrets (authentik, prometheus)
- Add all Kubernetes deployment manifests (deployment/)
- Add services source code: ha-sync, device-inventory, games-console,
  paperclip, parts-inventory
- Add Ansible orchestration: playbooks, roles, inventory, cloud-init
- Add hardware specs, execution plans, scripts, HOMELAB.md
- Add skills/homelab/SKILL.md + skills/install.sh to preserve Copilot skill
- Remove previously-tracked inventory-cli binary from git index

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 08:10:32 +02:00

117 lines
2.5 KiB
YAML

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations: {}
name: owncloud-mariadb-v2-pvc
namespace: storage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: nfs-owncloud
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
name: owncloud-mariadb
namespace: storage
spec:
replicas: 1
selector:
matchLabels:
app: owncloud-mariadb
serviceName: owncloud-mariadb
template:
metadata:
labels:
app: owncloud-mariadb
spec:
containers:
- args:
- --max-allowed-packet=128M
- --innodb-log-file-size=64M
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
key: root-password
name: owncloud-db-secret
- name: MYSQL_USER
valueFrom:
secretKeyRef:
key: user
name: owncloud-db-secret
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: owncloud-db-secret
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
key: database
name: owncloud-db-secret
- name: MARIADB_AUTO_UPGRADE
value: '1'
image: mariadb:10.6
livenessProbe:
exec:
command:
- mysqladmin
- ping
- -u
- root
- -powncloud
failureThreshold: 5
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
name: mariadb
ports:
- containerPort: 3306
name: mysql
readinessProbe:
exec:
command:
- mysqladmin
- ping
- -u
- root
- -powncloud
failureThreshold: 5
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-data
volumes:
- name: mysql-data
persistentVolumeClaim:
claimName: owncloud-mariadb-v2-pvc
---
apiVersion: v1
kind: Service
metadata:
annotations: {}
name: owncloud-mariadb
namespace: storage
spec:
clusterIP: None
ports:
- name: mysql
port: 3306
targetPort: 3306
selector:
app: owncloud-mariadb