Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tilt live reload for capz-controller-manager #3500

Merged
merged 1 commit into from
May 1, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented May 1, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it: This PR fixes an issue where Tilt was failing to perform live updates of capz-controller-manager due to insufficient permissions on the parent directory of the manager binary. This change moves the Tilt-specific files in the CAPZ container into a new /tilt directory with world-writeable permissions so the non-root user running the container newly specified in #3399 is able to delete the old manager binary.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3497

Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 1, 2023
Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thank you for fixing this! I tested it locally and it seems to work.

I assume this was another victim of the distroless update? We had to do a similar permissions hack for process.txt.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 1, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a37e8f3d5f42649568b4f6cebcbef2426a8679cc

@nojnhuh
Copy link
Contributor Author

nojnhuh commented May 1, 2023

I assume this was another victim of the distroless update? We had to do a similar permissions hack for process.txt.

What changed in the distroless image? I think this issue was more related to the capz-controller-manager container now running as non-root. But since the Tilt-flavored image is built as root, then the tilt scripts and manager binary are all owned by root and not world-writeable which the live reload steps would need to run as non-root.

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 1, 2023
@k8s-ci-robot k8s-ci-robot merged commit 499d083 into kubernetes-sigs:main May 1, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone May 1, 2023
@nojnhuh nojnhuh deleted the tilt-reload branch May 2, 2023 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Tilt live reload for capz-controller-manager is broken
4 participants