forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use image pull error in
message
during back-off
The container status waiting reason toggles between `ImagePullBackOff` and the actual pull error, resulting in a bad user experience for consumers like kubectl. For example, the output of `kubectl get pods` does return either: ``` NAME READY STATUS RESTARTS AGE pod 0/1 SignatureValidationFailed 0 10s ``` or ``` NAME READY STATUS RESTARTS AGE pod 0/1 ImagePullBackOff 0 18s ``` depending in which state the image pull is. We now improve that behavior by preserving the actual error in the `message` of the `waiting` state from the pull during back-off: ```json { "waiting": { "message": "Back-off pulling image \"quay.io/crio/unsigned:latest\": SignatureValidationFailed: image pull failed for quay.io/crio/unsigned:latest because the signature validation failed: Source image rejected: A signature was required, but no signature exists", "reason": "ImagePullBackOff" } } ``` While the `SignatureValidationFailed` value inherits from the previous known state: ```json { "waiting": { "message": "image pull failed for quay.io/crio/unsigned:latest because the signature validation failed: Source image rejected: A signature was required, but no signature exists", "reason": "SignatureValidationFailed" } } ``` Signed-off-by: Sascha Grunert <[email protected]>
- Loading branch information
1 parent
07e7368
commit 0fc4b74
Showing
2 changed files
with
90 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters