Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Disable automount resources for the
init-container-home
init container #1273Disable automount resources for the
init-container-home
init container #1273Changes from all commits
7c71934
f83b0ba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Setting the
init-persistent-home
initcontainer to the front is necessary because if there is another initcontainer that runs before it, the automount resource can mount within/home/user
and cause stow conflicts ininit-persistent-home
since the mounted configmap file would be saved in the PVC.Basically, this function is here to have a way to ensure that
init-persistent-home
is the first initcontainer that runs, running before initcontainers likeche-code-injector
andproject-clone
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.
Thank you for the clarification, makes sense to me. It's probably worth leaving a similar comment explaining this in the code.
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.
Somewhat redundant since it's already implicitly being checked in the preStart event test, but we could also explicitly check that the first container in the
podAdditions.initContainers[]
is theinit-persistent-home
initContainer (since this is a change introduced in this PR).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 wasn't able to do that check here because the function that the this test is for:
devworkspace-operator/pkg/provision/automount/common_persistenthome_test.go
Line 59 in 9874cd4
doesn't reorder the initcontainers
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.
My mistake, makes sense 👍