-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: add support for passing resolv.conf in dns discovery #9770
Changes from 5 commits
0f5e35f
71f279f
0b40ed7
0a3ef39
63155d3
a680a95
e3b3205
58a89d1
df7a645
3cab090
e6146d2
b6e6816
127491a
f30e50d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -24,6 +24,9 @@ return { | |||
type = "string", | ||||
}, | ||||
}, | ||||
resolvconf = { | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add this to config-default.yaml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. config-default already has apisix/conf/config-default.yaml Line 279 in 01763b5
and only one of servers or resolvconf is needed. Should I add it anyways?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay sounds good. Adding it.. |
||||
type = "string", | ||||
}, | ||||
order = { | ||||
type = "array", | ||||
minItems = 1, | ||||
|
@@ -34,5 +37,12 @@ return { | |||
}, | ||||
}, | ||||
}, | ||||
required = {"servers"} | ||||
oneOf = { | ||||
{ | ||||
required = {"servers"}, | ||||
}, | ||||
{ | ||||
required = {"resolvconf"}, | ||||
} | ||||
} | ||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,11 +120,3 @@ upstreams: | |
} | ||
--- request | ||
GET /t | ||
--- grep_error_log eval | ||
qr/connect to 127.0.0.1:1053/ | ||
--- grep_error_log_out | ||
connect to 127.0.0.1:1053 | ||
connect to 127.0.0.1:1053 | ||
connect to 127.0.0.1:1053 | ||
connect to 127.0.0.1:1053 | ||
connect to 127.0.0.1:1053 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you delete this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Must have been done by mistake while testing something. Pushed the latest commit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
nameserver 127.0.0.1:1053 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you could create the file in |
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.
Use
resolv_conf
to replace all variablesThere 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.
okay except for the
resolveConf
key inside opts because that field is in the lua-resty-dns.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.
done