Skip to content

Decompose service unit into configurable drop-ins#135

Merged
wenxuan0923 merged 1 commit intomainfrom
wenx/decompose
Mar 25, 2026
Merged

Decompose service unit into configurable drop-ins#135
wenxuan0923 merged 1 commit intomainfrom
wenx/decompose

Conversation

@wenxuan0923
Copy link
Collaborator

Requested by 1p customer. Replaces the monolithic kubelet.service template with a static base unit and three agent-managed drop-ins:

  • 10-flex-node-kubeconfig.confKUBELET_KUBECONFIG_ARGS
  • 20-flex-node-node-config.confKUBELET_NODE_CONFIG_ARGS + KUBELET_TUNING_ARGS
  • 50-flex-node-env-file.conf — loads /etc/default/kubelet as optional env file

No 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/kubelet without touching agent-managed files.

@wenxuan0923 wenxuan0923 marked this pull request as ready for review March 24, 2026 23:56
Copilot AI review requested due to automatic review settings March 24, 2026 23:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.service into 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.

@wenxuan0923 wenxuan0923 merged commit ff72cc6 into main Mar 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants