I'm also using the secrets feature but it's very brittle. If your swarm gets destroyed or you want to migrate servers, it's a huge pain to get those secrets back up and running. Unless I'm missing a better way to do this, I'd love to know!
I currently have my secrets stored in an encrypted text file in case I need to bring them back up.
Re:Google Cloud’s Secrets Manager
by notduncansmith on Monday January 27, 2020 @01:55AM
(#22157332)
I do something similar, using Ansible Vault (not to be confused with Hashicorp Vault!) to store the encrypted secrets in my ops directory (separate from the application source code). They’re stored as YAML so very easy to upload/regenerate with Ansible.
Also, I haven’t needed to integrate something like Vault because the Swarm secrets feature covers my use case perfectly.