update deployment

This commit is contained in:
Graham McIntire 2026-01-25 15:29:38 -06:00
parent d2abe9a14d
commit 76854479c9
No known key found for this signature in database

View file

@ -5,13 +5,13 @@ metadata:
name: towerops
namespace: towerops
spec:
replicas: 1
replicas: 3 # Run 3 replicas for high availability
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1 # Allow 1 extra pod during rollout
maxUnavailable: 0 # Keep all pods running during rollout
minReadySeconds: 20 # Wait 20s after pod is ready for cluster sync before continuing
minReadySeconds: 30 # Wait 30s after pod is ready before considering it available
selector:
matchLabels:
app: towerops
@ -22,7 +22,7 @@ spec:
spec:
# Use system-cluster-critical priority to ensure towerops starts after CNI is ready
priorityClassName: system-cluster-critical
terminationGracePeriodSeconds: 60 # Allow 60s for Horde graceful shutdown (30s) + drain time
terminationGracePeriodSeconds: 90 # Allow 90s for graceful shutdown and connection draining
imagePullSecrets:
- name: gitlab-registry
securityContext:
@ -58,10 +58,10 @@ spec:
- /bin/sh
- -c
- |
# Stop accepting new connections
# Give etcd coordinator time to release locks (watches trigger instant failover)
# This sleep allows graceful shutdown before SIGTERM is sent
sleep 10
# Stop accepting new connections by failing readiness probe
# Give load balancer time to remove pod from rotation
# Allow existing connections to complete
sleep 20
env:
- name: POD_IP
valueFrom:
@ -133,7 +133,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 3
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 1 # Fast deregistration from service during shutdown
successThreshold: 2 # Require 2 consecutive successes before marking ready
failureThreshold: 2 # Allow 1 failure before marking not ready