You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
undeploy: ## Undeploy both controllers from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
undeploy: undeploy-task undeploy-environment ## Undeploy both controllers from the K8s cluster specified in ~/.kube/config.
224
+
225
+
.PHONY: undeploy-task
226
+
undeploy-task: kustomize ## Undeploy task controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
undeploy-environment: kustomize ## Undeploy environment controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Copy file name to clipboardExpand all lines: control-operator/README.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,14 @@ In order to deploy Task and Environment workflows to the k8s cluster you need co
8
8
controlling custom CRDs defining ALICE custom workload. This Folder defines and implements all moving parts together with Makefile
9
9
to build, deploy, install CRDs and operators.
10
10
11
+
## Architecture
12
+
13
+
The operator is split into two separate binaries with different deployment strategies:
14
+
15
+
**task-manager** runs as a DaemonSet — one pod per node. Each pod is responsible only for `Task` resources assigned to its node (matched via `spec.nodeName`). This is necessary because the task-manager communicates with OCC gRPC processes running locally on the same node via `hostNetwork`.
16
+
17
+
**environment-manager** runs as a Deployment with a single replica per cluster. It is responsible for `Environment` resources which are cluster-scoped and not tied to a specific node.
18
+
11
19
## Getting Started
12
20
13
21
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. Author had the most success with K3s [see](/docs/kubernetes_ecs.md).
@@ -23,16 +31,16 @@ Following commands show basic use of Makefile. However this isn't exhaustive lis
23
31
kubectl apply -f config/samples/
24
32
```
25
33
26
-
1. Build and push your image to the location specified by `IMG`:
34
+
1. Build and push your images. Default image tags are defined in the Makefile via `TASK_IMG` and `ENVIRONMENT_IMG`. Override them only if you want to use a different registry or tag:
27
35
28
36
```sh
29
-
make docker-build docker-push IMG=<some-registry>/operator:tag
37
+
make docker-build docker-push TASK_IMG=<some-registry>/task-manager:tag ENVIRONMENT_IMG=<some-registry>/environment-manager:tag
30
38
```
31
39
32
-
1. Deploy the controller to the cluster with the image specified by `IMG`:
40
+
1. Deploy the controllers to the cluster. Uses the same `TASK_IMG` and `ENVIRONMENT_IMG` defaults, override them if needed:
33
41
34
42
```sh
35
-
make deploy IMG=<some-registry>/operator:tag
43
+
make deploy TASK_IMG=<some-registry>/task-manager:tag ENVIRONMENT_IMG=<some-registry>/environment-manager:tag
36
44
```
37
45
38
46
### Uninstall CRDs
@@ -70,13 +78,19 @@ which provide a reconcile function responsible for synchronizing resources until
70
78
make install
71
79
```
72
80
73
-
1. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
81
+
1. Run a controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
82
+
83
+
```sh
84
+
make run-environment
85
+
```
86
+
87
+
The task-manager requires a `NODE_NAME` environment variable to know which node it is responsible for. In-cluster this is injected automatically via the downward API. When running locally you must set it manually:
74
88
75
89
```sh
76
-
make run
90
+
NODE_NAME=<your-node-name>make run-task
77
91
```
78
92
79
-
**NOTE:** You can also run this in one step by running: `make install run`
93
+
**NOTE:** You can also install CRDs and run in one step: `make install run-environment` or `make install run-task`
0 commit comments