mirror of
https://github.com/coredns/coredns.git
synced 2025-11-13 07:22:16 -05:00
@@ -21,7 +21,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
||||
if last < 0 {
|
||||
return nil, dns.RcodeServerFailure
|
||||
}
|
||||
// We dealing with a fairly normal domain name here, but; we still need to have the service
|
||||
// We are dealing with a fairly normal domain name here, but we still need to have the service
|
||||
// and the namespace:
|
||||
// service.namespace.<base>
|
||||
//
|
||||
@@ -86,7 +86,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
||||
// ExternalAddress returns the external service address(es) for the CoreDNS service.
|
||||
func (k *Kubernetes) ExternalAddress(state request.Request) []dns.RR {
|
||||
// This is probably wrong, because of all the fallback behavior of k.nsAddr, i.e. can get
|
||||
// an address that isn't reacheable from outside the cluster.
|
||||
// an address that isn't reachable from outside the cluster.
|
||||
rrs := []dns.RR{k.nsAddr()}
|
||||
return rrs
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ func (k *Kubernetes) getClientConfig() (*rest.Config, error) {
|
||||
}
|
||||
|
||||
// Connect to API from out of cluster
|
||||
// Only the first one is used. We will deprecated multiple endpoints later.
|
||||
// Only the first one is used. We will deprecate multiple endpoints later.
|
||||
clusterinfo.Server = k.APIServerList[0]
|
||||
|
||||
if len(k.APICertAuth) > 0 {
|
||||
|
||||
@@ -62,7 +62,7 @@ func ToEndpoints(obj interface{}) interface{} {
|
||||
Addresses: make([]EndpointAddress, len(eps.Addresses)),
|
||||
}
|
||||
if len(eps.Ports) == 0 {
|
||||
// Add sentinal if there are no ports.
|
||||
// Add sentinel if there are no ports.
|
||||
sub.Ports = []EndpointPort{{Port: -1}}
|
||||
} else {
|
||||
sub.Ports = make([]EndpointPort, len(eps.Ports))
|
||||
|
||||
@@ -184,7 +184,7 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
||||
case "endpoint":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) > 0 {
|
||||
// Multiple endoints are deprecated but still could be specified,
|
||||
// Multiple endpoints are deprecated but still could be specified,
|
||||
// only the first one be used, though
|
||||
k8s.APIServerList = args
|
||||
if len(args) > 1 {
|
||||
|
||||
Reference in New Issue
Block a user