-
Notifications
You must be signed in to change notification settings - Fork 206
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
Make nameserver overridable for provider #180
base: master
Are you sure you want to change the base?
Conversation
Adds a flag to the provider command that allows to override the default nameserver in for example the systemd unit file for faasd-provider. Signed-off-by: Peter Magnusson <me@kmpm.se>
I think if you are already doing a remake for the |
@@ -28,6 +28,7 @@ func makeProviderCmd() *cobra.Command { | |||
} | |||
|
|||
command.Flags().String("pull-policy", "Always", `Set to "Always" to force a pull of images upon deployment, or "IfNotPresent" to try to use a cached image.`) | |||
command.Flags().String("nameserver", "8.8.8.8", `Set to the DNS server you want to use for resolving DNS queries`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect this to be a string array so that multiple addresses can be given, it seems standard to see 8.8.8.8 and 8.8.8.4 or the equivalent set of Cloudflare IPs.
Commented @Shikachuu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your thoughts on the suggestion being made?
The suggestions are great. Will probably get to it this weekend. |
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: