Revert k8s changes
This commit is contained in:
parent
e0a49b73b5
commit
3be9e58ddf
2 changed files with 29 additions and 19 deletions
|
@ -183,14 +183,14 @@ func (k *Kubernetes) Get(namespace string, nsWildcard bool, servicename string,
|
|||
|
||||
var resultItems []api.Service
|
||||
|
||||
for _, item := range serviceList {
|
||||
for _, item := range serviceList.Items {
|
||||
if symbolMatches(namespace, item.Namespace, nsWildcard) && symbolMatches(servicename, item.Name, serviceWildcard) {
|
||||
// If namespace has a wildcard, filter results against Corefile namespace list.
|
||||
// (Namespaces without a wildcard were filtered before the call to this function.)
|
||||
if nsWildcard && (len(k.Namespaces) > 0) && (!util.StringInSlice(item.Namespace, k.Namespaces)) {
|
||||
continue
|
||||
}
|
||||
resultItems = append(resultItems, *item)
|
||||
resultItems = append(resultItems, item)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,11 +216,11 @@ func isKubernetesNameError(err error) bool {
|
|||
}
|
||||
|
||||
func (k *Kubernetes) getServiceRecordForIP(ip, name string) []msg.Service {
|
||||
svcList, err := k.APIConn.svcLister.List(labels.Everything())
|
||||
svcList, err := k.APIConn.svcLister.List()
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
for _, service := range svcList {
|
||||
for _, service := range svcList.Items {
|
||||
if service.Spec.ClusterIP == ip {
|
||||
return []msg.Service{msg.Service{Host: ip}}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue