@@ -6,23 +6,25 @@ Coil is a Kubernetes-native application and can be controlled with `kubectl`.
66
77For installation, read [ setup.md] ( setup.md ) .
88
9- -  [ Admin role] ( #admin-role ) 
10- -  [ Address pools] ( #address-pools ) 
11-   -  [ AddressPool custom resource] ( #addresspool-custom-resource ) 
12-   -  [ The default pool] ( #the-default-pool ) 
13-   -  [ Using non-default pools] ( #using-non-default-pools ) 
14-   -  [ Adding addresses to a pool] ( #adding-addresses-to-a-pool ) 
15- -  [ Address blocks] ( #address-blocks ) 
16-   -  [ Importing address blocks as routes] ( #importing-address-blocks-as-routes ) 
17- -  [ Egress NAT] ( #egress-nat ) 
18-   -  [ How it works] ( #how-it-works ) 
19-   -  [ Egress custom resource] ( #egress-custom-resource ) 
20-   -  [ Client Pods] ( #client-pods ) 
21-   -  [ Use NetworkPolicy to prohibit NAT usage] ( #use-networkpolicy-to-prohibit-nat-usage ) 
22-   -  [ Session affinity] ( #session-affinity ) 
23- -  [ Metrics] ( #metrics ) 
24-   -  [ How to scrape metrics] ( #how-to-scrape-metrics ) 
25-   -  [ Dashboards] ( #dashboards ) 
9+ -  [ User manual] ( #user-manual ) 
10+   -  [ Admin role] ( #admin-role ) 
11+   -  [ Address pools] ( #address-pools ) 
12+     -  [ AddressPool custom resource] ( #addresspool-custom-resource ) 
13+     -  [ The default pool] ( #the-default-pool ) 
14+     -  [ Using non-default pools] ( #using-non-default-pools ) 
15+     -  [ Adding addresses to a pool] ( #adding-addresses-to-a-pool ) 
16+   -  [ Address blocks] ( #address-blocks ) 
17+     -  [ Importing address blocks as routes] ( #importing-address-blocks-as-routes ) 
18+   -  [ Egress NAT] ( #egress-nat ) 
19+     -  [ How it works] ( #how-it-works ) 
20+     -  [ Egress custom resource] ( #egress-custom-resource ) 
21+     -  [ Client Pods] ( #client-pods ) 
22+     -  [ Use NetworkPolicy to prohibit NAT usage] ( #use-networkpolicy-to-prohibit-nat-usage ) 
23+     -  [ Session affinity] ( #session-affinity ) 
24+     -  [ Use egress only for connections originating on the client] ( #use-egress-only-for-connections-originating-on-the-client ) 
25+   -  [ Metrics] ( #metrics ) 
26+     -  [ How to scrape metrics] ( #how-to-scrape-metrics ) 
27+     -  [ Dashboards] ( #dashboards ) 
2628
2729## Admin role  
2830
@@ -201,6 +203,7 @@ spec:
201203  destinations: 
202204  - 172.20.0.0/16 
203205  - fd04::/64 
206+   originatingOnly: true 
204207  replicas: 3 
205208  strategy: 
206209    type: RollingUpdate 
@@ -242,6 +245,7 @@ You may customize the container of egress Pods as shown in the above example.
242245| Field                   | Type                      | Description                                                          | 
243246| ----------------------- | ------------------------- | -------------------------------------------------------------------- | 
244247| `destinations`          | `[]string`                | IP subnets where the packets are SNATed and sent.                    | 
248+ | `originatingOnly`       | `bool`                    | If true, only connections originating in the pod will use egress.    | 
245249| `replicas`              | `int`                     | Copied to Deployment's `spec.replicas`.  Default is 1.               | 
246250| `strategy`              | [DeploymentStrategy][]    | Copied to Deployment's `spec.strategy`.                              | 
247251| `template`              | [PodTemplateSpec][]       | Copied to Deployment's `spec.template`.                              | 
@@ -312,6 +316,17 @@ spec:
312316
313317The default timeout seconds is 10800 (= 3 hours). 
314318
319+ # ## Use egress only for connections originating on the client
320+ 
321+ If `originatingOnly` is set `true` in the egress definition, only connections originating on the client  
322+ or incoming onto `fou` interface will use egress FOU interface to send data.  
323+ In case of incomming connections, the same interface will be used for egress traffic -  
324+ e.g. if connection will be estabilished on `eth0`, the traffic will not be routed through `fou`, 
325+ but will be handled by `eth0`. 
326+ 
327+ Please be aware that, in case of multiple `egress` resources attached to the client pod, if at least one 
328+ `egress` will have `originatingOnly : true` set, all the other egresses will inherit this behavior. 
329+ 
315330# # Metrics
316331
317332Coil exposes two types of Prometheus metrics. 
0 commit comments