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/reference/secrets.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,54 @@ For Kubernetes, secrets are stored [within the built-in secrets store](https://k
27
27
28
28
For faasd, secrets are created as plaintext files under `/var/lib/faasd-provider/secrets`. When you deploy a function, these secrets are bind-mounted into your container.
29
29
30
+
## Secrets with multiple keys or files
31
+
32
+
Let's explore an example where you have a function which needs to connect to two different databases. You will have two different connection strings, one for MongoDB and one for Postgresql as separate files under `/var/openfaas/secrets`:
33
+
34
+
*`/var/openfaas/secrets/mongo-connection.txt`
35
+
*`/var/openfaas/secrets/postgres-connection.txt`
36
+
37
+
When using `faas-cli` to create and manage secrets, you can only have one file or literal within each Kubernetes secret, so you'll create two secrets with different names:
0 commit comments