Skip to content

Commit 2b050a4

Browse files
committed
doc: improve tilt doc
Signed-off-by: Stefan Büringer [email protected]
1 parent 37149b0 commit 2b050a4

File tree

2 files changed

+76
-83
lines changed

2 files changed

+76
-83
lines changed

docs/book/src/developer/tilt.md

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ documentation](https://docs.tilt.dev/api.html#api.default_registry) for more det
7070
for more details.
7171

7272
**kustomize_substitutions** (Map{String: String}, default={}): An optional map of substitutions for `${}`-style placeholders in the
73-
provider's yaml. **Note**: It's recommended to enable the following feature flags for local dev environment to ensure e2e tests run through:
73+
provider's yaml. **Note**: When running E2E tests locally using an existing cluster managed by Tilt, the following substitutions are required for successful tests:
7474
```yaml
7575
kustomize_substitutions:
7676
CLUSTER_TOPOLOGY: "true"
@@ -79,73 +79,6 @@ kustomize_substitutions:
7979
EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true"
8080
```
8181
82-
**deploy_observability** ([string], default=[]): If set, installs on the dev cluster one of more observability
83-
tools. Supported values are `grafana`, `loki`, `promtail` and/or `prometheus` (Note: the UI for `grafana` and `prometheus` will be accessible via a link in the tilt console).
84-
Important! This feature requires the `helm` command to be available in the user's path.
85-
86-
**debug** (Map{string: Map} default{}): A map of named configurations for the provider. The key is the name of the provider.
87-
88-
Supported settings:
89-
90-
* **port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will run the provider with delve
91-
and port forward the delve server to localhost on the specified debug port. This can then be used with IDEs such as
92-
Visual Studio Code, Goland and IntelliJ.
93-
94-
* **continue** (bool, default=true): By default, Tilt will run delve with `--continue`, such that any provider with
95-
debugging turned on will run normally unless specifically having a breakpoint entered. Change to false if you
96-
do not want the controller to start at all by default.
97-
98-
* **profiler_port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will enable the profiler with
99-
`--profiler-address` and set up a port forward. A "profiler" link will be visible in the Tilt Web UI for the controller.
100-
101-
* **metrics_port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will port forward to the
102-
default metrics port. A "metrics" link will be visible in the Tilt Web UI for the controller.
103-
104-
* **race_detector** (bool, default=false) (Linux amd64 only): If enabled, Tilt will compile the specified controller with
105-
cgo and statically compile in the system glibc and enable the race detector. Currently, this is only supported when
106-
building on Linux amd64 systems. You must install glibc-static or have libc.a available for this to work.
107-
108-
Example: Using the configuration below:
109-
110-
```yaml
111-
debug:
112-
core:
113-
continue: false
114-
port: 30000
115-
profiler_port: 40000
116-
metrics_port: 40001
117-
```
118-
119-
##### Wiring up debuggers
120-
###### Visual Studio
121-
When using the example above, the core CAPI controller can be debugged in Visual Studio Code using the following launch configuration:
122-
123-
```json
124-
{
125-
"version": "0.2.0",
126-
"configurations": [
127-
{
128-
"name": "Core CAPI Controller",
129-
"type": "go",
130-
"request": "attach",
131-
"mode": "remote",
132-
"remotePath": "",
133-
"port": 30000,
134-
"host": "127.0.0.1",
135-
"showLog": true,
136-
"trace": "log",
137-
"logOutput": "rpc"
138-
}
139-
]
140-
}
141-
```
142-
143-
###### Goland / Intellij
144-
With the above example, you can configure [a Go Remote run/debug
145-
configuration](https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#step-3-create-the-remote-run-debug-configuration-on-the-client-computer)
146-
pointing at port 30000.
147-
148-
<br/>
14982
{{#tabs name:"tab-tilt-kustomize-substitution" tabs:"AWS,Azure,DigitalOcean,GCP"}}
15083
{{#tab AWS}}
15184
@@ -218,6 +151,74 @@ kustomize_substitutions:
218151
{{#/tab }}
219152
{{#/tabs }}
220153
154+
**deploy_observability** ([string], default=[]): If set, installs on the dev cluster one of more observability
155+
tools. Supported values are `grafana`, `loki`, `promtail` and/or `prometheus` (Note: the UI for `grafana` and `prometheus` will be accessible via a link in the tilt console).
156+
Important! This feature requires the `helm` command to be available in the user's path.
157+
158+
**debug** (Map{string: Map} default{}): A map of named configurations for the provider. The key is the name of the provider.
159+
160+
Supported settings:
161+
162+
* **port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will run the provider with delve
163+
and port forward the delve server to localhost on the specified debug port. This can then be used with IDEs such as
164+
Visual Studio Code, Goland and IntelliJ.
165+
166+
* **continue** (bool, default=true): By default, Tilt will run delve with `--continue`, such that any provider with
167+
debugging turned on will run normally unless specifically having a breakpoint entered. Change to false if you
168+
do not want the controller to start at all by default.
169+
170+
* **profiler_port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will enable the profiler with
171+
`--profiler-address` and set up a port forward. A "profiler" link will be visible in the Tilt Web UI for the controller.
172+
173+
* **metrics_port** (int, default=0 (disabled)): If set to anything other than 0, then Tilt will port forward to the
174+
default metrics port. A "metrics" link will be visible in the Tilt Web UI for the controller.
175+
176+
* **race_detector** (bool, default=false) (Linux amd64 only): If enabled, Tilt will compile the specified controller with
177+
cgo and statically compile in the system glibc and enable the race detector. Currently, this is only supported when
178+
building on Linux amd64 systems. You must install glibc-static or have libc.a available for this to work.
179+
180+
Example: Using the configuration below:
181+
182+
```yaml
183+
debug:
184+
core:
185+
continue: false
186+
port: 30000
187+
profiler_port: 40000
188+
metrics_port: 40001
189+
```
190+
191+
##### Wiring up debuggers
192+
###### Visual Studio
193+
When using the example above, the core CAPI controller can be debugged in Visual Studio Code using the following launch configuration:
194+
195+
```json
196+
{
197+
"version": "0.2.0",
198+
"configurations": [
199+
{
200+
"name": "Core CAPI Controller",
201+
"type": "go",
202+
"request": "attach",
203+
"mode": "remote",
204+
"remotePath": "",
205+
"port": 30000,
206+
"host": "127.0.0.1",
207+
"showLog": true,
208+
"trace": "log",
209+
"logOutput": "rpc"
210+
}
211+
]
212+
}
213+
```
214+
215+
###### Goland / Intellij
216+
With the above example, you can configure [a Go Remote run/debug
217+
configuration](https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#step-3-create-the-remote-run-debug-configuration-on-the-client-computer)
218+
pointing at port 30000.
219+
220+
<br/>
221+
221222
**deploy_cert_manager** (Boolean, default=`true`): Deploys cert-manager into the cluster for use for webhook registration.
222223

223224
**trigger_mode** (String, default=`auto`): Optional setting to configure if tilt should automatically rebuild on changes.
@@ -230,15 +231,14 @@ Example:
230231

231232
```yaml
232233
extra_args:
233-
core: ["--feature-gates=MachinePool=true"]
234-
kubeadm-bootstrap: ["--feature-gates=MachinePool=true"]
235-
azure: ["--feature-gates=MachinePool=true"]
234+
kubeadm-bootstrap:
235+
- --logging-format=json
236236
```
237237

238238
With this config, the respective managers will be invoked with:
239239

240240
```bash
241-
manager --feature-gates=MachinePool=true
241+
manager --logging-format=json
242242
```
243243

244244
### Run Tilt!

docs/book/src/tasks/experimental-features/experimental-features.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,10 @@ Another way is to set them as environmental variables before running e2e tests.
4141
On development environments started with `Tilt`, features can be enabled by setting the feature variables in `kustomize_substitutions`, e.g.:
4242

4343
```yaml
44-
{
45-
"enable_providers": ["kubeadm-bootstrap","kubeadm-control-plane"],
46-
"allowed_contexts": ["kind-kind"],
47-
"default_registry": "gcr.io/cluster-api-provider",
48-
"provider_repos": [],
49-
"kustomize_substitutions": {
50-
"EXP_CLUSTER_RESOURCE_SET": "true",
51-
"EXP_MACHINE_POOL": "true",
52-
"CLUSTER_TOPOLOGY": "true"
53-
}
54-
}
44+
kustomize_substitutions:
45+
EXP_CLUSTER_RESOURCE_SET: 'true'
46+
EXP_MACHINE_POOL: 'true'
47+
CLUSTER_TOPOLOGY: 'true'
5548
```
5649

5750
For more details on setting up a development environment with `tilt`, see [Developing Cluster API with Tilt](../../developer/tilt.md)

0 commit comments

Comments
 (0)