Resources / ReleasePolicy
ReleasePolicy
When a run of the platform's workflow on a branch ends successfully, the release of that commit is made, with no person in between (spec 0047 section 3). The policy says which components may be released by themselves, how many releases may roll out at once and per hour, and how long to hold a commit first. Only components whose build differs from the last release that finished them are released; the release controller activates the newest release whose gates are green.
Overview
| API | platform.etorm.com/v1alpha1 |
| Resource | releasepolicies (cluster-scoped inside its cluster) |
| Short names | relpol |
| Available in | the platform only |
| Status | written by a controller through /status |
Minimal example
apiVersion: platform.etorm.com/v1alpha1
kind: ReleasePolicy
metadata:
name: example
spec:
autoActivate:
- "<autoActivate>"
Spec
| Field | Type | Required | Default | Allowed | Description |
workspace | string | | "platform" | | The workspace (project) whose runs are watched. |
repository | string | | "platform" | | The repository whose runs are watched. |
branch | string | | "main" | | The branch whose pushes are released. |
autoActivate | list of string | yes | | up to 64 items | The components a release may carry without a person: exact names, or a prefix ending in one `*` (for example `program/*`). A component not listed is never in a release this policy makes. |
maxInFlight | integer | | 1 | at least 1 | At most this many releases rolling out at once; the next is made when the current one is done. |
maxPerHour | integer | | 4 | at least 1 | At most this many releases made by this policy in an hour. |
holdSeconds | integer | | 0 | at least 0 | Seconds a commit waits, from when the policy first saw its successful run, before its release is made (a window to stop a bad commit). |
Status
| Field | Type | Required | Default | Allowed | Description |
observedGeneration | integer | | | | The generation of the spec this status describes. |
pending | object | | | | The commit in its hold window. |
pending.commit | string | | | | The commit. |
pending.until | integer | | | | Unix time the window ends. |
lastRelease | object | | | | The last release this policy made. |
lastRelease.name | string | | | | Name of the PlatformRelease. |
lastRelease.commit | string | | | | Its commit. |
lastRelease.at | integer | | | | Unix time. |
lastDecision | object | | | | What the policy decided last and why. |
lastDecision.phase | string (one of) | | | Idle, Waiting, Released, Failing | Nothing to do, held back, a release was made, or it could not be made. |
lastDecision.reason | string | | | | A word from the reason registry. |
lastDecision.message | string | | | | A sentence. |
lastDecision.commit | string | | | | The commit it was about. |
lastDecision.at | integer | | | | Unix time. |
conditions | list of object | | | | Ready. |
conditions[].type | string | | | | Condition type. |
conditions[].status | string | | | | True, False or Unknown. |
conditions[].reason | string | | | | A word from the reason registry. |
conditions[].message | string | | | | A sentence. |
Columns in listings
| Column | From |
|---|
| Branch | .spec.branch |
| Decision | .status.lastDecision.phase |
| Last | .status.lastRelease.name |
All resources