spiffe-helper icon indicating copy to clipboard operation
spiffe-helper copied to clipboard

Support configuration of spiffe-helper via environment variables

Open eminwux opened this issue 1 year ago • 5 comments

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:

  • --config should be added for the new configuration format.
  • --legacy-config should 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.

eminwux avatar Nov 28 '24 16:11 eminwux

I’m currently working on this.

eminwux avatar Nov 28 '24 16:11 eminwux

@kfox1111 @MarcosDY @faisal-memon

eminwux avatar Nov 28 '24 16:11 eminwux

Thanks @eminwux. Will you be using clean env?

faisal-memon avatar Nov 28 '24 17:11 faisal-memon

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.

eminwux avatar Nov 28 '24 18:11 eminwux

Sounds good @eminwux

faisal-memon avatar Nov 28 '24 18:11 faisal-memon

@eminwux Are you still working on this?

faisal-memon avatar Nov 06 '25 00:11 faisal-memon

Hi @faisal-memon , yes, I will get it done.

eminwux avatar Nov 06 '25 10:11 eminwux

Sounds good @eminwux . Thanks for letting me know

faisal-memon avatar Nov 07 '25 05:11 faisal-memon