-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow Sync for non-root containers-hotreload example #3680
Allow Sync for non-root containers-hotreload example #3680
Conversation
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized those changes should be made in integration/examples/hot-reload
too. Otherzise, next time we do a release, your changes will be lost.
Oops, I'll update the integration files today |
0e97432
to
b48681e
Compare
I updated the integration files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibidani I've thought about your PR some more. And I wonder if you shouldn't be using COPY --chown instead, like in https://github.com/GoogleContainerTools/skaffold/blob/master/examples/nodejs/backend/Dockerfile. wdyt?
Thanks Good suggestion, I'll update the code tonight |
I don’t think so. I’d love to see all our examples better represent real projects. I didn’t want to step on your feet and changed a different sample. |
b48681e
to
6bc189b
Compare
I've backported the great changes in #3683 into hot-reload example, per my tests on unprivileged cluster securityContext was necessary for the hot-load to succeed without the "tar: can't remove old file app/index.js: Permission denied" error mentioned above.
|
…Tools#3680) * Allow Sync for non-root containers-hotreload example * Allow Sync for non-root containers-hotreload example - integration dir * backporting GoogleContainerTools#3683 changes for better examples * integration files updates of hot-reload example * newline at the end of file * newline at the end of file
When deploying the hot-reload example to non-root containers, skaffold dev sync functionality fails with "permissions denied"
There has been multiple open issues referring to this error: #2041 #1950
This change will ensure examples will be compatible with more clusters with higher security requirements.
Description
chowning the target folder with the proper runtime UID so that tar xmf (Sync) command will not fail
User facing changes
Write n/a if not output or log lines changed and no behavior is changed
Before
The following error cases the Sync on save to break
After
skaffold dev sync is working as expected on both node and python examples
Next PRs.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes
Release Notes