You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for configuring proxy protocol on inlets tunnel servers
provisioned by the operator. When enabled, the tunnel server is started
with the --proxy-proto flag so that the original client IP address is
preserved and forwarded to upstream services.
The proxy protocol can be set per-service using the
operator.inlets.dev/proxy-proto annotation.
Configuration options:
- Annotation: operator.inlets.dev/proxy-proto (per-service)
Note: CRD has been updated with a new field.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,18 @@ Install the chart with `annotatedOnly: true`, then run:
63
63
kubectl annotate service nginx-1 operator.inlets.dev/manage=1
64
64
```
65
65
66
+
## Proxy Protocol support
67
+
68
+
Proxy protocol can be enabled on tunnel exit servers so that the original client IP address is preserved and forwarded to your services. This is controlled by an annotation.
69
+
70
+
Allowed values are `v1`, `v2`, or `""` (disabled).
71
+
72
+
```bash
73
+
kubectl annotate service nginx-1 operator.inlets.dev/proxy-proto=v2
74
+
```
75
+
76
+
> **Important**: The proxy protocol configuration is applied when the tunnel exit server VM is provisioned and **cannot be changed afterwards**. If you need to change the proxy protocol setting for an existing service, you must delete the service (which will delete the tunnel and VM), then recreate it with the new annotation.
77
+
66
78
## Using IPVS for your Kubernetes networking?
67
79
68
80
For IPVS, you need to declare a Tunnel Custom Resource instead of using the LoadBalancer field.
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
52
+
description: |-
53
+
APIVersion defines the versioned schema of this representation of an object.
54
+
Servers should convert recognized schemas to the latest internal value, and
55
+
may reject unrecognized values.
56
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
54
57
type: string
55
58
kind:
56
-
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
59
+
description: |-
60
+
Kind is a string value representing the REST resource this object represents.
61
+
Servers may infer this from the endpoint the client submits requests to.
62
+
Cannot be updated.
63
+
In CamelCase.
64
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
57
65
type: string
58
66
metadata:
59
67
type: object
@@ -71,14 +79,23 @@ spec:
71
79
type: string
72
80
nullable: true
73
81
licenseRef:
74
-
description: LicenseRef is the secret used to load the inlets-client license, and is the same for each tunnel within the cluster
82
+
description: |-
83
+
LicenseRef is the secret used to load the inlets-client
84
+
license, and is the same for each tunnel within the cluster
75
85
type: object
76
86
properties:
77
87
name:
78
88
type: string
79
89
namespace:
80
90
type: string
81
91
nullable: true
92
+
proxyProto:
93
+
description: |-
94
+
ProxyProto when set, is passed onto the tunnel server
95
+
in order to have it send the original source IP.
96
+
Note: any upstream must be able to read the Proxy Protocol header
97
+
type: string
98
+
nullable: true
82
99
serviceRef:
83
100
description: ServiceRef is the internal service to tunnel to the remote host
84
101
type: object
@@ -112,7 +129,9 @@ spec:
112
129
type: string
113
130
nullable: true
114
131
generated:
115
-
description: Generated is set to true when the tunnel is created by the operator and false when a user creates the Tunnel via YAML
132
+
description: |-
133
+
Generated is set to true when the tunnel is created by the operator and false
flag.StringVar(&infra.VpcID, "vpc-id", "", "The VPC ID to create the exit-server in (ec2)")
58
58
flag.StringVar(&infra.SubnetID, "subnet-id", "", "The Subnet ID where the exit-server should be placed (ec2)")
59
59
flag.StringVar(&infra.ProjectID, "project-id", "", "The project ID if using equinix-metal, or gce as the provider")
60
-
flag.StringVar(&infra.ProConfig.License, "license", "", "Supply a license for use with inlets-pro")
61
-
flag.StringVar(&infra.ProConfig.LicenseFile, "license-file", "", "Supply a file to read for the inlets-pro license")
62
-
flag.StringVar(&infra.ProConfig.ClientImage, "client-image", "ghcr.io/inlets/inlets-pro:"+defaultRelease, "Container image for inlets tunnel clients run in the cluster")
63
-
flag.StringVar(&infra.ProConfig.InletsRelease, "inlets-release", defaultRelease, "Inlets version to use to create tunnel servers")
60
+
flag.StringVar(&infra.TunnelConfig.License, "license", "", "Supply a license for use with inlets-pro")
61
+
flag.StringVar(&infra.TunnelConfig.LicenseFile, "license-file", "", "Supply a file to read for the inlets-pro license")
62
+
flag.StringVar(&infra.TunnelConfig.ClientImage, "client-image", "ghcr.io/inlets/inlets-pro:"+defaultRelease, "Container image for inlets tunnel clients run in the cluster")
63
+
flag.StringVar(&infra.TunnelConfig.InletsRelease, "inlets-release", defaultRelease, "Inlets version to use to create tunnel servers")
64
64
65
65
flag.StringVar(&infra.MaxClientMemory, "max-client-memory", "128Mi", "Maximum memory limit for the tunnel clients")
0 commit comments