Add printing of kubectl error message#714
Conversation
|
Thanks for your contribution! Error reporting is tricky in Krane, since we need to avoid the scenario where we leak secret information (this can happen if |
|
Thanks @timothysmith0609, this helps to clarify the situation. We should at least
To be honest, I don't know. We do deploy a secrets.ejson along our resources file with krane. So I guess yes? With my understanding of how krane splits all resources into multiple steps, this particular step only reference to 'secret' would be in it's prune-whitelists. |
What are you trying to accomplish with this PR?
Currently if there is some error applying a manifest happening at the
kubectl applycall, this error will get swallowed by krane. It is reported that an error occurred, but not what the error is.This behaviour is making it unfeasible to debug underlying issues, for example permission issues on the (service) account used to run krane in a CD environment.
Example:
Not helpful, as even if a user would have access to the system/environment to manually replicate the
kubectl applycall, krane already cleaned up the temp dir.With this change:
How is this accomplished?
Add the collected error to the message presented to the user.
What could go wrong?
Leaking sensitive information, maybe, somehow, eventually?