The helm secrets command acts as a wrapper for standard Helm commands (e.g., install, upgrade, rollback, diff). When you use the wrapper, any files passed via the -f or --values flags that are encrypted will be decrypted on-the-fly before the Helm command executes.
Key Behaviors:
- Automatic Cleanup: Decrypted temporary files (suffixed with
.dec by default) are automatically removed after the Helm command finishes, even if the command fails. - Optimization: If a decrypted file (e.g.,
secrets.yaml.dec) already exists and is newer than the encrypted secrets.yaml, the wrapper will use the existing .dec file instead of re-decrypting. - Compatibility: Works with
helm-diff by calling helm secrets diff ....
AWS_PROFILE=sandbox helm secrets upgrade \
helloworld \
stable/java-app \
--install \
--timeout 600 \
--wait \
--kube-context=sandbox \
--namespace=projectx \
-f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml \
-f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/values.yaml