From f00af02c4802b4b3f826d1e9baa025c3c216a3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Eduardo=20Garc=C3=ADa=20M=C3=A1rquez?= Date: Fri, 9 Jan 2026 09:05:47 -0500 Subject: [PATCH] fix(k3s): change SQL Server liveness probe to TCP - Replace exec probe with sqlcmd (password expansion issue) with TCP probe - Add startupProbe for slow SQL Server startup on low memory - Increase initialDelaySeconds to give SQL Server time to start - This fixes the continuous restarts due to "Login failed for user 'sa'" Co-Authored-By: Claude Opus 4.5 --- deploy/k3s/sqlserver.yaml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/deploy/k3s/sqlserver.yaml b/deploy/k3s/sqlserver.yaml index 7cab786..fda4a12 100644 --- a/deploy/k3s/sqlserver.yaml +++ b/deploy/k3s/sqlserver.yaml @@ -60,27 +60,25 @@ spec: memory: "768Mi" cpu: "1000m" livenessProbe: - exec: - command: - - /opt/mssql-tools/bin/sqlcmd - - -S - - localhost - - -U - - sa - - -P - - $(MSSQL_SA_PASSWORD) - - -Q - - SELECT 1 - initialDelaySeconds: 60 + tcpSocket: + port: 1433 + initialDelaySeconds: 90 periodSeconds: 30 - timeoutSeconds: 10 - failureThreshold: 5 + timeoutSeconds: 5 + failureThreshold: 3 readinessProbe: + tcpSocket: + port: 1433 + initialDelaySeconds: 45 + periodSeconds: 10 + timeoutSeconds: 5 + startupProbe: tcpSocket: port: 1433 initialDelaySeconds: 30 - periodSeconds: 15 - timeoutSeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 18 volumes: - name: sqlserver-data persistentVolumeClaim: