openmicroservices.org
openmicroservices.org copied to clipboard
Environment check function
Proposition to add methods for checking environment variables before deployment.
environment:
foobar:
...
environment_check: ["python", "check_env.py"]
All environment variables are included during the check (because they all may be needed). Return a 0 if the variable(s) are valid. Return a 1+ for failure and write to stderr why.
What's the advantage over (1) checking this on the engine directly for all services or (2) in the program itself?
The idea here is to reduce issues before placing into production. The Platform would be able to run a simple check to see if environment works. e.g., GitHub Apps client/secret pairs actually work and resolve. This can be checked upon updating configuration and periodically as a service health-check.
Both your points above, from my interpretation, occur after deployment and when "real" data is handled.