Skip to content

Commit

Permalink
fix: #153 dns address format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yunlzheng committed Aug 26, 2020
1 parent fe1e91c commit 1df005d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kt/command/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func connectToCluster(cli kt.CliInterface, options *options.DaemonOptions) (err
if namespace == options.Namespace {
continue
}
log.Debug().Msgf("Serach service in %s namespace...", namespace)
log.Debug().Msgf("Search service in %s namespace...", namespace)
singleHosts := kubernetes.ServiceHosts(namespace)
for k, v := range singleHosts {
if v == "" || v == "None" {
Expand Down
7 changes: 6 additions & 1 deletion pkg/proxy/dnsserver/dnsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ func (s *server) getDomainWithClusterPostfix(origin string, count int) (domain s
}
}
if postfix != "" {
domain = origin + postfix + "."
// @see https://github.com/alibaba/kt-connect/issues/153
if strings.HasSuffix(postfix, ".") {
domain = origin + postfix
} else {
domain = origin + postfix + "."
}
log.Info().Msgf("Format domain %s to %s\n", origin, domain)
}
return
Expand Down

0 comments on commit 1df005d

Please sign in to comment.