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
Copy file name to clipboardExpand all lines: docs/deployment/pro.md
+18
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ queueMode: jetstream
86
86
87
87
nats:
88
88
streamReplication: 1
89
+
authorization:
90
+
enabled: true
89
91
```
90
92
91
93
You can find explanations for each configuration item in the [values-pro.yaml](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/values-pro.yaml) file on GitHub.
The recommended values.yaml file enables NATS authentication. If you are upgrading from OpenFaaS CE or enabling NATS authentication for the first time on an existing installation an authorization token secret should be created.
111
+
112
+
If this is your first time installing OpenFaaS Pro you can ignore this step. The Helm Chart will generate the secret automatically.
113
+
114
+
Create a secret for the NATS authorization token:
115
+
116
+
```sh
117
+
# openssl is preferred to generate a random secret:
Copy file name to clipboardExpand all lines: docs/openfaas-pro/jetstream.md
+33-1
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ To enable JetSteam for OpenFaaS set `jetstream` as the queue mode in the values.
41
41
```yaml
42
42
queueMode: jetstream
43
43
nats:
44
-
streamReplication: 1
44
+
streamReplication: 1
45
45
```
46
46
47
47
If the NATS pod restarts, you will lose all messages that it contains. In your development or staging environment, this shouldn't happen very often.
@@ -58,6 +58,38 @@ nats:
58
58
port: "4222"
59
59
```
60
60
61
+
## NATS Authentication
62
+
63
+
We recommend enabling authentication for NATS to limit the access to the NATS server.
64
+
65
+
To enable authorization for NATS add the following to `nats` section in your values.yaml file.
66
+
67
+
```yaml
68
+
nats:
69
+
authorization:
70
+
enabled: true
71
+
# Generate the NATS authorization token on first installation.
72
+
generateToken: true
73
+
```
74
+
75
+
A Helm Chart `pre-install` hook is used to generate an access token on first installation. If you are upgrading an existing OpenFaaS installation or using an external NATS cluster you will need to create the token secret manually.
76
+
77
+
```sh
78
+
# openssl is preferred to generate a random secret:
79
+
openssl rand -base64 32 > ./nats-token
80
+
81
+
kubectl create secret generic \
82
+
-n openfaas \
83
+
nats-token \
84
+
--from-file token=./nats-token
85
+
```
86
+
87
+
Installations using an external NATS cluster should also set `nats.authorization.generateToken` to `false`. This prevents the Chart from overriding the secret on installation.
88
+
89
+
Use the `nats-token` value to configure the access token through the NATS helm chart if you are running an external NATS cluster.
90
+
91
+
Full instructions for external NATS are available in the [Customer Community](https://github.com/openfaas/customers/).
0 commit comments