Skip to content

Commit 7991c13

Browse files
weltekialexellis
authored andcommitted
Document shared ingress support for client-api
- Update rest-api.md to show the new default behavior where the client-api is exposed on the client-router domain under /v1 - Add clientApi.domain to the configuration reference table - Update API examples to use uplink.example.com as the domain Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent 0501d44 commit 7991c13

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

docs/uplink/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ Overview of inlets-uplink parameters in `values.yaml`.
335335
| `tunnelsNamespace` | Deployments, Services and Secrets will be created in this namespace. Leave blank for a cluster-wide scope, with tunnels in multiple namespaces. | `""` |
336336
| `inletsVersion` | Inlets Pro release version for tunnel server Pods. | `0.9.12` |
337337
| `clientApi.enabled` | Enable tunnel management REST API. | `false` |
338+
| `clientApi.domain` | Domain for a dedicated client API ingress. If left empty and ingress is enabled, the API is exposed on the client-router's domain under the `/v1` path prefix. | `""` |
338339
| `clientApi.image` | Container image used for the client API. | `ghcr.io/openfaasltd/uplink-api:0.1.5` |
339340
| `prometheus.create` | Create the Prometheus monitoring component. | `true` |
340341
| `prometheus.resources` | Resource limits and requests for prometheus containers. | `{}` |

docs/uplink/rest-api.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,29 @@ Add the following parameters to your uplink `values.yaml` file and update the de
3333
clientApi:
3434
enable: true
3535

36-
# Domain used for client API ingress
36+
tls:
37+
ingress:
38+
enabled: true
39+
```
40+
41+
By default, the client-api will be exposed on the same domain as the client-router under the `/v1` path prefix. For example, if your client-router domain is `uplink.example.com`, the API will be available at `https://uplink.example.com/v1`.
42+
43+
If you prefer to use a separate domain for the client-api, set the `clientApi.domain` field:
44+
45+
```yaml
46+
clientApi:
47+
enable: true
48+
49+
# Use a dedicated domain for the client API
3750
domain: clientapi.example.com
3851
3952
tls:
4053
ingress:
41-
# Optionally enable ingress for the Client API
4254
enabled: true
4355
```
4456

57+
When a dedicated domain is set, a separate Ingress resource is created for the client-api.
58+
4559
## Authentication
4660

4761
The Inlets Uplink client API supports authentication through a static API token or using OAuth.
@@ -80,7 +94,7 @@ curl -S -L -X POST "${IDP_TOKEN_URL}" \
8094
Use the token as bearer token in the `Authorization` header when making requests to the API.
8195

8296
```sh
83-
export CLIENT_API="https://clienapi.example.com"
97+
export CLIENT_API="https://uplink.example.com"
8498
export NAME="acmeco"
8599
export NAMESPACE="acmeco"
86100
@@ -96,7 +110,7 @@ We will be create an tunnel named `acmeco` in the `acmeco` namespace in the API
96110
### Get a tunnel
97111

98112
```sh
99-
export CLIENT_API="https://clienapi.example.com"
113+
export CLIENT_API="https://uplink.example.com"
100114
export NAME="acmeco"
101115
export NAMESPACE="acmeco"
102116
@@ -139,7 +153,7 @@ The metrics section includes rx/tx bytes per second and tcp connection rate over
139153
### List tunnels
140154

141155
```sh
142-
export CLIENT_API="https://clienapi.example.com"
156+
export CLIENT_API="https://uplink.example.com"
143157
export NAMESPACE="acmeco"
144158
145159
curl -i \
@@ -154,7 +168,7 @@ Query parameters:
154168
### Create a tunnel
155169

156170
```sh
157-
export CLIENT_API="https://clienapi.example.com"
171+
export CLIENT_API="https://uplink.example.com"
158172
159173
curl -i \
160174
-X POST \
@@ -166,7 +180,7 @@ curl -i \
166180
### Update a tunnel
167181

168182
```sh
169-
export CLIENT_API="https://clienapi.example.com"
183+
export CLIENT_API="https://uplink.example.com"
170184
171185
curl -i \
172186
-X PUT \
@@ -178,7 +192,7 @@ curl -i \
178192
### Delete a tunnel
179193

180194
```sh
181-
export CLIENT_API="https://clienapi.example.com"
195+
export CLIENT_API="https://uplink.example.com"
182196
export NAME="acmeco"
183197
export NAMESPACE="acmeco"
184198
@@ -206,7 +220,7 @@ The `kube-system` and `inlets` namespace can not be used as tunnel namespaces.
206220
List all inlets uplink namespaces. This endpoint will list all namespaces with a label `inlets.dev/uplink=1`.
207221

208222
```sh
209-
export CLIENT_API="https://clienapi.example.com"
223+
export CLIENT_API="https://uplink.example.com"
210224
211225
curl -i \
212226
-H "Authorization: Bearer ${TOKEN}" \
@@ -216,7 +230,7 @@ curl -i \
216230
### Create a namespace
217231

218232
```sh
219-
export CLIENT_API="https://clienapi.example.com"
233+
export CLIENT_API="https://uplink.example.com"
220234
221235
curl -i \
222236
-X POST \
@@ -244,7 +258,7 @@ The API supports adding additional namespace labels and annotations:
244258
### Delete a namespace
245259

246260
```sh
247-
export CLIENT_API="https://clienapi.example.com"
261+
export CLIENT_API="https://uplink.example.com"
248262
export NAME="acmeco"
249263
250264
curl -i \
@@ -271,7 +285,7 @@ You can configure any OpenID Connect (OIDC) compatible identity provider for use
271285
272286
# The audience is generally the same as the value of the domain field, however
273287
# some issuers like keycloak make the audience the client_id of the application/client.
274-
audience: "clienapi.example.com"
288+
audience: "uplink.example.com"
275289
```
276290

277291
The `issuerURL` needs to be set to the url of your provider, eg. `https://accounts.google.com` for google or `https://example.eu.auth0.com/` for Auth0.

0 commit comments

Comments
 (0)