Add printing of kubectl error message #714
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish with this PR?
Currently if there is some error applying a manifest happening at the
kubectl apply
call, 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 apply
call, 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?