Skip to content

Commit 71303d2

Browse files
vadimeisenbergibmrshriram
authored andcommitted
added documentation about TCP Egress Rules, CIDR notation (#346)
1 parent 740b653 commit 71303d2

File tree

3 files changed

+85
-21
lines changed

3 files changed

+85
-21
lines changed

routing/v1alpha1/egress_rule.pb.go

Lines changed: 28 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

routing/v1alpha1/egress_rule.proto

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ package istio.routing.v1alpha1;
2121
option go_package = "istio.io/api/routing/v1alpha1";
2222

2323
// Egress rules describe the properties of a service outside Istio. When transparent proxying
24-
// is used, egress rules signify a white listed set of domains that microserves in the mesh
24+
// is used, egress rules signify a white listed set of external services that microserves in the mesh
2525
// are allowed to access. A subset of routing rules and all destination policies can be applied
26-
// on the service targeted by an egress rule. The destination of an egress rule is allowed to
27-
// contain wildcards (e.g., *.foo.com). Currently, only HTTP-based services can be expressed
28-
// through the egress rule. If TLS origination from the sidecar is desired, the protocol
26+
// on the service targeted by an egress rule. TCP services and HTTP-based services can be expressed
27+
// by an egress rule. The destination of an egress rule for HTTP-based services must be an IP or a domain name,
28+
// optionally with a wildcard prefix (e.g., *.foo.com). For TCP based services, the destination of an
29+
// egress rule must be an IP or a block of IPs in CIDR notation.
30+
//
31+
// If TLS origination from the sidecar is desired, the protocol
2932
// associated with the service port must be marked as HTTPS, and the service is expected to
3033
// be accessed over HTTP (e.g., http://gmail.com:443). The sidecar will automatically upgrade
3134
// the connection to TLS when initiating a connection with the external service.
@@ -44,6 +47,18 @@ option go_package = "istio.io/api/routing/v1alpha1";
4447
// - port: 443
4548
// protocol: https
4649
//
50+
// The following egress rule describes the set of services accessed by a block of IPs
51+
//
52+
// kind: EgressRule
53+
// metadata:
54+
// name: bar-egress-rule
55+
// spec:
56+
// destination:
57+
// service: 92.198.174.192/27
58+
// ports:
59+
// - port: 111
60+
// protocol: tcp
61+
//
4762
message EgressRule {
4863
// Port describes the properties of a specific TCP port of an external service.
4964
message Port {
@@ -54,14 +69,20 @@ message EgressRule {
5469
string protocol = 2;
5570
}
5671

57-
// REQUIRED: Hostname or a wildcard domain name associated with the external service.
58-
// ONLY the "service" field of destination will be taken into consideration. Name,
72+
// REQUIRED: A domain name, optionally with a wildcard prefix, or an IP, or a block of IPs
73+
// associated with the external service.
74+
// ONLY the "service" field of "destination" will be taken into consideration. Name,
5975
// namespace, domain and labels are ignored. Routing rules and destination policies that
6076
// refer to these external services must have identical specification for the destination
61-
// as the corresponding egress rule. Wildcard domain specifications must conform to format
77+
// as the corresponding egress rule.
78+
//
79+
// The "service" field of "destination" for HTTP-based services must be an IP or a domain name,
80+
// optionally with a wildcard prefix. Wildcard domain specifications must conform to format
6281
// allowed by Envoy's Virtual Host specification, such as “*.foo.com” or “*-bar.foo.com”.
6382
// The character '*' in a domain specification indicates a non-empty string. Hence, a wildcard
6483
// domain of form “*-bar.foo.com” will match “baz-bar.foo.com” but not “-bar.foo.com”.
84+
//
85+
// The "service" field of "destination" for TCP services must be an IP or a block of IPs in CIDR notation.
6586
IstioService destination = 1;
6687

6788
// REQUIRED: list of ports on which the external service is available.

routing/v1alpha1/istio.routing.v1alpha1.pb.html

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,14 @@ <h2 id="DestinationWeight">DestinationWeight</h2>
483483
<h2 id="EgressRule">EgressRule</h2>
484484
<section>
485485
<p>Egress rules describe the properties of a service outside Istio. When transparent proxying
486-
is used, egress rules signify a white listed set of domains that microserves in the mesh
486+
is used, egress rules signify a white listed set of external services that microserves in the mesh
487487
are allowed to access. A subset of routing rules and all destination policies can be applied
488-
on the service targeted by an egress rule. The destination of an egress rule is allowed to
489-
contain wildcards (e.g., *.foo.com). Currently, only HTTP-based services can be expressed
490-
through the egress rule. If TLS origination from the sidecar is desired, the protocol
488+
on the service targeted by an egress rule. TCP services and HTTP-based services can be expressed
489+
by an egress rule. The destination of an egress rule for HTTP-based services must be an IP or a domain name,
490+
optionally with a wildcard prefix (e.g., *.foo.com). For TCP based services, the destination of an
491+
egress rule must be an IP or a block of IPs in CIDR notation.</p>
492+
493+
<p>If TLS origination from the sidecar is desired, the protocol
491494
associated with the service port must be marked as HTTPS, and the service is expected to
492495
be accessed over HTTP (e.g., http://gmail.com:443). The sidecar will automatically upgrade
493496
the connection to TLS when initiating a connection with the external service.</p>
@@ -507,6 +510,19 @@ <h2 id="EgressRule">EgressRule</h2>
507510
protocol: https
508511
</code></pre>
509512

513+
<p>The following egress rule describes the set of services accessed by a block of IPs</p>
514+
515+
<pre><code>kind: EgressRule
516+
metadata:
517+
name: bar-egress-rule
518+
spec:
519+
destination:
520+
service: 92.198.174.192/27
521+
ports:
522+
- port: 111
523+
protocol: tcp
524+
</code></pre>
525+
510526
<table class="message-fields">
511527
<thead>
512528
<tr>
@@ -520,15 +536,21 @@ <h2 id="EgressRule">EgressRule</h2>
520536
<td><code>destination</code></td>
521537
<td><code><a href="#IstioService">IstioService</a></code></td>
522538
<td>
523-
<p>REQUIRED: Hostname or a wildcard domain name associated with the external service.
524-
ONLY the &ldquo;service&rdquo; field of destination will be taken into consideration. Name,
539+
<p>REQUIRED: A domain name, optionally with a wildcard prefix, or an IP, or a block of IPs
540+
associated with the external service.
541+
ONLY the &ldquo;service&rdquo; field of &ldquo;destination&rdquo; will be taken into consideration. Name,
525542
namespace, domain and labels are ignored. Routing rules and destination policies that
526543
refer to these external services must have identical specification for the destination
527-
as the corresponding egress rule. Wildcard domain specifications must conform to format
544+
as the corresponding egress rule.</p>
545+
546+
<p>The &ldquo;service&rdquo; field of &ldquo;destination&rdquo; for HTTP-based services must be an IP or a domain name,
547+
optionally with a wildcard prefix. Wildcard domain specifications must conform to format
528548
allowed by Envoy&rsquo;s Virtual Host specification, such as “<em>.foo.com” or “</em>-bar.foo.com”.
529549
The character &lsquo;<em>&rsquo; in a domain specification indicates a non-empty string. Hence, a wildcard
530550
domain of form “</em>-bar.foo.com” will match “baz-bar.foo.com” but not “-bar.foo.com”.</p>
531551

552+
<p>The &ldquo;service&rdquo; field of &ldquo;destination&rdquo; for TCP services must be an IP or a block of IPs in CIDR notation.</p>
553+
532554
</td>
533555
</tr>
534556
<tr id="EgressRule.ports">

0 commit comments

Comments
 (0)