Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Set LoadBalancer ingress IPMode to prevent kube-proxy from short-circuiting LoadBalancer traffic

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go, kubernetes

調査の方向性

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:

  1. Adds a getIPMode() helper that auto-detects from proxy protocol config or reads an annotation override
  2. Sets IPMode on all LoadBalancerIngress entries in makeLoadBalancerStatus() (all three return paths: hostname-only, IPv6, default)
  3. 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

環境構築

はじめの一歩

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

linode/linode-cloud-controller-manager のほかの issue

linode/linode-cloud-controller-manager の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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