Skip to content

Commit

Permalink
Fix: Tiltfile with process.txt issue (#241)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joekr committed Apr 7, 2023
1 parent 7cb4637 commit 6b2e322
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ settings = {
"deploy_cert_manager": True,
"preload_images_for_kind": True,
"kind_cluster_name": "capoci",
"capi_version": "v1.3.0",
"cert_manager_version": "v1.1.0",
"capi_version": "v1.4.1",
"cert_manager_version": "v1.11.0",
"kubernetes_version": "v1.24.3",
}

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

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

tilt_dockerfile_header = """
FROM gcr.io/distroless/base:debug as tilt
WORKDIR /
COPY --from=tilt-helper /process.txt .
COPY --from=tilt-helper /start.sh .
COPY --from=tilt-helper /restart.sh .
COPY --from=tilt-helper /go/bin/dlv .
COPY manager .
"""

Expand Down

0 comments on commit 6b2e322

Please sign in to comment.