fix(ib-gateway): zero-pad AUTO_RESTART_TIME (8:00->08:00 AM) — stops ~16 restarts/day

IBC's parser rejected '8:00 AM' ('Auto restart time setting must be hh:mm AM/PM'),
leaving the daily auto-restart UNCONFIGURED, so the gateway churned ~35 restarts over
2 days instead of one clean daily cycle. Zero-padded to '08:00 AM' — IBC now logs
'Auto restart time set to 08:00 AM' (verified live 2026-07-20, fresh pod RESTARTS=0).
08:00 UTC is before the 09:00 UTC UCITS rebalance window so the daily restart won't
collide with execution. Also bumped liveness failureThreshold 5->6 (180s) for the
reauth window.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 21:30:01 +00:00
parent 9baf1f8115
commit a16b341d90

View File

@@ -76,8 +76,11 @@ spec:
# full re-login each time). 08:00 UTC is clear of the 14:35 rebalancer + 23:30 nightly windows.
- name: TIME_ZONE
value: "Etc/UTC"
# MUST be zero-padded hh:mm (IBC's parser rejects "8:00 AM" with "Auto restart time setting must be
# hh:mm AM or hh:mm PM" — the rejection left the daily auto-restart UNCONFIGURED, so the gateway
# churned ~16 restarts/day instead of one clean daily cycle. Verified in the pod log 2026-07-20.)
- name: AUTO_RESTART_TIME
value: "8:00 AM"
value: "08:00 AM"
# Persist jts.ini + IBC config across pod restarts (a fresh empty volume just does a clean first-run
# login) so settings survive a deploy/reschedule instead of being rebuilt each time.
- name: TWS_SETTINGS_PATH
@@ -105,7 +108,9 @@ spec:
port: 4002
initialDelaySeconds: 120
periodSeconds: 30
failureThreshold: 5
# 6×30s = 180s tolerance: the daily auto-restart + IBKR reauth window drops port 4002 for up to a
# couple of minutes; too tight a threshold would k8s-kill the pod mid-reauth and compound the churn.
failureThreshold: 6
volumeMounts:
- name: tws-settings
mountPath: /home/ibgateway/tws_settings