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
Copy file name to clipboardExpand all lines: control-operator/README.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,63 +1,76 @@
1
1
# operator
2
-
// TODO(user): Add simple overview of use/purpose
2
+
3
+
Folder with operators regarding Task and Environment deployment.
3
4
4
5
## Description
5
-
// TODO(user): An in-depth paragraph about your project and overview of use
6
+
7
+
In order to deploy Task and Environment workflows to the k8s cluster you need controllers and operators
8
+
controlling custom CRDs defining ALICE custom workload. This Folder defines and implements all moving parts together with Makefile
9
+
to build, deploy, install CRDs and operators.
6
10
7
11
## Getting Started
8
-
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.
9
-
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
12
+
13
+
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).
14
+
**Note:** Your controller will automatically use the current context in your kubeconfig (usually ~/.kube/config) file (i.e. whatever cluster `kubectl cluster-info` shows).
10
15
11
16
### Running on the cluster
17
+
18
+
Following commands show basic use of Makefile. However this isn't exhaustive list.
19
+
12
20
1. Install Instances of Custom Resources:
13
21
14
22
```sh
15
23
kubectl apply -f config/samples/
16
24
```
17
25
18
-
2. Build and push your image to the location specified by `IMG`:
26
+
1. Build and push your image to the location specified by `IMG`:
19
27
20
28
```sh
21
29
make docker-build docker-push IMG=<some-registry>/operator:tag
22
30
```
23
31
24
-
3. Deploy the controller to the cluster with the image specified by `IMG`:
32
+
1. Deploy the controller to the cluster with the image specified by `IMG`:
25
33
26
34
```sh
27
35
make deploy IMG=<some-registry>/operator:tag
28
36
```
29
37
30
38
### Uninstall CRDs
39
+
31
40
To delete the CRDs from the cluster:
32
41
33
42
```sh
34
43
make uninstall
35
44
```
36
45
37
46
### Undeploy controller
47
+
38
48
UnDeploy the controller from the cluster:
39
49
40
50
```sh
41
51
make undeploy
42
52
```
43
53
44
54
## Contributing
55
+
45
56
// TODO(user): Add detailed information on how you would like others to contribute to this project
46
57
47
58
### How it works
59
+
48
60
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/).
49
61
50
62
It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/),
51
63
which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.
52
64
53
65
### Test It Out
66
+
54
67
1. Install the CRDs into the cluster:
55
68
56
69
```sh
57
70
make install
58
71
```
59
72
60
-
2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
73
+
1. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
61
74
62
75
```sh
63
76
make run
@@ -66,6 +79,7 @@ make run
66
79
**NOTE:** You can also run this in one step by running: `make install run`
67
80
68
81
### Modifying the API definitions
82
+
69
83
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
70
84
71
85
```sh
@@ -91,4 +105,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
91
105
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92
106
See the License for the specific language governing permissions and
0 commit comments