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

未关闭
#427 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
go, kubernetes

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Go
星标
60
派生
2
平均合并
6 小时 41 分钟
30 天内合并 PR
67

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/brewlet 的其他 Issue

查看 microsoft/brewlet 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。