Set LoadBalancer ingress IPMode to prevent kube-proxy from short-circuiting LoadBalancer traffic
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- go, kubernetes
- 領域
- cloud, infrastructure
調査の方向性
makeLoadBalancerStatus() から始め、参照されている実装の getIPMode() ヘルパー、proxy protocol の設定、および annotation の処理を調査してください。リンクされた commit と、その tests および documentation を確認してください。完了の条件は、manual override behavior を含め、すべての LoadBalancerIngress return paths で Proxy または VIP が正しく設定されることです。
索引モデルが issue の本文から書いたものです。
説明
Problem
The CCM does not set the ipMode field on LoadBalancerIngress entries. Without this, kube-proxy binds the LoadBalancer IP to every node and intercepts traffic destined for it, bypassing the NodeBalancer entirely for
cluster-internal requests.
This causes a well-known class of failures when proxy protocol is enabled on the NodeBalancer: internal traffic (e.g. cert-manager HTTP01 validation, in-cluster requests to LoadBalancer IPs) reaches the ingress controller
without the expected PROXY protocol header, resulting in broken header errors and failed requests.
See: cert-manager/cert-manager#466
The current workaround is deploying hairpin-proxy, which intercepts DNS and injects PROXY protocol headers for internal traffic. This shouldn't be necessary.
Solution
KEP-1860 added an ipMode field to LoadBalancerIngress with two values:
VIP: kube-proxy binds the LB IP to nodes (current default behavior)Proxy: kube-proxy does not intercept LB traffic, forcing it through the actual LoadBalancer
The CCM should set this field based on proxy protocol configuration. When all ports on a service use proxy protocol, ipMode should be Proxy so that kube-proxy doesn't short-circuit traffic around the NodeBalancer.
Otherwise it should be VIP.
A manual override annotation (service.beta.kubernetes.io/linode-loadbalancer-ip-mode) would also be useful for edge cases.
Reference implementation
I've put together an implementation in this commit that:
- Adds a
getIPMode()helper that auto-detects from proxy protocol config or reads an annotation override - Sets
IPModeon allLoadBalancerIngressentries inmakeLoadBalancerStatus()(all three return paths: hostname-only, IPv6, default) - Includes tests and documentation
The Kubernetes API types (LoadBalancerIPModeVIP, LoadBalancerIPModeProxy) are already available in the k8s.io/api version used by this project.
- 主要言語
- Go
- スター
- 94
- フォーク
- 75
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linode/linode-cloud-controller-manager のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
linode/linode-cloud-controller-manager#543 ·
メンテナーはふだん 1 日以内に返信
-
Dependency Dashboardオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
linode/linode-cloud-controller-manager#474 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
linode/linode-cloud-controller-manager#399 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
linode/linode-cloud-controller-manager#392 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
linode/linode-cloud-controller-manager#252 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
linode/linode-cloud-controller-manager の issue をすべて見る
似ている issue
-
documentation help wanted needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
hivecommons/hive#11606 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
gravitational/teleport#69869 ·
-
category:agent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
LanternOps/breeze#8493 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
shaiknoorullah/hg-mono#815 ·
メンテナーはふだん 1 日以内に返信