-
Notifications
You must be signed in to change notification settings - Fork 40k
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
gci: decouple from the built-in kubelet version #31367
Conversation
Review status: 0 of 4 files reviewed at latest revision, 3 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 535 [r1] (raw file):
Many packages come with their own systemd service file as part of their distributions. Is it possible to have kubernetes do so too so that this doesn't need to be hard coded? Also, that will also make the service file versioned, which is good. If not, can it at least be in one of the yaml configs? cluster/gce/gci/configure-helper.sh, line 1099 [r1] (raw file):
cluster/gce/gci/configure.sh, line 174 [r1] (raw file):
Comments from Reviewable |
[Service] | ||
Restart=always | ||
RestartSec=10 | ||
ExecStart=${kubelet_bin} ${flags} |
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.
Can we continue use the /etc/default/kubelet for flags? What we currently have is:
[Service]
Restart=always
RestartSec=10
EnvironmentFile=/etc/default/kubelet
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
ExecStart=${kubelet_bin} $KUBELET_OPTS
Additionally, if you want, you can even do something like:
ExecStart=$KUBELET_BIN $KUBELET_OPTS
and set KUBELET_BIN also in /etc/default/kubelet. This can allow you to keep the kubelet.service file completely static.
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.
+1
I added an additional check for TEST_CLUSTER, that is the version comparison happens only if TEST_CLUSTER is 'true'. On non-test clusters we will always use the downloaded kubelet and systemd service file. Review status: 0 of 4 files reviewed at latest revision, 4 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
Review status: 0 of 4 files reviewed at latest revision, 3 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
Review status: 0 of 4 files reviewed at latest revision, 2 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
else | ||
rm -f "${kube_bin}/kubelet" | ||
fi | ||
mv "${src_dir}/kubelet" "${kube_bin}" |
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.
So if the instance reboots, I think we end up re-doing the entire download and untar thing right?
It might be worth testing if this continues to work with even after a reboot.
Review status: 0 of 4 files reviewed at latest revision, 4 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
Review status: 0 of 4 files reviewed at latest revision, 4 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
Review status: 0 of 4 files reviewed at latest revision, 4 unresolved discussions. cluster/gce/gci/configure-helper.sh, line 531 [r1] (raw file):
|
Review status: 0 of 4 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. Comments from Reviewable |
LGTM but @adityakali should take a further look... |
Prior to this change, configure.sh would: (1) compare versions of built-in kubelet and downloaded kubelet, and (2) bind-mount downloaded kubelet at /usr/bin/kubelet in case of version mismatch With this change, configure.sh: (1) compares the two versions only on test clusters, and (2) uses the actual file paths to start kubelet w/o any bind-mounting To allow (2), this change also provides its own version of kubelet systemd service file. Effectively with this change we will always use the downloaded kubelet binary along with its own systemd service file on non-test clusters. The main advantage is this change does not rely on the kubelet being built in to the OS image.
GCE e2e build/test passed for commit 2939ebd. |
LGTM |
LGTM |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 2939ebd. |
Automatic merge from submit-queue |
Removing label |
…-upstream-release-1.3 Automated cherry pick of #31367
…-of-#31367-upstream-release-1.3 Automated cherry pick of kubernetes#31367
Fixed #31376
Prior to this change, configure.sh would:
(1) compare versions of built-in kubelet and downloaded kubelet, and
(2) bind-mount downloaded kubelet at /usr/bin/kubelet in case of
version mismatch
With this change, configure.sh:
(1) compares the two versions only on test clusters, and
(2) uses the actual file paths to start kubelet w/o any bind-mounting
To allow (2), this change also provides its own version of kubelet
systemd service file.
Effectively with this change we will always use the downloaded kubelet
binary along with its own systemd service file on non-test clusters. The
main advantage is this change does not rely on the kubelet being built in to
the OS image.
@dchen1107 @wonderfly can you please review
cc/ @kubernetes/goog-image FYI
This change is