Commit 79de63c
committed
Avoid marshalling error in debug log line
Currently every webhook requests ended up logging this in debug:
```
2020-06-10T16:04:20.883+0200 DEBUG controller-runtime.webhook.webhooks wrote response {"webhook": "/validate-some-resource", "UID": "e5d00608-7f47-4d00-bd91-b1a8955dc5a7", "allowed": true, "result": {}, "resultError": "got runtime.Object without object metadata: &Status{ListMeta:ListMeta{SelfLink:,ResourceVersion:,Continue:,RemainingItemCount:nil,},Status:,Message:,Reason:,Details:nil,Code:200,}"}
```
The problem is that a `Status` Object is a runtime.Object but which has no metadata which is not well received the `KubeAwareEncoder`.
Signed-off-by: Fabian Ruff <[email protected]>1 parent eb68324 commit 79de63c
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
0 commit comments