Privileged ServiceAccounts without rackAwarness enabled

オープン
#851 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
kubernetes, rust
領域
backend, security

調査の方向性

Start with hdfs_clusterrolebinding_nodes_controller.rs, where HdfsCluster ServiceAccounts are added to hdfs-clusterrolebinding-nodes, and review the spec.clusterConfig.rackAwareness checks used around core_site.rs. Update the reflector to watch full HdfsCluster objects with DeserializeGuard so invalid clusters do not block reconciliation. The change is done when only rack-awareness-enabled clusters appear as subjects, while existing bindings and unrelated cluster reconciliation remain correct; run the repository's relevant Rust tests if present.

索引モデルが issue の本文から書いたものです。

説明

type/bug
Affected Stackable version

25.7.0, 25.11.0, 26.3.0 and 26.7.0

Affected Apache HDFS version

all

Current and expected behavior

Current

hdfs-operator maintains a single ClusterRoleBinding hdfs-clusterrolebinding-nodes to the ClusterRole hdfs-clusterrole-nodes, which grants cluster-wide get/list/watch on pods, nodes and endpoints (plus listeners and CRDs). It exists for the rack awareness topology provider.

The operator adds the ServiceAccount of every HdfsCluster as a subject, whether or not rackAwareness is set. The topology provider is only configured when rackAwareness is set (core_site.rs), so clusters without it get these rights without using them.

Expected

A HdfsCluster's ServiceAccount is only a subject of hdfs-clusterrolebinding-nodes when that cluster sets rackAwareness.

Fix

In hdfs_clusterrolebinding_nodes_controller.rs, only add clusters with spec.clusterConfig.rackAwareness set. The reflector currently watches PartialObjectMeta (no spec), so it needs to watch full objects, using DeserializeGuard so one broken HdfsCluster doesn't block the binding for all of them.

Out of scope: the ServiceAccount is shared by all roles, but only the NameNode runs the topology provider.

Possible solution

No response

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

No response

主要言語
Rust
スター
53
フォーク
10
平均マージ
21時間 32分
マージ済み PR(30日)
10

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stackabletech/hdfs-operator のほかの issue

stackabletech/hdfs-operator の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。