diff --git a/deploy.py b/deploy.py index d3ddc16..1ec2e5c 100644 --- a/deploy.py +++ b/deploy.py @@ -30,7 +30,7 @@ def main(): ssh('mkdir','-p',target) run('rsync','-az','--chmod=D755,F644',str(ROOT/'public')+'/',f'{HOST}:{target}/') def point(path): - patch={'spec':{'template':{'spec':{'volumes':[{'name':'site','hostPath':{'path':path,'type':'Directory'}}]}}}} + patch={'spec':{'strategy':{'type':'RollingUpdate','rollingUpdate':{'maxUnavailable':0,'maxSurge':1}},'template':{'spec':{'volumes':[{'name':'site','hostPath':{'path':path,'type':'Directory'}}]}}}} kube('patch','deployment','hugo','--type=strategic','-p',json.dumps(patch)) kube('rollout','status','deployment/hugo','--timeout=120s') try: