Decompose service unit into configurable drop-ins#135
Merged
wenxuan0923 merged 1 commit intomainfrom Mar 25, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the kubelet systemd unit management in components/kubelet/v20260301 to replace a single parameterized kubelet.service with a static base unit plus agent-managed drop-ins, enabling operator overrides via higher-numbered drop-ins or /etc/default/kubelet without editing agent-owned files.
Changes:
- Split kubelet flags into three agent-managed drop-ins (kubeconfig args, node config/tuning args, and optional env-file loading).
- Convert
kubelet.serviceinto a static unit that consumes$KUBELET_*env vars. - Minor import reordering in a generated protobuf file.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| components/kubelet/v20260301/kubelet_service.go | Writes/updates kubelet unit + three drop-ins and reloads systemd when any of them change. |
| components/kubelet/v20260301/assets/kubelet.service | Base unit now references $KUBELET_*_ARGS variables instead of templated flags. |
| components/kubelet/v20260301/assets/10-flex-node-kubeconfig.conf | New drop-in defining KUBELET_KUBECONFIG_ARGS (incl. optional bootstrap kubeconfig). |
| components/kubelet/v20260301/assets/20-flex-node-node-config.conf | New drop-in defining KUBELET_NODE_CONFIG_ARGS and KUBELET_TUNING_ARGS. |
| components/kubelet/v20260301/assets/50-flex-node-env-file.conf | New drop-in loading optional /etc/default/kubelet for operator overrides. |
| components/arc/action.pb.go | Generated-file import ordering adjustment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
runzhen
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by 1p customer. Replaces the monolithic
kubelet.servicetemplate with a static base unit and three agent-managed drop-ins:10-flex-node-kubeconfig.conf—KUBELET_KUBECONFIG_ARGS20-flex-node-node-config.conf—KUBELET_NODE_CONFIG_ARGS+KUBELET_TUNING_ARGS50-flex-node-env-file.conf— loads/etc/default/kubeletas optional env fileNo behavior change for default deployments. Operators can now override kubelet flags by placing a higher-numbered drop-in (e.g.
90-custom.conf) or/etc/default/kubeletwithout touching agent-managed files.