mirror of https://github.com/knative/client.git
Fixed panic in kn service describe (#1529)
* Fixed panic in kn service describe * Added changelog entry * Update CHANGELOG.adoc Co-authored-by: David Simansky <dsimansk@redhat.com> Co-authored-by: David Simansky <dsimansk@redhat.com>
This commit is contained in:
parent
5eb1ecefdc
commit
4316d0345f
|
|
@ -12,6 +12,17 @@
|
||||||
| https://github.com/knative/client/pull/[#]
|
| https://github.com/knative/client/pull/[#]
|
||||||
////
|
////
|
||||||
|
|
||||||
|
## v1.1.0 (Unreleased)
|
||||||
|
[cols="1,10,3", options="header", width="100%"]
|
||||||
|
|===
|
||||||
|
| | Description | PR
|
||||||
|
|
||||||
|
| 🐛
|
||||||
|
| Fixed panic in kn service describe
|
||||||
|
| https://github.com/knative/client/pull/1529[#1529]
|
||||||
|
|
||||||
|
|===
|
||||||
|
|
||||||
## v1.0.0 (2021-11-02)
|
## v1.0.0 (2021-11-02)
|
||||||
[cols="1,10,3", options="header", width="100%"]
|
[cols="1,10,3", options="header", width="100%"]
|
||||||
|===
|
|===
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,12 @@ func WriteImage(dw printers.PrefixWriter, revision *servingv1.Revision) {
|
||||||
// Check if the user image is likely a more user-friendly description
|
// Check if the user image is likely a more user-friendly description
|
||||||
pinnedDesc := "at"
|
pinnedDesc := "at"
|
||||||
userImage := clientserving.UserImage(&revision.ObjectMeta)
|
userImage := clientserving.UserImage(&revision.ObjectMeta)
|
||||||
imageDigest := revision.Status.ContainerStatuses[0].ImageDigest
|
|
||||||
|
containerStatuses := revision.Status.ContainerStatuses
|
||||||
|
var imageDigest string
|
||||||
|
if len(containerStatuses) > 0 {
|
||||||
|
imageDigest = containerStatuses[0].ImageDigest
|
||||||
|
}
|
||||||
if userImage != "" && imageDigest != "" {
|
if userImage != "" && imageDigest != "" {
|
||||||
var parts []string
|
var parts []string
|
||||||
if strings.Contains(image, "@") {
|
if strings.Contains(image, "@") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue