Skip to content

Commit 7600df0

Browse files
authored
add links to README and update terminology (#106)
1 parent 5b2ad52 commit 7600df0

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

README.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> ⚠️ This project is 100% experimental. Please do not attempt to install the controller in any production and/or shared environment.
44
55
The goal of the Temporal Worker Controller is to make it easy to run workers on Kubernetes while leveraging
6-
[Worker Versioning](https://docs.temporal.io/workers#worker-versioning).
6+
[Worker Deployments](https://docs.temporal.io/production-deployment/worker-deployments).
77

88
## Why
99

@@ -33,9 +33,9 @@ Temporal APIs to update the routing config of Temporal Worker Deployments to rou
3333
## Terminology
3434
Note that in Temporal, **Worker Deployment** is sometimes referred to as **Deployment**, but since the controller makes
3535
significant references to Kubernetes Deployment resource, within this repository we will stick to these terms:
36-
- **Worker Deployment Version**: A version of a deployment or service. It can have multiple Workers, but they all run the same build. Sometimes shortened to "version" or "deployment version."
37-
- **Worker Deployment**: A deployment or service across multiple versions. In a rainbow deploy, a worker deployment can have multiple active deployment versions running at once.
38-
- **Deployment**: A Kubernetes Deployment resource. A Deployment is "versioned" if it is running versioned Temporal workers/pollers.
36+
- **Worker Deployment Version**: A version of a deployment or service that runs [Temporal Workers](https://docs.temporal.io/workers). It can have multiple Workers, but they all run the same build. Sometimes shortened to "version" or "deployment version."
37+
- **Worker Deployment**: A deployment or service across multiple deployment versions. In a rainbow deploy, a Worker Deployment can have multiple active Deployment Versions running at once.
38+
- **Deployment**: A [Kubernetes Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) resource. A Deployment is "versioned" if it is running versioned Temporal workers/pollers.
3939

4040
## Features
4141

@@ -45,10 +45,6 @@ significant references to Kubernetes Deployment resource, within this repository
4545
- [x] `Manual`, `AllAtOnce`, and `Progressive` rollouts of new versions
4646
- [x] Ability to specify a "gate" workflow that must succeed on the new version before routing real traffic to that version
4747
- [ ] Autoscaling of versioned Deployments
48-
- [ ] Canary analysis of new worker versions
49-
- [ ] Optional cancellation after timeout for workflows on old versions
50-
- [ ] Passing `ContinueAsNew` signal to workflows on old versions
51-
5248

5349
## Usage
5450

@@ -65,18 +61,16 @@ Each of these will be automatically set by the controller, and must not be manua
6561

6662
## How It Works
6763

68-
Note: These sequence diagrams have not been fully converted to versioning v0.31 terminology.
69-
70-
Every `TemporalWorkerDeployment` resource manages one or more standard `Deployment` resources. Each deployment manages pods
71-
which in turn poll Temporal for tasks routed to their respective versions.
64+
Every `TemporalWorkerDeployment` resource manages one or more standard `Deployment` resources. Each Deployment manages pods
65+
which in turn poll Temporal for tasks routed to their respective worker versions.
7266

7367
```mermaid
7468
flowchart TD
7569
subgraph "K8s Namespace 'ns'"
7670
twd[TemporalWorkerDeployment 'foo']
7771
7872
subgraph "Current/default version"
79-
d5["Deployment foo-v5 (Version foo/ns.v5)"]
73+
d5["Deployment foo-v5, Version{DeploymentName: foo/ns, BuildId: v5}"]
8074
rs5["ReplicaSet foo-v5"]
8175
p5a["Pod foo-v5-a"]
8276
p5b["Pod foo-v5-b"]
@@ -88,7 +82,7 @@ flowchart TD
8882
end
8983
9084
subgraph "Deprecated versions"
91-
d1["Deployment foo-v1 (Version foo/ns.v1)"]
85+
d1["Deployment foo-v1 Version{DeploymentName: foo/ns, BuildId: v1}"]
9286
rs1["ReplicaSet foo-v1"]
9387
p1a["Pod foo-v1-a"]
9488
p1b["Pod foo-v1-b"]
@@ -104,24 +98,24 @@ flowchart TD
10498
twd --> dN
10599
twd --> d5
106100
107-
p1a -. "poll version foo/ns.v1" .-> server
108-
p1b -. "poll version foo/ns.v1" .-> server
101+
p1a -. "poll version {foo/ns, v1}" .-> server
102+
p1b -. "poll version {foo/ns, v1}" .-> server
109103
110-
p5a -. "poll version foo/ns.v5" .-> server
111-
p5b -. "poll version foo/ns.v5" .-> server
112-
p5c -. "poll version foo/ns.v5" .-> server
104+
p5a -. "poll version {foo/ns, v5}" .-> server
105+
p5b -. "poll version {foo/ns, v5}" .-> server
106+
p5c -. "poll version {foo/ns, v5}" .-> server
113107
114108
server["Temporal Server"]
115109
```
116110

117111
### Worker Lifecycle
118112

119113
When a new worker deployment version is deployed, the worker controller detects it and automatically begins the process
120-
of making that version the new **current** (aka default) version of the worker deployment it is a part of. This could happen
114+
of making that version the new **Current Version** of the worker deployment it is a part of. This could happen
121115
immediately if `rollout.strategy = AllAtOnce`, or gradually if `rollout.strategy = Progressive`.
122116

123-
As older pinned workflows finish executing and deprecated deployment versions become drained, the worker controller also
124-
frees up resources by sunsetting the `Deployment` resources polling those versions.
117+
As older pinned workflows finish executing and deprecated deployment versions become **Drained**, the worker controller
118+
frees up resources by sunsetting the `Deployment` resources running workers that poll those versions.
125119

126120
Here is an example of a progressive cut-over strategy gated on the success of the `HelloWorld` workflow:
127121
```yaml
@@ -147,14 +141,14 @@ sequenceDiagram
147141
Dev->>K8s: Create TemporalWorkerDeployment "foo" (v1)
148142
K8s-->>Ctl: Notify TemporalWorkerDeployment "foo" created
149143
Ctl->>K8s: Create Deployment "foo-v1"
150-
Ctl->>T: Register "foo/ns.v1" as new current version of "foo/ns"
144+
Ctl->>T: Register build "v1" as new current version of "foo/ns"
151145
Dev->>K8s: Update TemporalWorker "foo" (v2)
152146
K8s-->>Ctl: Notify TemporalWorker "foo" updated
153147
Ctl->>K8s: Create Deployment "foo-v2"
154-
Ctl->>T: Register "foo/ns.v2" as new current version of "foo/ns"
148+
Ctl->>T: Register build "v2" as new current version of "foo/ns"
155149

156150
loop Poll Temporal API
157-
Ctl-->>T: Wait for "foo/ns.v1" to be drained (no open pinned wfs)
151+
Ctl-->>T: Wait for version {foo/ns, v1} to be drained (no open pinned wfs)
158152
end
159153

160154
Ctl->>K8s: Delete Deployment "foo-v1"
@@ -166,9 +160,9 @@ This project is in very early stages; as such external code contributions are no
166160
167161
Bug reports and feature requests are welcome! Please [file an issue](https://github.com/jlegrone/worker-controller/issues/new).
168162
169-
You may also reach out to `@jlegrone` on the [Temporal Slack](https://t.mp/slack) if you have questions, suggestions, or are
170-
interested in making other contributions.
163+
You may also reach out to [#safe-deploys](https://temporalio.slack.com/archives/C07MDJ6S3HP) or @jlegrone on the
164+
[Temporal Slack](https://t.mp/slack) if you have questions, suggestions, or are interested in making other contributions.
171165
172166
## Development
173167
174-
For local development setup and running the controller locally, see the [development guide](internal/README.md).
168+
For local development setup and running the controller locally, see the [local demo guide](internal/demo/README.md).

0 commit comments

Comments
 (0)