Skip to content

Commit ca8be13

Browse files
committed
Document secret mount path caveat
1 parent 243202d commit ca8be13

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ After you've written your function, you can simply deploy it from your local
165165
machine using the `gcloud` command-line tool.
166166
[Check out the Cloud Functions quickstart](https://cloud.google.com/functions/docs/quickstart).
167167
168+
When mounting Secret Manager secrets with `gcloud functions deploy --set-secrets`,
169+
do not mount a secret over `/workspace`. Cloud Run functions load the deployed
170+
function source from `/workspace`, so mounting a secret there can hide the
171+
application files and prevent the function from starting. Mount secret files
172+
under a different path, such as `/etc/secrets` or `/tmp`.
173+
168174
### Container environments based on Knative
169175
170176
Cloud Run and Cloud Run for Anthos both implement the [Knative Serving API](https://www.knative.dev/docs/). The Functions Framework is designed to be compatible with Knative environments. Just build and deploy your container to a Knative environment.

0 commit comments

Comments
 (0)