Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@smira
Copy link
Contributor

@smira smira commented Nov 27, 2025

The plugin dropped the actual error message from the log, so the log becomes completely useless.

Before:

[ERROR] plugin/kubernetes: Failed to watch

After:

[ERROR] plugin/kubernetes: Failed to watch: failed to list *v1.Namespace: Get "https://10.96.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0": tls: failed to parse certificate from server: x509: SAN dNSName is malformed

1. Why is this pull request needed and what does it do?

Fixes a bug which makes troubleshooting next to impossible.

2. Which issues (if any) are related?

None, but due to Go 1.25.2 changes to strict SAN validation, CoreDNS might fail to access Kubernetes API on version 1.13.1.

3. Which documentation changes (if any) need to be made?

None.

4. Does this introduce a backward incompatible change or deprecation?

Nope.

Copy link
Collaborator

@thevilledev thevilledev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Seems to be the case since CoreDNS v1.9.4 e0dead4

The plugin dropped the actual error message from the log, so the log
becomes completely useless.

Before:

```
[ERROR] plugin/kubernetes: error Failed to watch
```

After:

```
[ERROR] plugin/kubernetes: Failed to watch: failed to list *v1.Namespace: Get "https://10.96.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0": tls: failed to parse certificate from server: x509: SAN dNSName is malformed
```

Signed-off-by: Andrey Smirnov <[email protected]>
@smira smira force-pushed the fix/kubernetes-error-log branch from f206559 to e6b2aa8 Compare November 27, 2025 17:11
@smira
Copy link
Contributor Author

smira commented Nov 27, 2025

updated fixing the linter warning (removed .P), no other changes

@thevilledev thevilledev merged commit 604e167 into coredns:master Nov 27, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants