Allow Sync for non-root containers-hotreload example#3680
Allow Sync for non-root containers-hotreload example#3680dgageot merged 6 commits intoGoogleContainerTools:masterfrom
Conversation
Codecov Report
|
dgageot
left a comment
There was a problem hiding this comment.
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 |
dgageot
left a comment
There was a problem hiding this comment.
@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