Make nameserver overridable for provider #180
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a flag to the provider command that allows to override the default
nameserver in for example the systemd unit file for faasd-provider.
Description
Added a single string flag to cmd/provider.go called
nameserver
.That flag has a default value of
8.8.8.8
and will get used whenresolve.conf
created later in the source.Motivation and Context
Will probably solve #174 and #176.
Edit: made my own issue #181
How Has This Been Tested?
I ran the test provided in the code.
Built a version of it and deployed to my raspberry pi instance of faasd.
Then I modified the unit file
/usr/lib/systemd/system/faasd-provider.service
and restarted everything.Then I deployed a function that looked up a database server using a hostname that is only resolvable from the defined internal DNS and everything worked.
Types of changes
Checklist:
Commits:
git commit -s
for the Developer Certificate of Origin (DCO)Code:
Docs: