Sync the landscape
Plans again and, if the result's `spec_hash` equals `If-Match`, writes the spec, the service rows and the new generation in one transaction and enqueues the reconcile (this transaction alone runs with `synchronous_commit = off`). Sync never starts steps; Run does. `If-Match` is the `spec_hash` of the plan the user reviewed: a different one (the file, the env vars or the catalog changed since) answers 409 with problem `plan-changed`; a missing one 428. Other 409 problems: `secrets-missing` (a referenced vault key has no value), `landscape-blocked` (the plan has blockers; `errors` lists them), `quota-exceeded`. Needs `landscape.manage`.
openapi/harthelm.yaml at v1.5.0__Host-harthelm_session<token>Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header
Harthelm-CSRF: 1 and a matching Origin.
ws*integerNumeric resource id.
int641 <= valueIf-Match?stringETag of the version the change is based on. Declared optional so that the server, not the request binder, answers a missing header with 428.
application/json- body
profile?ProfileNameA profile (harthelm.<profile>.yml); absent or empty for harthelm.yml.
^([a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?)?$Synced; the Operation landscape.sync follows the rollout.
application/json- response
landscape*operation*A long-running action. It ends in succeeded or failed and stays readable for 7 days.
curl -X POST 'https://console.example.com/api/v1/workspaces/1/landscape/sync' \ -H 'Content-Type: application/json' \ -d '{}'{ "landscape": { "workspace_id": 1, "state": "empty", "profile": "string", "selected_profile": "string", "spec_hash": "string", "source_hash": "string", "source_commit": "string", "generation": 0, "synced_at": "2019-08-24T14:15:22Z", "synced_by": 1, "run_state": "stopped", "run_generation": 0, "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52", "services": [ { "name": "string", "type": "steps", "plan": "string", "replicas": 1, "desired_replicas": 0, "ready_replicas": 0, "availability": "always", "run_state": "stopped", "status": "pending", "status_detail": "string", "ports": [ { "port": 1, "public": true, "url": "string", "routes": [ { "path": "string", "strip": true } ] } ], "health": { "port": 0, "path": "string", "mode": "any-http" }, "max_replicas": 1, "image": "string", "image_ref": "string", "run_as_user": 0, "autonomous": true, "target": "string", "routes": [ { "path": "string", "strip": true } ], "run_result": { "result": "success", "generation": 0, "message": "string", "at": "2019-08-24T14:15:22Z" }, "upgrade_pending": true, "managed_service_id": "77427583-c503-4b42-8d68-8e0a3b2c8384", "managed_status": "creating", "needs": [ "string" ], "failing": true } ] }, "operation": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "state": "pending", "target": "string", "detail": "string", "error": { "type": "about:blank", "title": "string", "status": 100, "detail": "string", "instance": "string", "errors": [ { "pointer": "string", "line": 1, "column": 1, "message": "string", "code": "string", "subject": "string" } ], "held_by_deleted": { "workspaces": 0, "storage_gib": 0 }, "failed_team": { "id": 1, "name": "string", "reason": "string" } }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z" }}Stop one service's steps
Stops the steps of every replica (SIGTERM, then SIGKILL after 10 s); the pods keep running. Needs `landscape.manage`; 409 `managed-service-bound` for a `managed` service.
Tear the landscape down
One transaction stops every service, sets their desired replicas to 0 and the landscape state to `torn-down`; the reconcile removes the services' Deployments, Services and Secrets and their routes. The code in `/data/app` and the vault stay; a Sync rebuilds everything. Needs `landscape.manage`.