nais / naisd

nais deployment daemon
https://nais.io
MIT License
27 stars 10 forks source link

Feature/deployment status endpoint #44

Closed gtcno closed 7 years ago

gtcno commented 7 years ago

Endpoint is at /deploystatus/${namespace}/${appname}

Will return 200 if deployment is OK. Will return 202 if a deployment is in progress Will return 500 if a deployment failed. Will return 404 if the given deployment can not be found

Sample body: { Name: "naisd", Desired: 2, Current: 2, UpToDate: 2, Available: 2, Containers: [ "naisd" ], Images: [ "navikt/naisd:117.0.0" ], Status: "Success", Reason: "deployment "naisd" successfully rolled out." }

Note on the 500: This requires that progressDeadlinSeconds is set on the deployment(See https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds).

For "new" deployments through Naisd this limit is set to 600 seconds(Default in 1.8 or HEAD). For existing deployments this value may not exists. In which case they need to be patched or else the deployment will never be marked as failed.

audunstrand commented 7 years ago

isnt 600 second too hight? Should at least be configurable

gtcno commented 7 years ago

Did not think to much about sensible default. 600 is default in HEAD or 1.8. We can adjust to 300 sec?

What do you mean by configurable? Configurable by each deploy?

audunstrand commented 7 years ago

I meant exposing it in nais.yml, but I have changed my mind, its better to have it set in naisd. 300 is probably better than 600