Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when newly required env var is missing #502

Closed
wants to merge 1 commit into from

Conversation

jacksontj
Copy link
Contributor

@jacksontj jacksontj commented Jun 5, 2019

463e880 swapped discovery of local running pods from the docker daemon to the k8s API. In doing so it now requires the MY_NODE_NAME environment variable -- which was both (1) not documented and (2) no error if it is not set. In the case that the variable wasn't set the local daemon would then attempt to add all pods that aren't assigned to any node (as the node name would be "").

This patch (1) adds an entry in readme about this option and (2) returns
an error if it is not set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

aws@463e880 swapped discovery of local running pods from the docker daemon to the k8s API. In doing so it now requires the `MY_NODE_NAME` environment variable -- which was both (1) not documented and (2) no error if it is not set. In the case that the variable wasn't set the local daemon would then attempt to add *all* pods that aren't assigned to any node (as the node name would be "").

This patch (1) adds an entry in readme about this option and (2) returns
an error if it is not set.
@mogren
Copy link
Contributor

mogren commented Jun 9, 2019

Hey @jacksontj, thanks for the PR, but there are multiple things to consider here. First of all, this environment variable should already have be set in the configuration and that should probably be documented.

Also, it is currently fetched from the environment in two places which is weird, and there is no error handling if it's not set. I think this might need some more refactoring to resolve these issues, I'll try to get some time to go through it some more.

@jaypipes jaypipes closed this Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants