4 ms·
Config also benefits from review and version control, and it's inconvenient to use multiple systems for these. It's been working out well for us to store secret
by pushrax 7y ago
Config also benefits from review and version control, and it's inconvenient to use multiple systems for these. It's been working out well for us to store secrets encrypted with public key crypto alongside source, or in a deployment repository using the same source control. The private key is inserted into the infrastructure as a K8s secret.
- thomascgalvin 7y agoOne of the concepts twelve factor pushes is that you should be able to release your source code right now without compromising any credentials. Basically, you'd have a git repo for code, and a separate git repo for environment scripts. I've seen organizations use a whole separate infrastructure for config, but that always seemed like overkill to me.
- pushrax 7y agoThis is true with encrypted credentials, if security is compromised by release of the repo then the encryption is not secure. I think the spirit of the principle is met, and in cases where you do later release the source code without having planned for it, it's easy enough to move the secrets. It's definitely more convenient to use the same repo, especially in the declarative containerized world; you can make sweeping changes or roll them back in a single atomic commit. That said, if open source is the intent, certainly use multiple repos from the beginning so you avoid git gardening when releasing later.