Skip to content

refactor: remove edge memory overrides, default to upstream Kubernetes [KS-68]#166

Merged
stevensbkang merged 1 commit into
developfrom
refactor/ks-68/remove-optimisations
Jul 7, 2026
Merged

refactor: remove edge memory overrides, default to upstream Kubernetes [KS-68]#166
stevensbkang merged 1 commit into
developfrom
refactor/ks-68/remove-optimisations

Conversation

@stevensbkang

Copy link
Copy Markdown
Member

KubeSolo shipped a set of "edge" overrides (gated behind the --full flag) intended to reduce memory use on constrained nodes. A controlled A/B on identical hardware — full vs. edge, scraped into Prometheus via cAdvisor on the kubesolo.service cgroup — showed the savings are marginal: ~15 MB RSS (~5.6%) and ~0.004 cores (~12% relative) at idle. That does not justify maintaining ~60 divergent flags across five components, so the overrides are removed and KubeSolo now always uses upstream Kubernetes and containerd defaults.

Changes:

  • Delete all !fullMode override blocks: kubelet, controller-manager, apiserver, kube-proxy, and containerd (CRI images + GC scheduler).
  • Remove fullMode plumbing: service struct fields/constructors, kubeproxy.NewService signature, types.Embedded.FullMode, the kubesolo struct field, and the edge/full startup "profile" log line.
  • Keep --full / KUBESOLO_FULL as a deprecated no-op for backwards compatibility: it still parses and logs a warning when set, and will be removed in a future release. Existing units/scripts do not break.
  • Update kubelet config tests, install.sh, and the README / container-mode / cni / kubesoloctl docs.

Note: this reverts to upstream behaviour, which lifts maxPods 20->110, relaxes eviction thresholds, and re-enables the pprof/debug handlers on every node. These are behavioural and security-surface changes, not memory tuning. The containerMode adjustments are unaffected

…s [KS-68]

KubeSolo shipped a set of "edge" overrides (gated behind the --full flag)
intended to reduce memory use on constrained nodes. A controlled A/B on
identical hardware — full vs. edge, scraped into Prometheus via cAdvisor on
the kubesolo.service cgroup — showed the savings are marginal: ~15 MB RSS
(~5.6%) and ~0.004 cores (~12% relative) at idle. That does not justify
maintaining ~60 divergent flags across five components, so the overrides are
removed and KubeSolo now always uses upstream Kubernetes and containerd
defaults.

Changes:
- Delete all !fullMode override blocks: kubelet, controller-manager,
  apiserver, kube-proxy, and containerd (CRI images + GC scheduler).
- Remove fullMode plumbing: service struct fields/constructors,
  kubeproxy.NewService signature, types.Embedded.FullMode, the kubesolo
  struct field, and the edge/full startup "profile" log line.
- Keep --full / KUBESOLO_FULL as a deprecated no-op for backwards
  compatibility: it still parses and logs a warning when set, and will be
  removed in a future release. Existing units/scripts do not break.
- Update kubelet config tests, install.sh, and the README / container-mode /
  cni / kubesoloctl docs.

Note: this reverts to upstream behaviour, which lifts maxPods 20->110,
relaxes eviction thresholds, and re-enables the pprof/debug handlers on every
node. These are behavioural and security-surface changes, not memory tuning.
The containerMode adjustments are unaffected
@linear

linear Bot commented Jul 6, 2026

Copy link
Copy Markdown

KS-68

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the legacy “edge” memory-override profile and associated fullMode plumbing so KubeSolo consistently uses upstream Kubernetes/containerd defaults, while keeping --full/KUBESOLO_FULL as a deprecated no-op for backward compatibility.

Changes:

  • Deleted all !fullMode override blocks across Kubernetes components and containerd.
  • Removed FullMode/fullMode fields and constructor parameters throughout the service wiring.
  • Updated flag help text and docs to mark --full as deprecated/no-op, plus adjusted kubelet config tests and installer behavior.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
types/types.go Removes Embedded.FullMode from shared config struct.
README.md Updates --full flag documentation to reflect deprecation.
pkg/runtime/containerd/service.go Removes fullMode from containerd service struct initialization.
pkg/runtime/containerd/config.go Drops edge-only CRI image overrides and GC scheduler plugin config.
pkg/kubernetes/kubeproxy/service.go Removes fullMode from kube-proxy service wiring and constructor signature.
pkg/kubernetes/kubeproxy/flags.go Removes edge-only kube-proxy flag tuning gated by !fullMode.
pkg/kubernetes/kubelet/service.go Removes fullMode from kubelet service wiring.
pkg/kubernetes/kubelet/config.go Removes edge-only kubelet config overrides, leaving container-mode adjustments intact.
pkg/kubernetes/kubelet/config_test.go Updates tests to validate upstream-default behavior (and container-mode behavior) without full/edge modes.
pkg/kubernetes/controller/service.go Removes fullMode from controller-manager service wiring.
pkg/kubernetes/controller/flags.go Removes edge-only controller-manager flag overrides gated by !fullMode.
pkg/kubernetes/apiserver/service.go Removes fullMode from apiserver service wiring.
pkg/kubernetes/apiserver/flags.go Removes edge-only apiserver flag overrides gated by !fullMode.
internal/config/flags/flags.go Marks --full as deprecated/no-op in CLI help text.
install.sh Stops propagating KUBESOLO_FULL into generated command args.
docs/installation/kubesoloctl.md Removes container-mode explanation tying behavior to --full.
docs/configuration/container-mode.md Updates wording to reflect upstream defaults plus container-mode adjustments.
docs/configuration/cni.md Removes advice to use --full for Cilium.
cmd/kubesolo/main.go Removes “profile” startup log; logs a deprecation warning when --full is set; updates kube-proxy constructor call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/kubesolo/main.go
Comment thread README.md
Comment thread internal/config/flags/flags.go
@stevensbkang
stevensbkang merged commit 35d1093 into develop Jul 7, 2026
16 checks passed
@stevensbkang
stevensbkang deleted the refactor/ks-68/remove-optimisations branch July 7, 2026 21:18
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.

2 participants