AMDEPYC / AMDEPYC/kubernetes-power-manager
Changing the cluster topology doesn't cause PowerConfig to be reconciled again
- 主要言語
- Go
- スター
- 5
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Changes in the cluster topology like listed below doesn't cause PowerConfig to be reconciled again:
1. Adding Nodes to the cluster.
2. Removing Nodes from the cluster.
3. Adding labels to Nodes so that they match the node selector in the PowerConfig.
4. Removing labels from Nodes so that they no longer match the node selector in the PowerConfig.
In turn, cluster-wide state is not reconciled correctly; for example, PowerNode is not immediately created for a newly added Node.
### Steps to reproduce
1. Remove the `feature.node.kubernetes.io/power-node` label from the Node so that it no longer matches the PowerConfig's node selector.
### Expected result
1. Node Agent Pod for the Node is removed.
2. PowerNode, PowerWorkload, and other node-scoped resources managed by Kubernetes Power Manager are immediately deleted.
### Actual result
1. Node Agent Pod for the Node is removed.
2. PowerNode, PowerWorkload, and other node-scoped resources managed by Kubernetes Power Manager are only deleted after restarting the Power Operator or on next scheduled reconciliation.
### Root cause
PowerConfig controller doesn't watch Nodes.
### Proposed solution
Add watch for Nodes to PowerConfig controller in `SetupWithManager()`.
https://github.com/AMDEPYC/kubernetes-power-manager/blob/790697dbbc1c28c5e1866556bef1b2b7232b9bfa/internal/controller/powerconfig_controller.go#L386-L390
Any change to these resources should enqueue reconciliation of the PowerConfig resource (if one exists) using [`EnqueueRequestsFromMapFunc()`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/handler#EnqueueRequestsFromMapFunc).
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。