Replace how a deployment is delivered
Replaces every group. Delivery and jobs take effect with the next apply; a prune larger than `maxPrunePercent` of the deployment's objects is held for a person. With previews on, every pull request on the repository of one of its apps gets a deployment of its own until the pull request closes or the
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
deploymentId*stringuuidIdempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
delivery*previews*drift*What happens to drift. detect records and shows it. revert_after reverts what still differs revertAfterSeconds after it was found. revert reverts at once. A revert is the drift revert action, run as the system and recorded in Activity. A deployment that only observes only detects.
The settings now in force.
application/json- response
delivery*previews*A preview runs in a namespace named <namespace>-pr-<number> that the cluster's operator creates when it first applies the preview, with a wardn-deployer service account bound to the wardn-preview-deployer ClusterRole, and deletes after the preview is torn down. It uses a namespace that already exists as it is, and deletes only a namespace carrying Wardn's labels for that preview's deployment. The operator needs the extra permissions wardn install grants for this.
drift*What happens to drift. detect records and shows it. revert_after reverts what still differs revertAfterSeconds after it was found. revert reverts at once. A revert is the drift revert action, run as the system and recorded in Activity. A deployment that only observes only detects.
curl -X PUT 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/settings' \ -H 'Content-Type: application/json' \ -d '{ "delivery": { "maxPrunePercent": 0, "beforeJobs": [ { "name": "string", "job": {} } ], "afterJobs": [ { "name": "string", "job": {} } ], "healthRules": [ { "kind": "string", "healthy": "string" } ] }, "previews": { "enabled": true }, "drift": { "mode": "detect" }}'{ "delivery": { "maxPrunePercent": 0, "beforeJobs": [ { "trigger": "every_change", "envSource": "app", "promotion": { "skip": true, "command": true, "image": true, "timeout": true }, "name": "string", "appId": "28c365d5-df94-4a54-8217-3ce51d068868", "job": {}, "failurePolicy": "stop", "undoJob": {}, "timeoutSeconds": 0, "disabled": true } ], "afterJobs": [ { "trigger": "every_change", "envSource": "app", "promotion": { "skip": true, "command": true, "image": true, "timeout": true }, "name": "string", "appId": "28c365d5-df94-4a54-8217-3ce51d068868", "job": {}, "failurePolicy": "stop", "undoJob": {}, "timeoutSeconds": 0, "disabled": true } ], "healthRules": [ { "group": "string", "kind": "string", "healthy": "string", "failed": "string", "message": "string" } ], "healthWatchSeconds": 0, "healthOnFail": "pause", "updatedAt": "2019-08-24T14:15:22Z" }, "previews": { "enabled": true, "maxPreviews": 0, "ttlHours": 0, "domain": "string", "githubStatus": true, "githubDeployment": true, "githubComment": true, "forkLabel": "string" }, "drift": { "mode": "detect", "revertAfterSeconds": 60 }}Get how a deployment is delivered GET
How its applies run (the prune limit, health rules for custom resources), the jobs around them, its pull request previews and its drift policy. A deployment that has set none has the defaults.
List the prunes held for a deployment GET
When an apply would remove more of the deployment's objects than its prune limit allows, the operator removes nothing and the prune waits here for a person.