[Proposal] Optional host-managed agent mode for clusters that prohibit privileged Pods

Aperta
#427 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes

Direzione di ricerca

This issue requests a design and feasibility assessment and names no implementation files or tests. Start by reading the existing worker DaemonSet, node provisioning, authorization renewal, and ownership fencing paths, then review related issue #426. Done means documenting the mode boundary, node identity and threat model, readiness and lifecycle behavior, supported provisioning environments, and validation needed before implementation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Summary

Add an optional host-managed node agent deployment mode for clusters where Brewlet must not create privileged Pods, while preserving the current Kubernetes-managed worker DaemonSet mode as the default.

This proposal is for a design and feasibility assessment, not an immediate implementation commitment. The existing mode remains available and unchanged unless an administrator explicitly selects the new mode.

Motivation

Brewlet's current node worker and cleanup DaemonSets need privileged host access to install and maintain the runtime integration. Removing only host networking or moving activation into short-lived privileged Jobs would not remove the resident privileged-Pod requirement.

A host-managed mode could avoid Brewlet-created privileged Pods by installing a Brewlet service on each node through its image or bootstrap process. This changes where the node agent runs; it does not eliminate the need for trusted host-level privileges, reduce the node's trust requirements, or guarantee that other cluster components have no privileged Pods.

Proposed direction

  • Keep the current operator-managed worker DaemonSet mode as the default, preserving today's installation and upgrade experience.
  • Explore an opt-in host-managed mode, selectable for a node pool or NodeProfile, where node provisioning installs the Brewlet service and required shim/containerd configuration.
  • Reuse the existing worker reconciliation and node-provisioning behavior where practical. The host service would own runtime installation, authorization renewal, node readiness and startup fences, and cleanup without being launched as a privileged Pod.
  • Have the operator coordinate with and observe the host agent through an explicit, authenticated health/readiness signal rather than assuming a worker Pod or DaemonSet exists.
  • Design node-scoped credentials and authorization before implementation. Preserve the existing UID-bound ownership fences and ensure one node cannot act on behalf of another.
  • Define agent/operator compatibility, upgrades, rollback and cleanup. Autoscaled nodes must receive the agent through the supported image or bootstrap path.
  • Require exactly one node-agent mode per node: a host service and the managed worker must not concurrently reconcile the same node or modify its activation state.

Trade-offs and constraints

  • The host agent is still a resident, privileged process. The benefit is avoiding Brewlet privileged Pods and making Brewlet compatible with restrictive Pod Security policies, not eliminating host-level trust or attack surface.
  • The mode introduces a second installation, lifecycle, troubleshooting and end-to-end test path, plus operator/agent version-skew concerns.
  • Per-node identity and safe revocation are the primary security design challenge.
  • Users need a supported way to prepare and upgrade nodes, including autoscaled nodes; clusters that cannot customize their node image or bootstrap may not be able to use this mode.
  • The current five-minute authorization expiry requires a continuously running renewer; the host agent must preserve this behavior or replace it with an explicitly designed alternative.

Design questions to resolve

  1. What is the source and lifecycle of a node-scoped credential, and how is it bound to the Kubernetes Node and Brewlet profile?
  2. How does the operator discover, authenticate and fence the host agent, including during node replacement, profile changes and uninstall?
  3. Which responsibilities are shared with the existing worker, and which require a separate host launcher or packaging layer?
  4. How are agent versions delivered and kept compatible with the operator and shim across rolling and autoscaled node pools?
  5. What are the supported rollback and cleanup semantics if node preparation or a rollout fails partway through?
  6. Which platforms and containerd configurations are in scope for the first supported version?

Proposed completion criteria for the design

  • Document the mode boundary and administrator-facing opt-in, with the current managed mode remaining the default.
  • Provide a threat model and concrete node-identity/credential design, including revocation and failure handling.
  • Specify readiness, ownership fencing, upgrade, rollback, cleanup and autoscaling behavior.
  • Identify supported node provisioning environments and the end-to-end validation needed before implementation.
  • Clearly state that this mode removes Brewlet's privileged-Pod requirement, not privileged host execution or privileges used by unrelated cluster components.

Related: #426 tracks removing hostNetwork from the existing worker separately; that change is useful but does not by itself provide a no-privileged-Pods mode.

Lingua principale
Go
Stelle
60
Fork
2
Merge medio
6h 41m
PR unite (30g)
67

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/brewlet

Tutte le issue di microsoft/brewlet

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.