SpecificationMargo management interface

Deployment Status

While applying a new desired state, the device's management client MUST provide the Workload Fleet Manager service with an indication of the current workload deployment status. This is done by calling the Device API's deployment status endpoint.

  • Requests to this endpoint MUST be authenticated using the HTTP Message Signature method as defined in the Payload Security section.

Note: This assumes consistent connection to the WFM, we will address intermittent or extended disconnection scenarios in the future.

Route and HTTP Methods

POST /api/v1/clients/{clientId}/deployments/{deploymentId}/status

Route Parameters

ParameterTypeRequired?Description
{clientId}stringYThe unique identifier of the (device) client registered with the WFM during onboarding.
{deploymentId}stringYThe UUID of the ApplicationDeployment YAML being reported.

Response Codes

CodeDescription
200 OKThe deployment status was added, or updated, successfully.
400 Bad RequestMissing or invalid content-digest header. Ensure the SHA256 hash of the base64-encoded payload is included.
401 UnauthorizedSignature verification failed. Ensure you are signing with the correct X.509 private key.
403 ForbiddenClient certificate is not trusted or has been revoked.
422 Unprocessable ContentRequest body includes a semantic error.

Request Body Attributes

FieldsTypeRequired?Description
apiVersionstringYIdentifier of the version the API resource follows.
kindstringYMust be DeploymentStatusManifest.
deploymentIdstringYThe unique identifier UUID of the deployment specification. Needs to be assigned by the Workload Fleet Management Software.
status[]statusYElement that defines overall deployment status. See the Status Attributes section below.
components[]componentsYElement that defines the individual component's deployment status. See the Component Attributes section below.

Status Attributes

FieldsTypeRequired?Description
statestringYCurrent state of the overall deployment. The state value MUST be one the following options: pending, installing, installed, removing, removed, failed. The overall deployment status MUST reflect the most severe of the components states, following this precedence: failed > removing > installing > pending > removing > installed.
errorErrorNElement that defines the overall installation error if one occured. See the Error Attributes section below.

Component Attributes

AttributeTypeRequired?Description
namestringYName of the deployment component, inherited via the deployment specification
statestringYThe component's current deployment state of the component. MUST be one of the following options: pending, installing, installed, removing, removed, failed
errorErrorNElement that defines the components installation error if one occured. See the Error Attributes section below.

Note: The components array MUST contain one entry for each "component" defined in the referenced ApplicationDeployment manifest.

Error Attributes

FieldsTypeRequired?Description
codestringYAssociated error code following a component failure during installation.
messagestringYAssociated error message that provides further details to the WFM about the error that was encountered.

Note: Error codes and messages are implementation-specific.

Example Deployment Status Manifest Request

{
    "apiVersion": "deployment.margo.org/v1alpha1",
    "kind": "DeploymentStatusManifest",
    "deploymentId": "a3e2f5dc-912e-494f-8395-52cf3769bc06",
    "status": {
        "state": "pending",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "components": [
        {
            "name": "digitron-orchestrator",
            "state": "pending",
            "error": {
                "code":"",
                "message":""
            }
        },
        {
            "name": "database-services",
            "state": "pending",
            "error": {
                "code": "",
                "message": ""
            }
        }
    ]
}