Skip to content

Commit

Permalink
Improve log clarity about missing pod keys for provider
Browse files Browse the repository at this point in the history
  • Loading branch information
walbertus committed Jun 15, 2020
1 parent 38d3b9b commit 445095c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/content/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ helm install maesh maesh/maesh --set kubedns=true
```

With this parameter Maesh will install a CoreDNS as a daemonset.
KubeDNS will be patched with [stubDomains](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#example-stub-domain).
KubeDNS will be patched with [stubDomains](https://v1-17.docs.kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#example-stub-domain).

## Custom cluster domain

Expand Down
21 changes: 14 additions & 7 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,8 @@ func (p *Provider) buildHTTPServiceFromService(t *topology.Topology, svc *topolo
for _, podKey := range svc.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for HTTP service from Service %s@%s", podKey, topology.Key{Name: svc.Name, Namespace: svc.Namespace})

continue
}

Expand All @@ -639,7 +640,8 @@ func (p *Provider) buildHTTPServiceFromTrafficTarget(t *topology.Topology, tt *t
for i, podKey := range tt.Destination.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for HTTP service from Traffic Target %s@%s", podKey, topology.Key{Name: tt.Name, Namespace: tt.Namespace})

continue
}

Expand All @@ -662,7 +664,8 @@ func (p *Provider) buildTCPServiceFromService(t *topology.Topology, svc *topolog
for _, podKey := range svc.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for TCP service from Service %s@%s", podKey, topology.Key{Name: svc.Name, Namespace: svc.Namespace})

continue
}

Expand All @@ -686,7 +689,8 @@ func (p *Provider) buildUDPServiceFromService(t *topology.Topology, svc *topolog
for _, podKey := range svc.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for UDP service from Service %s@%s", podKey, topology.Key{Name: svc.Name, Namespace: svc.Namespace})

continue
}

Expand All @@ -710,7 +714,8 @@ func (p *Provider) buildTCPServiceFromTrafficTarget(t *topology.Topology, tt *to
for i, podKey := range tt.Destination.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for TCP service from Traffic Target %s@%s", podKey, topology.Key{Name: tt.Name, Namespace: tt.Namespace})

continue
}

Expand All @@ -734,7 +739,8 @@ func (p *Provider) buildWhitelistMiddlewareFromTrafficTargetDirect(t *topology.T
for _, podKey := range source.Pods {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for WhitelistMiddleware from Traffic Target %s@%s", podKey, topology.Key{Name: tt.Name, Namespace: tt.Namespace})

continue
}

Expand All @@ -758,7 +764,8 @@ func (p *Provider) buildWhitelistMiddlewareFromTrafficSplitDirect(t *topology.To
for _, podKey := range ts.Incoming {
pod, ok := t.Pods[podKey]
if !ok {
p.logger.Errorf("Unable to find Pod %q", podKey)
p.logger.Errorf("Unable to find Pod %q for WhitelistMiddleware from Traffic Split %s@%s", podKey, topology.Key{Name: ts.Name, Namespace: ts.Namespace})

continue
}

Expand Down

0 comments on commit 445095c

Please sign in to comment.