- 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>
124 lines
2.8 KiB
YAML
124 lines
2.8 KiB
YAML
---
|
|
# NOTE: Secret 'general-db-secret' must be created manually:
|
|
# kubectl create secret generic general-db-secret \
|
|
# --from-literal=root-password=<ROOT_PASS> \
|
|
# --from-literal=database=general_db \
|
|
# --from-literal=user=<USER> \
|
|
# --from-literal=password=<PASS> \
|
|
# -n infrastructure
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
annotations: {}
|
|
name: general-db-v2-pvc
|
|
namespace: infrastructure
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
storageClassName: nfs-general-db
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
annotations: {}
|
|
name: general-purpose-db
|
|
namespace: infrastructure
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: general-purpose-db
|
|
serviceName: general-purpose-db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: general-purpose-db
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: root-password
|
|
name: general-db-secret
|
|
- name: MYSQL_DATABASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: database
|
|
name: general-db-secret
|
|
- name: MYSQL_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: user
|
|
name: general-db-secret
|
|
- name: MYSQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: password
|
|
name: general-db-secret
|
|
image: mysql:9
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- mysqladmin
|
|
- ping
|
|
- -h
|
|
- localhost
|
|
- -u
|
|
- root
|
|
- -pbackup_root_pass
|
|
failureThreshold: 10
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 10
|
|
timeoutSeconds: 20
|
|
name: mysql
|
|
ports:
|
|
- containerPort: 3306
|
|
name: mysql
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- mysqladmin
|
|
- ping
|
|
- -h
|
|
- localhost
|
|
- -u
|
|
- root
|
|
- -pbackup_root_pass
|
|
failureThreshold: 10
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 10
|
|
timeoutSeconds: 20
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
volumeMounts:
|
|
- mountPath: /var/lib/mysql
|
|
name: mysql-data
|
|
volumes:
|
|
- name: mysql-data
|
|
persistentVolumeClaim:
|
|
claimName: general-db-v2-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations: {}
|
|
name: general-purpose-db
|
|
namespace: infrastructure
|
|
spec:
|
|
clusterIP: None
|
|
ports:
|
|
- name: mysql
|
|
port: 3306
|
|
targetPort: 3306
|
|
selector:
|
|
app: general-purpose-db
|