diff --git a/manifests/kubernetes/auth-service.yaml b/manifests/kubernetes/auth-service.yaml index 248cec2..7bcf251 100644 --- a/manifests/kubernetes/auth-service.yaml +++ b/manifests/kubernetes/auth-service.yaml @@ -42,6 +42,20 @@ spec: image: manojmdocker14/microforge-auth-service:v1.1.0 ports: - containerPort: 8082 + livenessProbe: + httpGet: + path: /api/auth/health + port: 8082 + initialDelaySeconds: 45 + periodSeconds: 20 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /api/auth/health + port: 8082 + initialDelaySeconds: 15 + periodSeconds: 10 + timeoutSeconds: 5 envFrom: - configMapRef: name: auth-service-config diff --git a/manifests/kubernetes/login-mysql.yaml b/manifests/kubernetes/login-mysql.yaml index dd25f42..f8ca7b9 100644 --- a/manifests/kubernetes/login-mysql.yaml +++ b/manifests/kubernetes/login-mysql.yaml @@ -43,6 +43,32 @@ spec: image: manojmdocker14/microforge-users-mysql:v1.0.0 ports: - containerPort: 3306 + startupProbe: + exec: + command: + - bash + - "-c" + - "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}" + failureThreshold: 30 + periodSeconds: 10 + timeoutSeconds: 5 + livenessProbe: + exec: + command: + - bash + - "-c" + - "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}" + periodSeconds: 20 + timeoutSeconds: 5 + readinessProbe: + exec: + command: + - bash + - "-c" + - "mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1;'" + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 5 envFrom: - configMapRef: name: login-mysql-config diff --git a/manifests/kubernetes/metadata-service.yaml b/manifests/kubernetes/metadata-service.yaml index 972e241..6b93f07 100644 --- a/manifests/kubernetes/metadata-service.yaml +++ b/manifests/kubernetes/metadata-service.yaml @@ -43,6 +43,20 @@ spec: image: manojmdocker14/microforge-metadata-service:v1.1.0 ports: - containerPort: 8084 + readinessProbe: + httpGet: + path: /api/metadata/health + port: 8084 + initialDelaySeconds: 45 + periodSeconds: 20 + timeoutSeconds: 5 + livenessProbe: + httpGet: + path: /api/metadata/health + port: 8084 + initialDelaySeconds: 45 + periodSeconds: 10 + timeoutSeconds: 5 envFrom: - configMapRef: name: metadata-service-config diff --git a/manifests/kubernetes/notification-mysql.yaml b/manifests/kubernetes/notification-mysql.yaml index 8602fc4..f98b4e2 100644 --- a/manifests/kubernetes/notification-mysql.yaml +++ b/manifests/kubernetes/notification-mysql.yaml @@ -43,6 +43,32 @@ spec: image: manojmdocker14/microforge-notifications-mysql:v1.0.0 ports: - containerPort: 3306 + startupProbe: + exec: + command: + - bash + - "-c" + - "mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD" + initialDelaySeconds: 15 # Wait 15s before starting the first check + periodSeconds: 10 # Check every 10s + failureThreshold: 30 # Allow 30 failures (Total 5 minutes of boot time) + livenessProbe: + exec: + command: + - bash + - "-c" + - "mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD" + periodSeconds: 20 + timeoutSeconds: 5 + readinessProbe: + exec: + command: + - bash + - "-c" + - "mysql -u root -p$MYSQL_ROOT_PASSWORD -e 'SELECT 1;'" + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 10 envFrom: - configMapRef: name: notification-mysql-config diff --git a/manifests/kubernetes/notification-service.yaml b/manifests/kubernetes/notification-service.yaml index 7751bbe..110619c 100644 --- a/manifests/kubernetes/notification-service.yaml +++ b/manifests/kubernetes/notification-service.yaml @@ -45,6 +45,20 @@ spec: image: manojmdocker14/microforge-notification-service:v1.1.0 ports: - containerPort: 8083 + livenessProbe: + httpGet: + path: /actuator/health + port: 8083 + initialDelaySeconds: 45 # Increased for DB connection setup + periodSeconds: 20 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /actuator/health + port: 8083 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 env: - name: MYSQL_HOST value: notification-mysql