Skip to content

Commit

Permalink
Fixed resolution in corefile
Browse files Browse the repository at this point in the history
  • Loading branch information
santanusinha committed Jan 17, 2025
1 parent 6cc08dc commit 1538423
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ In this configuration, we resolve queries through the plugin and enrich the answ
~~~ corefile
example.drove.gateway.com {
drovedns {
endpoint "http://drove-control001.example.com:8080,http://drove-control002.example.com:8080"
accesstoken "Bearer foo"
endpoint "http://drove-control001.example.com:8080,http://drove-control002.example.com:8080",
gateway "example.drove.gateway.com",
user_pass "guest" "guest"
}
forward . /etc/resolv.conf
}
Expand All @@ -86,7 +87,10 @@ Docker image containing coredns compiled with the plugin are available on ghcr.
~~~ bash
docker run -p1053:1053/udp -p1053:1053 \
-e DROVE_ENDPOINT="https://drovecontrol001.exmaple.com:8080,https://drovecontrol002.exmaple.com:8080,https://drovecontrol003.exmaple.com:8080" \
-e DROVE_USERNAME="<USERNAME>" -e DROVE_PASSWORD="<PASSWORD>" \
-e DROVE_USERNAME="<USERNAME>" \
-e DROVE_PASSWORD="<PASSWORD>" \
-e DROVE_GATEWAY="10.0.56.1" \
-e UPSTREAM_DNS="1.1.1.1" \
-it ghcr.io/phonepe/coredns-drove:<VERSION>
~~~

Expand Down
4 changes: 2 additions & 2 deletions cmd/coredns/Corefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
whoami
cache 30
ready
forward . /etc/resolv.conf
prometheus
drove {
endpoint {$DROVE_ENDPOINT}
access_token {$DROVE_ACCESS_TOKEN}
user_pass {$DROVE_USERNAME} {$DROVE_PASSWORD}
gateway {$DROVE_GATEWAY}
skip_ssl_check
skip_ssl_check
}
forward . {$UPSTREAM_DNS}
}
9 changes: 6 additions & 3 deletions cmd/coredns/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ require (
github.com/coredns/coredns v1.11.1
)

replace (
github.com/PhonePe/coredns-drove v0.0.0 => ../../
)
// Uncomment this to use the locally modified code
// Run: go mod vendor
// check code being used in vendor/github.com/PhonePe/coredns-drove/
// replace (
// github.com/PhonePe/coredns-drove v0.0.0 => ../../
// )

require (
cloud.google.com/go/compute v1.23.0 // indirect
Expand Down

0 comments on commit 1538423

Please sign in to comment.