-
Notifications
You must be signed in to change notification settings - Fork 6
Deployment
A deployment represents a pending, running, canceled or finished deployment.
It is basically a trio of environment, service and deployable version together with the user who started the deployment and its current status.
In order for apollo to be 100% stateless, the status field is a state machine that is being changed from the Kubernetes monitor thread.
When POSTing to /deployment, the following is verified:
- Whether the user has permissions for this deployment
- Whether there a simultaneous deployment request is running, that is still not in the DB
- Whether there is no running deployment for the same service in the same environment After all checks are passed, the deployment is saved in the DB with status "PENDING".
Kubernetes monitor thread will pick up the deployment, and based on the current status will keep update it in the DB until reaching its final state. (Either "DONE" or "CANCELED").
DELETE to this endpoint will return the deployment to its previous state (where the initial deployment request is getting from kubernetes).
GET to /deployment/{id}/logs will get the current logs of this deployment