Skip to content

Commit 3f434e1

Browse files
authored
Merge pull request #6263 from sbueringer/pr-improve-tilt-doc
📖 doc: improve tilt doc
2 parents deb30b6 + 2b050a4 commit 3f434e1

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
@@ -72,7 +72,7 @@ documentation](https://docs.tilt.dev/api.html#api.default_registry) for more det
7272
for more details.
7373

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

225226
**trigger_mode** (String, default=`auto`): Optional setting to configure if tilt should automatically rebuild on changes.
@@ -232,15 +233,14 @@ Example:
232233

233234
```yaml
234235
extra_args:
235-
core: ["--feature-gates=MachinePool=true"]
236-
kubeadm-bootstrap: ["--feature-gates=MachinePool=true"]
237-
azure: ["--feature-gates=MachinePool=true"]
236+
kubeadm-bootstrap:
237+
- --logging-format=json
238238
```
239239

240240
With this config, the respective managers will be invoked with:
241241

242242
```bash
243-
manager --feature-gates=MachinePool=true
243+
manager --logging-format=json
244244
```
245245

246246
### 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)