Skip to content

Commit 6b2e322

Browse files
authored
Fix: Tiltfile with process.txt issue (#241)
We create the `process.txt` file since the `config/manager/manager.yaml` changed some permissions. If the `process.txt` file exists the permissions issues go away.
1 parent 7cb4637 commit 6b2e322

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Tiltfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ settings = {
1919
"deploy_cert_manager": True,
2020
"preload_images_for_kind": True,
2121
"kind_cluster_name": "capoci",
22-
"capi_version": "v1.3.0",
23-
"cert_manager_version": "v1.1.0",
22+
"capi_version": "v1.4.1",
23+
"cert_manager_version": "v1.11.0",
2424
"kubernetes_version": "v1.24.3",
2525
}
2626

@@ -41,18 +41,22 @@ if "default_registry" in settings:
4141

4242
tilt_helper_dockerfile_header = """
4343
# Tilt image
44-
FROM golang:1.18 as tilt-helper
44+
FROM golang:1.19 as tilt-helper
4545
# Support live reloading with Tilt
46-
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
47-
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh && \
48-
chmod +x /start.sh && chmod +x /restart.sh
46+
RUN go install github.com/go-delve/delve/cmd/dlv@latest
47+
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/restart.sh && \
48+
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/tilt-dev/rerun-process-wrapper/master/start.sh && \
49+
chmod +x /start.sh && chmod +x /restart.sh && chmod +x /go/bin/dlv && \
50+
touch /process.txt && chmod 0777 /process.txt `# pre-create PID file to allow even non-root users to run the image`
4951
"""
5052

5153
tilt_dockerfile_header = """
5254
FROM gcr.io/distroless/base:debug as tilt
5355
WORKDIR /
56+
COPY --from=tilt-helper /process.txt .
5457
COPY --from=tilt-helper /start.sh .
5558
COPY --from=tilt-helper /restart.sh .
59+
COPY --from=tilt-helper /go/bin/dlv .
5660
COPY manager .
5761
"""
5862

0 commit comments

Comments
 (0)