Skip to content

Commit aa511d8

Browse files
authored
Merge pull request kubernetes-sigs#7968 from fabriziopandini/improve-tilt
🌱 Improve tilt-prepare for testing providers outside of the CAPI repository
2 parents 9c4c02e + b4fb5d0 commit aa511d8

File tree

4 files changed

+158
-127
lines changed

4 files changed

+158
-127
lines changed

Tiltfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ always_enable_providers = ["core"]
4949

5050
providers = {
5151
"core": {
52-
"context": ".",
52+
"context": ".", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare
5353
"image": "gcr.io/k8s-staging-cluster-api/cluster-api-controller",
5454
"live_reload_deps": [
5555
"main.go",
@@ -68,7 +68,7 @@ providers = {
6868
"label": "CAPI",
6969
},
7070
"kubeadm-bootstrap": {
71-
"context": "bootstrap/kubeadm",
71+
"context": "bootstrap/kubeadm", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare
7272
"image": "gcr.io/k8s-staging-cluster-api/kubeadm-bootstrap-controller",
7373
"live_reload_deps": [
7474
"main.go",
@@ -82,7 +82,7 @@ providers = {
8282
"label": "CABPK",
8383
},
8484
"kubeadm-control-plane": {
85-
"context": "controlplane/kubeadm",
85+
"context": "controlplane/kubeadm", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare
8686
"image": "gcr.io/k8s-staging-cluster-api/kubeadm-control-plane-controller",
8787
"live_reload_deps": [
8888
"main.go",
@@ -95,7 +95,7 @@ providers = {
9595
"label": "KCP",
9696
},
9797
"docker": {
98-
"context": "test/infrastructure/docker",
98+
"context": "test/infrastructure/docker", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare
9999
"image": "gcr.io/k8s-staging-cluster-api/capd-manager",
100100
"live_reload_deps": [
101101
"main.go",
@@ -121,7 +121,7 @@ COPY --from=tilt-helper /usr/bin/kubectl /usr/bin/kubectl
121121
""",
122122
},
123123
"test-extension": {
124-
"context": "test/extension",
124+
"context": "test/extension", # NOTE: this should be kept in sync with corresponding setting in tilt-prepare
125125
"image": "gcr.io/k8s-staging-cluster-api/test-extension",
126126
"live_reload_deps": [
127127
"main.go",

docs/book/src/developer/tilt.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ build it.
394394
**live_reload_deps**: a list of files/directories to watch. If any of them changes, Tilt rebuilds the manager binary
395395
for the provider and performs a live update of the running container.
396396

397+
**version**: allows to define the version to be used for the Provider CR. If empty, a default version will
398+
be used.
399+
397400
**additional_docker_helper_commands** (String, default=""): Additional commands to be run in the helper image
398401
docker build. e.g.
399402

@@ -478,4 +481,4 @@ syntax highlighting and auto-formatting. To enable it for Tiltfile a file associ
478481
1. Set `build_engine` to `podman` in `tilt-settings.yaml` (optional, only if both docker & podman are installed)
479482
1. Define the env variable `DOCKER_HOST` to the right socket while running tilt (eg. `DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock tilt up`)
480483

481-
NB: The socket defined by `DOCKER_HOST` is used only for the `hack/tools/tilt-prepare` command, the image build is running the `podman build`/`podman push` commands.
484+
NB: The socket defined by `DOCKER_HOST` is used only for the `hack/tools/tilt-prepare` command, the image build is running the `podman build`/`podman push` commands.

0 commit comments

Comments
 (0)