Fix DB issues

This commit is contained in:
Urtzi Alfaro
2025-09-30 13:32:51 +02:00
parent ec6bcb4c7d
commit 147893015e
51 changed files with 341 additions and 1032 deletions

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: inventory-db-pv
labels:
app.kubernetes.io/component: database
app.kubernetes.io/part-of: bakery-ia
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/opt/bakery-data/inventory-db"
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -79,11 +63,9 @@ spec:
livenessProbe:
exec:
command:
- pg_isready
- -U
- $(POSTGRES_USER)
- -d
- $(POSTGRES_DB)
- sh
- -c
- pg_isready -U $POSTGRES_USER -d $POSTGRES_DB
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 10
@@ -91,19 +73,16 @@ spec:
readinessProbe:
exec:
command:
- pg_isready
- -U
- $(POSTGRES_USER)
- -d
- $(POSTGRES_DB)
- sh
- -c
- pg_isready -U $POSTGRES_USER -d $POSTGRES_DB
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 5
failureThreshold: 3
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: inventory-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: inventory-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: inventory-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: inventory-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi