-
Notifications
You must be signed in to change notification settings - Fork 219
deploy: replace /var/lib/kubelet on-the-fly #286
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pohly 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 |
@@ -187,7 +190,7 @@ echo "deploying with CSIStorageCapacity $csistoragecapacities_api: $have_csistor | |||
echo "deploying hostpath components" | |||
for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort); do | |||
echo " $i" | |||
modified="$(cat "$i" | while IFS= read -r line; do | |||
modified="$(cat "$i" | sed -e "s;/var/lib/kubelet/;${KUBELET_DATA_DIR:-/var/lib/kubelet}/;" | while IFS= read -r line; do |
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.
It's probably matter of style, would it be better to have somewhere on the top:
KUBELET_DATA_DIR=${KUBELET_DATA_DIR:-/var/lib/kubelet}
and then use $KUBELET_DATA_DIR
without extra expansion, especially when part of a regexp here?
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.
Yes, that may be a bit more obvious. I'll change it.
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.
Done and pushed.
This is useful for clusters where kubelet is installed differently. KinD cluster testing might be done with a non-default location to recognize and cleanup loop devices that were set up by the driver.
/retest |
Longer term, I think it would be easier to maintain customization logic
like this if we move to a templating tool like kustomize
…On Mon, May 10, 2021, 08:42 Jan Šafránek ***@***.***> wrote:
/retest
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#286 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF2QYPISVOVDQ4NDPWPXF23TM75FNANCNFSM44FODKIA>
.
|
I agree, but this is a significant change and some of the things we currently do in shell code (like taking parameters via env variables) will not be straight-forward. So unless we find someone with significant time at his hand I suspect we'll have to stick with what we have. |
/lgtm |
@pohly: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This is useful for clusters where kubelet is installed
differently. KinD cluster testing might be done with a non-default
location to recognize and cleanup loop devices that were set up by
the driver.
Which issue(s) this PR fixes:
Fixes #71
Special notes for your reviewer:
Does this PR introduce a user-facing change?: