Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fetch the hostname from env variables when running in EKS
Summary: ## This stack In prod we always read the hostname from `/etc/fbwhoami`. In AWS we provide a custom, hardcoded [`/etc/fbwhoami`](https://fburl.com/code/4nf1tdqi) that hardcodes the hostname. That wasn't a problem so far because we only ran once instance, but now we are starting to run multiple. ## This diff Read the hostname from an environment variable (`HOSTNAME`) that is guaranteed to exist on EKS. To avoid any ambiguity, we will only honor it if we are certain to be running on AWS. This logic is applicable to OSS as well, and guaranteed to work; so we might as well make it unconditional. Reviewed By: RajivTS Differential Revision: D70567737 fbshipit-source-id: b3d8351e60989e9f07adcf685b1587b71eebe4de
- Loading branch information