Restart one service's steps
Stop plus start; the pods keep running. Needs `landscape.manage`; 409 `managed-service-bound` for a `managed` service.
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 <= valuesvc*stringA service of the synced landscape.
^[a-z]([-a-z0-9]{0,30}[a-z0-9])?$The service.
application/json- response
name*ServiceNameValue^[a-z]([-a-z0-9]{0,30}[a-z0-9])?$type*ServiceTypeThe service's type in harthelm.yml; steps, container, forward or managed.
"steps""container""managed""forward"plan?stringService plan id (steps and container services).
replicas*integerWhat the spec asks for.
1 <= valuedesired_replicas*integerWhat runs; 0 after a teardown and while asleep.
0 <= valueready_replicas*integer0 <= valueavailability?Availability"always""on-demand"run_state*RunStatestarted: the steps run, also after a pod restart or a wake; stopped: the pods stay, the steps do not run.
"stopped""started"status*ServiceStatuspending: no replica is scheduled yet;starting: replicas start or run their first steps;running: the last step runs and the health check passes (internalinstead for a service without routes or public ports);finished: the last step exited 0 ("run finished"), or a container's process exited 0;failure: a step failed, or the last step (a container's process) failed 5 times in 2 minutes. Both come from the agent's stage result (run_result), not from the pod;stopped: the run switch is off.
"pending""starting""running""finished""failure""stopped""internal"status_detail?stringports*array<>health?max_replicas?integerThe most replicas PATCH …/services/{svc} accepts (maxReplicas, else the plan's); steps and container services.
1 <= valueimage?stringThe image as harthelm.yml names it (container services, and steps services with a base image of their own).
image_ref?stringContainer services, the image as the last Sync resolved it, <repository>@sha256:<digest>; what the pods run.
run_as_user?integerContainer services with runAsUser (teams a cluster admin allowed); absent, the workspace's UID.
int640 <= valueautonomous?booleanThe service runs without the run stage (container services): its process starts with its pods and stops with the service's switch; Run and Stop of the landscape leave it alone.
target?stringForward services, the resolved target URL.
routes?array<>Forward services, the paths of the dev domain that go to target.
run_result?The last stage result an agent reported for the service: the end of its run steps (steps), or of
its process (container). status is failure or finished from it while generation is the service's
current run generation.
upgrade_pending?booleanThe service's pods run a template from before an upgrade until it sleeps or is synced again.
managed_service_id?stringManaged services, the instance the Sync created (GET /managed-services/{ms}).
uuidmanaged_status?ManagedServiceStatuscreating,updating,pausing,unpausing,deleting: the backend works on a change;synchronized: it runs as asked;paused: data kept, no server (a torn-down landscape's database);deleted: a tombstone, listed withinclude_deleteduntil it is purged;unknown: the backend does not answer or does not report it; the details are the last known ones;invalid-provider: its provider version is gone or no longer accepts its settings.
"creating""updating""synchronized""pausing""paused""unpausing""deleting""deleted""unknown""invalid-provider"needs?array<>The services it needs as harthelm.yml lists them, in name order; waking it wakes them, and
Run starts them first. Absent when it needs none and from an older core.
failing?boolean0.10.1: the service fails for the services that need it, as failing_needs
says it: its run failed, it has no ready replica a minute after its wake, or a Run began while it failed
and has not brought up a ready replica yet. A service that needs it neither waits for it at a wake nor at
a Run, and shows "needs …, which is failing". Computed when read; absent when false and from an older core.
curl -X POST 'https://console.example.com/api/v1/workspaces/1/landscape/services/string/restart'{ "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}Plan a Sync
Reads `harthelm.yml` (or `harthelm.<profile>.yml`) from `/data/app` through the IDE agent, parses, validates and resolves it and compares it with the synced landscape. Changes nothing. The result lists the services to add, change or remove with replicas, CPU and RAM, the team quota share, the vault keys that have no value yet and blockers that would stop the Sync (a service type that is not supported yet, the team quota, the workspace's disk quota). An invalid file answers 422 with problem `invalid-config`, whose `errors` carry pointer, line and column. Needs `landscape.manage`; 409 when the IDE does not run.
Scale a service
Sets the replicas of a `steps` or `container` service without a Sync: at least 1, at most the service's `max_replicas` (its `maxReplicas`, else the plan's), else 422 with pointer `/replicas`; a `forward` or `managed` service is 422 too. A sleeping service keeps sleeping and wakes with the new count; a stopped or torn-down landscape is 409 `landscape-not-synced`. The next Sync keeps the scaled count unless the file's `replicas` changed since the last Sync (then the file wins). The team quota applies as for a Sync (409 `quota-exceeded`). Needs `landscape.manage`; audited as `landscape.scale`; publishes `landscape.updated`.