mirror of https://github.com/linkerd/linkerd2.git
ignore proxy imagees with digests when checking version (#12059)
Fixes #12058 When proxy images are specified by digest rather than by tag, `linkerd check` will erroneously assume that the digest is a tag and attempt to compare it to the current Linkerd version. Instead, we ignore images with digests since there isn't an easy way to determine what version a digest corresponds to. Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
parent
bf7b039f41
commit
d8be3e0353
|
|
@ -306,6 +306,11 @@ func GetProxyReady(pod corev1.Pod) bool {
|
|||
func GetProxyVersion(pod corev1.Pod) string {
|
||||
for _, container := range pod.Spec.Containers {
|
||||
if container.Name == ProxyContainerName {
|
||||
if strings.Contains(container.Image, "@") {
|
||||
// Proxy container image is specified with digest instead of
|
||||
// tag. We are unable to determine version.
|
||||
return ""
|
||||
}
|
||||
parts := strings.Split(container.Image, ":")
|
||||
return parts[len(parts)-1]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue