Open manterfield opened 9 months ago
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
This is a potentially a user error, but it's not obvious to me what I could have done differently. When I create a port forward via
portforward.New()
with appropriate writers forout
anderrOut
there's cases where theerrOut
is ignored.Specifically where I get an error like so:
The first part
an error occurred forwarding
appears to come from hereProblem is I'm actually passing a custom writer to errOut, which should ensure all errors are ran through my structured logger (otherwise I get non-json output in the middle of my structured logs, which screws up the parsing of them).
I did find a hacky workaround after attempting to following the code, which is to call:
before running portforward.
Ideally I wouldn't introduce these packages into my code, but I couldn't see another way to do it. The above method has the drawback that I have to depend on
klog
,go-logr
andgo-logr/zerologr
in addition to my actual logger, zerolog. Those exist purely to prevent one unstructured error log from appearing.If I've missed a better/cleaner way to do this, I'd love to see an example if possible.