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
Tilt is favoured by most Cluster API projects for local development, it offers a simple way of creating a local development environment.
3
+
Cluster API includes its own Tiltfile that can be used to run Cluster API Operator on a local Kind cluster.
4
+
5
+
## Clone the Cluster API repository
6
+
7
+
Clone the Cluster API repository on the same level folder where Cluster API Operator located:
3
8
4
-
## Create a kind cluster
5
-
We'll need to create a kind cluster to deploy the operator to. This cluster will be used to deploy `cluster-api-operator` to, along with all dependencies such as `cert-manager`
Afterward your folder structure should look like this:
14
+
15
+
```
16
+
some-folder/
17
+
├── cluster-api
18
+
└── cluster-api-operator
19
+
```
20
+
21
+
## Set up Tilt settings in `cluster-api` folder
22
+
23
+
Refer to [this guide](https://cluster-api.sigs.k8s.io/developer/core/tilt.html) to set up Tilt for Cluster API.
24
+
25
+
In particular, for our purposes we only need to set up `tilt-settings.yaml` in Cluster API to enable Cluster API Operator. Add the following fields to the lists in `tilt-settings.yaml`:
26
+
27
+
```yaml
28
+
provider_repos:
29
+
- "../cluster-api-operator"
30
+
enable_providers:
31
+
- capi-operator
32
+
enable_core_provider: false
8
33
```
9
34
10
35
## Run Tilt
11
-
Once the cluster is live, and you've confirmed you're using the correct context, you can simply run:
36
+
37
+
From `cluster-api` folder run:
38
+
12
39
```bash
13
-
tilt up
40
+
$ make tilt-up
14
41
```
15
42
16
-
That's it! Tilt will automatically reload the deployment to your local cluster every time you make a code change.
43
+
That's it! Tilt will automatically reload the deployment to your local cluster every time you make a code change and able to debug deployed code.
0 commit comments