Skip to content

Commit

Permalink
update ndots
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmet Alp Balkan <[email protected]>
  • Loading branch information
ahmetb committed Oct 6, 2020
1 parent 801bd10 commit f54cd03
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ page](https://github.com/ahmetb/runsd).
## Quickstart

You can deploy [this](./example) sample application to Cloud Run to try out
querying other **private** Cloud Run services **without tokens** and **without full `.run.app`
domains** by directly using curl:
querying other **private** Cloud Run services **without tokens** and **without
full `.run.app` domains** by directly using curl:

```sh
gcloud alpha run deploy curl-app --platform=managed
Expand Down
4 changes: 2 additions & 2 deletions example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN apk add --no-cache curl bind-tools
COPY --from=build /app /app

# This is how you integrate with runsd:
ADD https://github.com/ahmetb/runsd/releases/download/v0.0.0-rc.3/runsd /runsd
ADD https://github.com/ahmetb/runsd/releases/download/v0.0.0-rc.4/runsd /runsd
RUN chmod +x /runsd
ENTRYPOINT ["/runsd", "--", "/app"]
ENTRYPOINT ["/runsd", "-v=5", "--", "/app"]
14 changes: 7 additions & 7 deletions runsd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
)

const (
resolvConf = "/etc/resolv.conf"
internalDomain = "run.internal."
defaultNdots = 4
defaultDnsPort = "53"
defaultHTTPProxyPort = "80"
resolvConf = "/etc/resolv.conf"
defaultInternalDomain = "run.internal"
defaultNdots = 3
defaultDnsPort = "53"
defaultHTTPProxyPort = "80"
)

var (
Expand Down Expand Up @@ -61,8 +61,8 @@ func main() {
klog.InitFlags(nil)
defer klog.Flush()
flag.StringVar(&flResolvConf, "resolv_conf_file", resolvConf, "[debug-only] path to resolv.conf(5) file to read/write")
flag.StringVar(&flInternalDomain, "domain", internalDomain, "internal domain")
flag.IntVar(&flNdots, "ndots", defaultNdots, "ndots setting for resolv conf, e.g. for -domain=a.b. this should be 4")
flag.StringVar(&flInternalDomain, "domain", defaultInternalDomain, "internal zone (without a trailing dot)")
flag.IntVar(&flNdots, "ndots", defaultNdots, "ndots setting for resolv conf (e.g. for -domain=a.b this should be 3)")
flag.StringVar(&flNameserver, "nameserver", "", "override used nameserver (default: from -resolv_conf_file)")
flag.StringVar(&flRegion, "gcp_region", "", "[debug-only] override GCP region (do not infer from metadata svc)")
flag.BoolVar(&flSkipDNSServer, "skip_dns_hijack", false, "[debug-only] do not start a DNS server for service discovery")
Expand Down

0 comments on commit f54cd03

Please sign in to comment.