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
Update uplink docs for automatic tunnel Ingress generation
Update the docs page on exposing tunnels on the internet to use the new
controller feature to generate ingress resources for tunnels.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Copy file name to clipboardExpand all lines: docs/uplink/expose-tunnels.md
+38-63
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
Any tunnelled service can be accessed directly from within the cluster using a ClusterIP Service and does not need to be exposed to the public Internet in order to be used by a SaaS product.
8
8
9
-
Each inlets uplink tunnel is provisioned with a ClusterIP service that you can access internally within the cluster. The same service can be used to expose the tunnel to the public Internet using an Ingress resource. This approach is recommended for new users for dozens of tunnels.
9
+
Each inlets uplink tunnel is provisioned with a ClusterIP service that you can access internally within the cluster. The same service can be used to expose the tunnel to the public Internet using an Ingress resource. The uplink operator can be configured to automatically generate ingress resources for tunnels. This approach is recommended for new users for dozens of tunnels.
10
10
11
11
[](/images/uplink/ingress-per-data-plane.png)
12
12
> Each tunnel's data-plane is exposed via a separate Ingress and Certificate
@@ -35,6 +35,8 @@ Both tunnels can be created with `kubectl` using the Custom Resource Definition,
35
35
licenseRef:
36
36
name: inlets-uplink-license
37
37
namespace: tunnels
38
+
ingressDomains:
39
+
- grafana.example.com
38
40
---
39
41
apiVersion: uplink.inlets.dev/v1alpha1
40
42
kind: Tunnel
@@ -45,106 +47,79 @@ Both tunnels can be created with `kubectl` using the Custom Resource Definition,
45
47
licenseRef:
46
48
name: inlets-uplink-license
47
49
namespace: tunnels
50
+
ingressDomains:
51
+
- openfaas.example.com
48
52
EOF
49
53
```
50
54
51
55
=== "cli"
52
56
53
57
```bash
54
-
$ inlets-pro tunnel create grafana
58
+
$ inlets-pro tunnel create grafana \
59
+
--ingress grafana.example.com
55
60
Created tunnel openfaas. OK.
56
61
57
-
$ inlets-pro tunnel create openfaas
62
+
$ inlets-pro tunnel create openfaas \
63
+
--ingress openfaas.example.com
58
64
Created tunnel openfaas. OK.
59
65
```
60
66
61
67
Follow the instruction for Kubernetes Ingress or Istio depending on how you deployed inlets uplink.
We are creating a `ClusterIssuer` that can be used to issue certificates fortunnelsin multiple namespaces. If you don't want to use a cluster wide issuer it is also possible to define an `Issuer` with the same name in each individual tunnel namespace. This requires a lot more configuration and we would recommend to use the `ClusterIssuer` instead.
95
+
96
+
2. Update the Inlets Uplink deployment to enable automatic Ingress resource generation.
97
+
98
+
To enable ingress resource generation for tunnels you will need to update the Uplink deployment. Modify the `values.yaml` file you created during the [initial installation](/uplink/installation/) of Inlets Uplink.
90
99
91
100
```yaml
92
-
apiVersion: networking.k8s.io/v1
93
-
kind: Ingress
94
-
metadata:
95
-
name: grafana-tunnel-ingress
96
-
namespace: tunnels
97
-
annotations:
98
-
kubernetes.io/ingress.class: nginx
99
-
cert-manager.io/issuer: tunnels-letsencrypt-prod
100
-
spec:
101
-
rules:
102
-
- host: grafana.example.com
103
-
http:
104
-
paths:
105
-
- path: /
106
-
pathType: Prefix
107
-
backend:
108
-
service:
109
-
name: grafana
110
-
port:
111
-
number: 8000
112
-
tls:
113
-
- hosts:
114
-
- grafana.example.com
115
-
secretName: grafana-cert
101
+
operator:
102
+
tunnelIngress:
103
+
enabled: true
104
+
class: nginx
105
+
issuer:
106
+
name: letsencrypt-prod-tunnels
107
+
# Change the issuer type to Issuer of you chose to use an
108
+
# issuer per namespace instead of a ClusterIssuer.
109
+
type: ClusterIssuer
116
110
```
117
111
118
-
Note that the annotation `cert-manager.io/issuer` is used to reference the certificate issuer created in the first step.
112
+
Apply the updated values:
119
113
120
-
To setup ingress for multiple tunnels simply define multiple ingress resources. For example, you could create a second ingress resource for the openfaas tunnel:
0 commit comments