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