Egress: explicit TCP rules for named in-cluster services (databases, brokers)

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes

調査の方向性

Start with docs/egress-traffic.md and trace the actor TCP egress path through the Envoy dataplane and egress gateway. Identify where hostname and port rules are configured and how destinations are resolved; the issue proposes forwarding raw TCP bytes and limiting destinations to Service IPs or an operator CIDR allowlist. Done means explicit rules support named TCP destinations and ports without inspecting the connection.

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

説明

area/api area/network kind/feature

Use case

We run test workloads as actors. The tests need backing services such as PostgreSQL and a Kafka-compatible broker. docs/egress-traffic.md asks for an issue with the use case for blocked egress traffic, so here it is.

Today actor TCP egress is redirected to atunnel. The egress gateway supports HTTP/1.1, h2c, intercepted HTTPS and TLS passthrough. Any other TCP connection is accepted and then closed with no bytes. A PostgreSQL SSLRequest sent to a cluster Service through the gateway gets an HTTP 400 back.

So these services must run as extra containers inside the actor. Then all containers share one loopback, and ports collide between the services and the code under test. We hit this with two services that both bind the same admin port.

Request

An explicit TCP rule, for example:

rules:
- tcp:
    hostnames: [postgres.my-namespace.svc.cluster.local]
    ports: {numbers: [5432]}
  • The gateway forwards the bytes without inspecting them. It decides once per connection, on the resolved name and port, so server-first protocols (PostgreSQL, MySQL, SSH) work.
  • An operator can limit these rules to destinations that resolve to cluster Service IPs, or to a configured CIDR allowlist.

This differs from #1341: it does not sniff and does not pass unknown traffic through. A port carries TCP only when a rule names that port.

Tested on v0.6.0, Envoy dataplane, GKE 1.36.

主要言語
Go
スター
5.9k
フォーク
637
平均マージ
2日 1時間
マージ済み PR(30日)
523

環境構築

はじめの一歩

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

agent-substrate/substrate のほかの issue

agent-substrate/substrate の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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