faas-cli store deploy cows --secret "cows_test" --secret "another_secret" --gateway http://{gateway}:8080
The secrets are then present in the container:
sudo docker exec -it cows-{uuid} ls /var/openfaas/secrets
another_secret cows_test
This makes it so that secrets are defined the same way in .yml or faas-cli regardless if openfaas is running on K8s, Swarm or Nomad. However, it is expected that the secrets be stored in this format in Vault: secret/openfaas/{function}.
Hi @nicholasjackson, I wanted to iterate on the work you started for secrets, so here it is:
Example Vault secret curl:
Example faas-cli:
The secrets are then present in the container:
This makes it so that secrets are defined the same way in .yml or faas-cli regardless if openfaas is running on K8s, Swarm or Nomad. However, it is expected that the secrets be stored in this format in Vault: secret/openfaas/{function}.