Add a termination grace period to allow flux jobs to clean up before exiting
@@ -4,11 +4,25 @@ metadata:
name: flux
spec:
replicas: 1
+
+ # Having maxSurge 0 and maxUnavailable 1 means the deployment will update one
+ # replica at a time as it will have to stop one (making one unavailable)
+ # before it can start one (surge of zero)
+ strategy:
+ rollingUpdate:
+ maxSurge: 0
+ maxUnavailable: 1
+
template:
metadata:
labels:
name: flux
spec:
+ # Give fluxsvc up to 10 minutes grace to finish jobs in progress and exit
+ # cleanly. Service is available during this time, as long as we don't
+ # stop too many replicas at once.
+ terminationGracePeriodSeconds: 600
+
containers:
- name: fluxd
image: quay.io/weaveworks/fluxd:master-952c028
