Support configuration of spiffe-helper via environment variables
When using spiffe-helper as a sidecar container, configuring it via environment variables provides greater flexibility and simplifies deployment.
The preliminary consensuated solution is to use the cleanenv library with support for JSON+YAML configuration formats.
To maintain backward compatibility:
--configshould be added for the new configuration format.--legacy-configshould be used for HCL legacy configuration.
Behavior:
- When using --config, environment variables should override configurations in the new configuration files.
- When using --legacy-config, environment variables should only affect the HCL configuration file.
Deprecation Plan:
- Display deprecation warning messages for HCL configuration files in upcoming releases, until the next major version.
- Completely remove HCL configuration support in next major version.
For more context, see the Slack thread. For a comparison of options, see pros and cons.
I’m currently working on this.
@kfox1111 @MarcosDY @faisal-memon
Thanks @eminwux. Will you be using clean env?
Thanks @eminwux. Will you be using clean env?
Hi @faisal-memon! Yes, I plan to use cleanenv. I’ll attach a draft PR once I’ve made significant progress.
Sounds good @eminwux
@eminwux Are you still working on this?
Hi @faisal-memon , yes, I will get it done.
Sounds good @eminwux . Thanks for letting me know