Open kate-goldenring opened 3 weeks ago
I think the shim related stuff really shouldn't be in the pod logs but it would be possible to get them surface by moving the stio.redirect() before any logs that you want redirected.
This sort of relates to https://github.com/containerd/runwasi/issues/619
Something like this should really be surfaced up to Kubernetes as an event IMO, sort of like when not pulling fails. I don't know if it is possible to pass this info up through cri though.
I 100% agree this should be surfaced as a K8s event. We also don't surface things like precompilation failing as K8s events. That would maybe be a good first one to target because runwasi could define a strategy for surfacing it. In the mean time, it may make sense to surface this error. I put up a PR for that: https://github.com/spinkube/containerd-shim-spin/pull/229
Say you apply this spin app that has two components
hello
andgoodbye
but select that nonexistent componentfoo
is run:The pod with Error with no logs. You have to look at the containerd logs to find that an improper component was selected:
Could we somehow surface this in the Pod logs?