Hey all, looking for a sanity check on our approach.
Stack: AWS + Kubernetes. We deploy with plain helm install (no GitOps tool like Argo/Flux).
Current setup: Our Helm values.yaml has hardcoded secrets (env vars) in it. Right now this file lives on our Jenkins server, not in any repo.
The plan: We want to move values.yaml into our Git repo so we can version it properly. The obvious problem — we can’t commit hardcoded secrets in plain text.
Our idea: Use git-crypt to encrypt the file at rest in the repo, so secrets are scrambled on the remote and only unlock for people with the key.
Questions:
Any real-world gotchas we should know before committing to it?
Since we’re already on AWS, would you skip file encryption entirely and go with something like External Secrets Operator + AWS Secrets Manager? Or is that overkill for a small team? Also curious where SOPS (with AWS KMS) or Sealed Secrets fit in.
For context: we’re a small-ish team and just want a clean, low-friction way to keep secrets versioned without leaking them.
The already mentioned AWS Secrets Manager + External Secrets Operator. It’s a good starting point, but you’re not getting “versioned secrets” you asked for. Plus, this combination comes at a price — secret manager charges for every stores secret.
The same External Secrets Operator + AWS Parameter Store — a better combo, because Parameter Store is not prices the same way Secrets Manager is. Plus, it’s sort of easier to use its parameters versioning.
They said they’re using Jenkins, so using GitHub secrets might be possible but I doubt they would want to use GitHub specifically just for secrets management.
The main issue is who will be allowed to decrypt the secrets? All the dev laptops/workstations with the decrypted secrets will be a security issue. What you can do is use existing secrets in your charts and manage them with a separate workflow
Secrets manager key advantages: auto rotation with custom rotation logic, and being able to share them cross account. If you don’t need those, param store 100%
This was the exact reason I added the second item — people often buy Secrets Manager because of, well, the “secrets” part of the name.
However, if we talk about externally managed secrets, e.g. those you cannot rotate yourself, the added benefit of auto-rotation in Secret Manager does not cut it for you. You would most definitely rely on another method to obtain a secret from the issuer, such as logging into a management console or obtaining it from your license procurement department. In this case, an encrypted parameter in Parameter Store is your pick…
If you’re able to programatically rotate the secret — sure, use Secrets Manager. The downside is $0.40/secret/month + $0,05/10K API calls.
I’ve seen folks bundle multiple secrets into a JSON document and store it in the Secrets Manager to save costs, while they never rotated any parts of it automatically; it was always a fully manual process, often very error-prone.
I absolutely love my some SOPS plus there’s a Terraform provider.
The downside of SSM params is how they handle encryption and large JSON blobs. I’ve found it’s easier to to use Secrets Manager as a configuration store whenever possible though that really isn’t possible for K8s.
If they want infrastructure-as-code, you’re just moving the problem.
We also use both AWS and GitHub Secrets, but we don’t want ClicksOps and we require version control, (readily available) auditability, and four-eyes principles, so everything is still in Terraform, including the secrets. And for that we use git-crypt.
Every sane chart I’ve seen just takes a secretRef or something where you point it at an actual K8s secret. And you can handle that with ESO or whatever.
Stay far away from git-crypt. It encrypts the entire file into a binary blob, which turns any merge conflict on values.yaml into unresolvable hell. We lost 6 hours to a corrupted git-crypt merge conflict last year when two devs touched the same staging release. Plus, one missed .gitattributes config and you leak plaintext into git history permanently.
Use SOPS with AWS KMS instead. It encrypts only the values, keeping YAML keys readable for normal diffs.