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: alert-processor-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/alert-processor-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: alert-processor-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: alert-processor-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: alert-processor-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: alert-processor-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: auth-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/auth-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: auth-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -127,20 +106,3 @@ spec:
selector:
app.kubernetes.io/name: auth-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: auth-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: auth-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: external-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/external-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: external-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: external-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: external-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: external-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: forecasting-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/forecasting-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: forecasting-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: forecasting-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: forecasting-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: forecasting-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

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

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: notification-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/notification-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: notification-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: notification-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: notification-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: notification-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: orders-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/orders-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: orders-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: orders-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: orders-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: orders-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pos-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/pos-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: pos-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: pos-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pos-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: pos-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: production-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/production-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: production-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: production-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: production-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: production-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: recipes-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/recipes-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: recipes-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: recipes-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: recipes-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: recipes-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: sales-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/sales-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: sales-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: sales-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sales-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: sales-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: suppliers-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/suppliers-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: suppliers-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: suppliers-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: suppliers-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: suppliers-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: tenant-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/tenant-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: tenant-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -127,20 +106,3 @@ spec:
selector:
app.kubernetes.io/name: tenant-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tenant-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: tenant-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -1,19 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: training-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/training-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: training-db-pvc
emptyDir: {}
- name: init-scripts
configMap:
name: postgres-init-config
@@ -128,19 +107,3 @@ spec:
app.kubernetes.io/name: training-db
app.kubernetes.io/component: database
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: training-db-pvc
namespace: bakery-ia
labels:
app.kubernetes.io/name: training-db
app.kubernetes.io/component: database
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@@ -25,7 +25,7 @@ data:
ALERT_PROCESSOR_DB_USER: YWxlcnRfcHJvY2Vzc29yX3VzZXI= # alert_processor_user
# Database Passwords (base64 encoded from .env)
AUTH_DB_PASSWORD: YXV0aF9wYXNzMTIz # auth_pass123
AUTH_DB_PASSWORD: YXV0aF9wYXNzMTIz # auth_pass123
TENANT_DB_PASSWORD: dGVuYW50X3Bhc3MxMjM= # tenant_pass123
TRAINING_DB_PASSWORD: dHJhaW5pbmdfcGFzczEyMw== # training_pass123
FORECASTING_DB_PASSWORD: Zm9yZWNhc3RpbmdfcGFzczEyMw== # forecasting_pass123
@@ -40,6 +40,22 @@ data:
PRODUCTION_DB_PASSWORD: cHJvZHVjdGlvbl9wYXNzMTIz # production_pass123
ALERT_PROCESSOR_DB_PASSWORD: YWxlcnRfcHJvY2Vzc29yX3Bhc3MxMjM= # alert_processor_pass123
# Database URLs (base64 encoded)
AUTH_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vYXV0aF91c2VyOmF1dGhfcGFzczEyM0BhdXRoLWRiLXNlcnZpY2U6NTQzMi9hdXRoX2Ri # postgresql+asyncpg://auth_user:auth_pass123@auth-db-service:5432/auth_db
TENANT_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vdGVuYW50X3VzZXI6dGVuYW50X3Bhc3MxMjNAdGVuYW50LWRiLXNlcnZpY2U6NTQzMi90ZW5hbnRfZGIK # postgresql+asyncpg://tenant_user:tenant_pass123@tenant-db-service:5432/tenant_db
TRAINING_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vdHJhaW5pbmdfdXNlcjp0cmFpbmluZ19wYXNzMTIzQHRyYWluaW5nLWRiLXNlcnZpY2U6NTQzMi90cmFpbmluZ19kYg== # postgresql+asyncpg://training_user:training_pass123@training-db-service:5432/training_db
FORECASTING_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZm9yZWNhc3RpbmdfdXNlcjpmb3JlY2FzdGluZ19wYXNzMTIzQGZvcmVjYXN0aW5nLWRiLXNlcnZpY2U6NTQzMi9mb3JlY2FzdGluZ19kYg== # postgresql+asyncpg://forecasting_user:forecasting_pass123@forecasting-db-service:5432/forecasting_db
SALES_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vc2FsZXNfdXNlcjpzYWxlc19wYXNzMTIzQHNhbGVzLWRiLXNlcnZpY2U6NTQzMi9zYWxlc19kYg== # postgresql+asyncpg://sales_user:sales_pass123@sales-db-service:5432/sales_db
EXTERNAL_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vZXh0ZXJuYWxfdXNlcjpleHRlcm5hbF9wYXNzMTIzQGV4dGVybmFsLWRiLXNlcnZpY2U6NTQzMi9leHRlcm5hbF9kYg== # postgresql+asyncpg://external_user:external_pass123@external-db-service:5432/external_db
NOTIFICATION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vbm90aWZpY2F0aW9uX3VzZXI6bm90aWZpY2F0aW9uX3Bhc3MxMjNAbm90aWZpY2F0aW9uLWRiLXNlcnZpY2U6NTQzMi9ub3RpZmljYXRpb25fZGI= # postgresql+asyncpg://notification_user:notification_pass123@notification-db-service:5432/notification_db
INVENTORY_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vaW52ZW50b3J5X3VzZXI6aW52ZW50b3J5X3Bhc3MxMjNAaW52ZW50b3J5LWRiLXNlcnZpY2U6NTQzMi9pbnZlbnRvcnlfZGI= # postgresql+asyncpg://inventory_user:inventory_pass123@inventory-db-service:5432/inventory_db
RECIPES_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcmVjaXBlc191c2VyOnJlY2lwZXNfcGFzczEyM0ByZWNpcGVzLWRiLXNlcnZpY2U6NTQzMi9yZWNpcGVzX2Ri # postgresql+asyncpg://recipes_user:recipes_pass123@recipes-db-service:5432/recipes_db
SUPPLIERS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vc3VwcGxpZXJzX3VzZXI6c3VwcGxpZXJzX3Bhc3MxMjNAc3VwcGxpZXJzLWRiLXNlcnZpY2U6NTQzMi9zdXBwbGllcnNfZGI= # postgresql+asyncpg://suppliers_user:suppliers_pass123@suppliers-db-service:5432/suppliers_db
POS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcG9zX3VzZXI6cG9zX3Bhc3MxMjNAcG9zLWRiLXNlcnZpY2U6NTQzMi9wb3NfZGI= # postgresql+asyncpg://pos_user:pos_pass123@pos-db-service:5432/pos_db
ORDERS_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vb3JkZXJzX3VzZXI6b3JkZXJzX3Bhc3MxMjNAb3JkZXJzLWRiLXNlcnZpY2U6NTQzMi9vcmRlcnNfZGI= # postgresql+asyncpg://orders_user:orders_pass123@orders-db-service:5432/orders_db
PRODUCTION_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vcHJvZHVjdGlvbl91c2VyOnByb2R1Y3Rpb25fcGFzczEyM0Bwcm9kdWN0aW9uLWRiLXNlcnZpY2U6NTQzMi9wcm9kdWN0aW9uX2Ri # postgresql+asyncpg://production_user:production_pass123@production-db-service:5432/production_db
ALERT_PROCESSOR_DATABASE_URL: cG9zdGdyZXNxbCthc3luY3BnOi8vYWxlcnRfcHJvY2Vzc29yX3VzZXI6YWxlcnRfcHJvY2Vzc29yX3Bhc3MxMjNAYWxlcnQtcHJvY2Vzc29yLWRiLXNlcnZpY2U6NTQzMi9hbGVydF9wcm9jZXNzb3JfZGI= # postgresql+asyncpg://alert_processor_user:alert_processor_pass123@alert-processor-db-service:5432/alert_processor_db
---
apiVersion: v1
kind: Secret
@@ -175,4 +191,4 @@ metadata:
app.kubernetes.io/component: notifications
type: Opaque
data:
WHATSAPP_API_KEY: eW91ci13aGF0c2FwcC1hcGkta2V5LWhlcmU= # your-whatsapp-api-key-here
WHATSAPP_API_KEY: eW91ci13aGF0c2FwcC1hcGkta2V5LWhlcmU= # your-whatsapp-api-key-here