Skip to content

Commit d938f32

Browse files
authored
docs: update for Tilt v0.27.1 (#37)
* Fix compiliation on Go 1.18 for macOS (upgrade `golang.org/x/sys`) * Set `go.mod` version as 1.18 * Update TOC now that `DockerComposeService` exists * Tiltfile tweaks
1 parent 0ae7d85 commit d938f32

25 files changed

+1985
-101
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ gendocs:
44
rm -fR docs/core
55
rm -fR docs/interface
66
rm -fR docs/kubernetes
7+
rm -fR docs/container-images
8+
rm -fR docs/docker-compose
79
rm -fR docs/meta
810
rm -fR docs/other-resources
911
rm -fR docs/common-parameters

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local_resource(
99
local_resource(
1010
name='gendocs',
1111
cmd='make gendocs',
12-
deps=['Makefile', './config', './openapi-spec'])
12+
deps=['Makefile', 'go.mod', 'go.sum', './cmd/gendocs', './config', './openapi-spec'])
1313

1414
docker_build(
1515
'api-site-base',

config/toc.yaml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,6 @@ parts:
3434
group: tilt.dev
3535
version: v1alpha1
3636
slugname: cluster
37-
- name: CmdImage
38-
group: tilt.dev
39-
version: v1alpha1
40-
slugname: cmd-image
41-
- name: DockerImage
42-
group: tilt.dev
43-
version: v1alpha1
44-
slugname: docker-image
45-
- name: LiveUpdate
46-
group: tilt.dev
47-
version: v1alpha1
48-
slugname: live-update
49-
- name: ImageMap
50-
group: tilt.dev
51-
version: v1alpha1
52-
slugname: image-map
5337
- name: KubernetesApply
5438
group: tilt.dev
5539
version: v1alpha1
@@ -86,6 +70,32 @@ parts:
8670
version: v1alpha1
8771
slugname: toggle-button
8872

73+
- name: Container Images
74+
chapters:
75+
- name: CmdImage
76+
group: tilt.dev
77+
version: v1alpha1
78+
slugname: cmd-image
79+
- name: DockerImage
80+
group: tilt.dev
81+
version: v1alpha1
82+
slugname: docker-image
83+
- name: LiveUpdate
84+
group: tilt.dev
85+
version: v1alpha1
86+
slugname: live-update
87+
- name: ImageMap
88+
group: tilt.dev
89+
version: v1alpha1
90+
slugname: image-map
91+
92+
- name: Docker Compose
93+
chapters:
94+
- name: DockerComposeService
95+
group: tilt.dev
96+
version: v1alpha1
97+
slugname: docker-compose-service
98+
8999
- name: Meta
90100
chapters:
91101
- name: DeleteOptions

docs/_layouts/api.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
{% if href != "https://api.tilt.dev" %}
1313
{% assign href = link.href | prepend: site.docsurl %}
1414
{% assign hrefMobile = link.hrefMobile | prepend: site.docsurl %}
15-
{% endif %}
15+
{% endif %}
1616
<li class="Docs-nav-list-item">
1717
<a class="Docs-nav-link Docs-nav-link--desktop{% if page.sidebar == link.active %} is-active{% endif %}" href="{{href | escape}}">
18-
{{link.title | escape}}
18+
{{link.title | escape}}
1919
</a>
2020
<!-- On mobile, top-level nav goes to a separate page with subnav links -->
2121
<a class="Docs-nav-link Docs-nav-link--mobile{% if page.sidebar == link.active %} is-active{% endif %}" href="{{hrefMobile | escape}}">
@@ -49,19 +49,19 @@
4949
<dd class="js-accordion__panel Docs-subnav-section">
5050
<ul class="Docs-subnav-section-list">
5151
{% for chapter in part.chapters %}
52-
52+
5353
{% assign chapterName = chapter.name %}
5454
{% if chapter.slugname %}
5555
{% assign chapterName = chapter.slugname %}
5656
{% endif %}
57-
57+
5858
{% assign baseName = chapterName | append: ".html" %}
5959
{% if chapter.version %}
6060
{% assign baseName = chapterName | append: "-" | append: chapter.version | append: ".html" %}
6161
{% endif %}
6262

63-
{% assign chapterHref = "/" | append: part.name | append: "/" | append: baseName | downcase %}
64-
63+
{% assign chapterHref = "/" | append: part.name | replace: " ", "-" | append: "/" | append: baseName | downcase %}
64+
6565
<li class="Docs-subnav-section-list-item">
6666
<a class="Docs-subnav-link{% if page.url == chapterHref %} is-active{% endif %}"
6767
href="{{chapterHref}}">
@@ -72,13 +72,13 @@
7272
</ul>
7373
</dd>
7474
{% endfor %}
75-
</dl>
75+
</dl>
7676
</nav>
7777
</aside>
78-
78+
7979
<article class="Docs-content">
8080
<h1>{{ page.title | escape }}</h1>
81-
81+
8282
{{ content }}
8383
</article>
8484
</div>

docs/common-parameters/common-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ api_metadata:
77
content_type: "api_reference"
88
description: ""
99
title: "Common Parameters"
10-
weight: 6
10+
weight: 8
1111
---
1212

1313

docs/container-images/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Container Images"
3+
weight: 4
4+
---

docs/kubernetes/cmd-image-v1alpha1.md renamed to docs/container-images/cmd-image-v1alpha1.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ api_metadata:
77
content_type: "api_reference"
88
description: "CmdImage describes an image to build with an arbitrary shell command."
99
title: "CmdImage v1alpha1"
10-
weight: 2
10+
weight: 1
1111
---
1212

1313
`apiVersion: tilt.dev/v1alpha1`
@@ -33,10 +33,10 @@ CmdImage describes an image to build with an arbitrary shell command.
3333
- **metadata** ([ObjectMeta](../meta/object-meta#ObjectMeta))
3434

3535

36-
- **spec** ([CmdImageSpec](../kubernetes/cmd-image-v1alpha1#CmdImageSpec))
36+
- **spec** ([CmdImageSpec](../container-images/cmd-image-v1alpha1#CmdImageSpec))
3737

3838

39-
- **status** ([CmdImageStatus](../kubernetes/cmd-image-v1alpha1#CmdImageStatus))
39+
- **status** ([CmdImageStatus](../container-images/cmd-image-v1alpha1#CmdImageStatus))
4040

4141

4242

@@ -58,6 +58,20 @@ CmdImageSpec describes how the custom script builds images and where it puts the
5858

5959
Command-line arguments. Must have length at least 1.
6060

61+
- **cluster** (string)
62+
63+
The name of the cluster we're building for.
64+
65+
We'll use the cluster to determine the architecture of the image to build, and the registry to build it for.
66+
67+
If no cluster is specified, assumes the default cluster.
68+
69+
- **clusterNeeds** (string)
70+
71+
Whether the cluster needs access to the image.
72+
73+
If not specified, assumes we have to push up to the cluster.
74+
6175
- **dir** (string)
6276

6377
Process working directory.
@@ -183,7 +197,7 @@ CmdImageList
183197
- **metadata** ([ListMeta](../meta/list-meta#ListMeta))
184198

185199

186-
- **items** ([][CmdImage](../kubernetes/cmd-image-v1alpha1#CmdImage)), required
200+
- **items** ([][CmdImage](../container-images/cmd-image-v1alpha1#CmdImage)), required
187201

188202

189203

docs/kubernetes/docker-image-v1alpha1.md renamed to docs/container-images/docker-image-v1alpha1.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ api_metadata:
77
content_type: "api_reference"
88
description: "DockerImage describes an image to build with Docker."
99
title: "DockerImage v1alpha1"
10-
weight: 3
10+
weight: 2
1111
---
1212

1313
`apiVersion: tilt.dev/v1alpha1`
@@ -33,10 +33,10 @@ DockerImage describes an image to build with Docker.
3333
- **metadata** ([ObjectMeta](../meta/object-meta#ObjectMeta))
3434

3535

36-
- **spec** ([DockerImageSpec](../kubernetes/docker-image-v1alpha1#DockerImageSpec))
36+
- **spec** ([DockerImageSpec](../container-images/docker-image-v1alpha1#DockerImageSpec))
3737

3838

39-
- **status** ([DockerImageStatus](../kubernetes/docker-image-v1alpha1#DockerImageStatus))
39+
- **status** ([DockerImageStatus](../container-images/docker-image-v1alpha1#DockerImageStatus))
4040

4141

4242

@@ -70,6 +70,20 @@ Most fields of this spec directly correspond to the Docker CLI.
7070

7171
Equivalent to `--cache-from` in the Docker CLI.
7272

73+
- **cluster** (string)
74+
75+
The name of the cluster we're building for.
76+
77+
We'll use the cluster to determine the architecture of the image to build, and the registry to build it for.
78+
79+
If no cluster is specified, assumes the default cluster.
80+
81+
- **clusterNeeds** (string)
82+
83+
Whether the cluster needs access to the image.
84+
85+
If not specified, assumes we have to push up to the cluster.
86+
7387
- **context** (string)
7488

7589
Context specifies the Docker build context.
@@ -268,7 +282,7 @@ DockerImageList
268282
- **metadata** ([ListMeta](../meta/list-meta#ListMeta))
269283

270284

271-
- **items** ([][DockerImage](../kubernetes/docker-image-v1alpha1#DockerImage)), required
285+
- **items** ([][DockerImage](../container-images/docker-image-v1alpha1#DockerImage)), required
272286

273287

274288

docs/kubernetes/image-map-v1alpha1.md renamed to docs/container-images/image-map-v1alpha1.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ api_metadata:
77
content_type: "api_reference"
88
description: "ImageMap expresses the mapping from an image reference to a real, pushed image in an image registry that a container runtime can access."
99
title: "ImageMap v1alpha1"
10-
weight: 5
10+
weight: 4
1111
---
1212

1313
`apiVersion: tilt.dev/v1alpha1`
@@ -41,10 +41,10 @@ ImageMap doesn't follow the usual Kubernetes-style API semantics (where the Stat
4141
- **metadata** ([ObjectMeta](../meta/object-meta#ObjectMeta))
4242

4343

44-
- **spec** ([ImageMapSpec](../kubernetes/image-map-v1alpha1#ImageMapSpec))
44+
- **spec** ([ImageMapSpec](../container-images/image-map-v1alpha1#ImageMapSpec))
4545

4646

47-
- **status** ([ImageMapStatus](../kubernetes/image-map-v1alpha1#ImageMapStatus))
47+
- **status** ([ImageMapStatus](../container-images/image-map-v1alpha1#ImageMapStatus))
4848

4949

5050

@@ -66,28 +66,6 @@ ImageMapSpec defines the desired state of ImageMap
6666

6767
By default, this selector will match an image if the names match (tags on both the selector and the matched reference are ignored).
6868

69-
- **disableSource** (DisableSource)
70-
71-
Specifies how to disable this.
72-
73-
<a name="DisableSource"></a>
74-
*Points at a thing that can control whether something is disabled*
75-
76-
- **disableSource.configMap** (ConfigMapDisableSource)
77-
78-
This DisableSource is controlled by a ConfigMap
79-
80-
<a name="ConfigMapDisableSource"></a>
81-
*Specifies a ConfigMap to control a DisableSource*
82-
83-
- **disableSource.configMap.key** (string), required
84-
85-
The key where the enable/disable state is stored.
86-
87-
- **disableSource.configMap.name** (string), required
88-
89-
The name of the ConfigMap
90-
9169
- **matchExact** (boolean)
9270

9371
If specified, then tags on both the selector and the matched reference are used for matching. The selector will only match the reference if the tags match exactly.
@@ -182,7 +160,7 @@ ImageMapList
182160
- **metadata** ([ListMeta](../meta/list-meta#ListMeta))
183161

184162

185-
- **items** ([][ImageMap](../kubernetes/image-map-v1alpha1#ImageMap)), required
163+
- **items** ([][ImageMap](../container-images/image-map-v1alpha1#ImageMap)), required
186164

187165

188166

docs/kubernetes/live-update-v1alpha1.md renamed to docs/container-images/live-update-v1alpha1.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ api_metadata:
77
content_type: "api_reference"
88
description: "LiveUpdate."
99
title: "LiveUpdate v1alpha1"
10-
weight: 4
10+
weight: 3
1111
---
1212

1313
`apiVersion: tilt.dev/v1alpha1`
@@ -33,10 +33,10 @@ LiveUpdate
3333
- **metadata** ([ObjectMeta](../meta/object-meta#ObjectMeta))
3434

3535

36-
- **spec** ([LiveUpdateSpec](../kubernetes/live-update-v1alpha1#LiveUpdateSpec))
36+
- **spec** ([LiveUpdateSpec](../container-images/live-update-v1alpha1#LiveUpdateSpec))
3737

3838

39-
- **status** ([LiveUpdateStatus](../kubernetes/live-update-v1alpha1#LiveUpdateStatus))
39+
- **status** ([LiveUpdateStatus](../container-images/live-update-v1alpha1#LiveUpdateStatus))
4040

4141

4242

@@ -65,6 +65,19 @@ LiveUpdateSpec defines the desired state of LiveUpdate
6565

6666
Every live update must be associated with some object for finding containers. In the future, we expect there to be other types of container discovery objects (like Docker Compose container discovery).*
6767

68+
- **selector.dockerCompose** (LiveUpdateDockerComposeSelector)
69+
70+
Finds containers in Docker Compose.
71+
72+
<a name="LiveUpdateDockerComposeSelector"></a>
73+
*Specifies how to select containers to live update inside Docker Compose.*
74+
75+
- **selector.dockerCompose.service** (string), required
76+
77+
The name of a DockerComposeService object.
78+
79+
For simple projects, this is usually the same as the service name in the docker-compose.yml file. (But it doesn't necessarily have to be.)
80+
6881
- **selector.kubernetes** (LiveUpdateKubernetesSelector)
6982

7083
Finds containers in Kubernetes.
@@ -281,7 +294,7 @@ LiveUpdateList
281294
- **metadata** ([ListMeta](../meta/list-meta#ListMeta))
282295

283296

284-
- **items** ([][LiveUpdate](../kubernetes/live-update-v1alpha1#LiveUpdate)), required
297+
- **items** ([][LiveUpdate](../container-images/live-update-v1alpha1#LiveUpdate)), required
285298

286299

287300

0 commit comments

Comments
 (0)