Fix 'linkerd version --proxy'

This commit is contained in:
Alejandro Pedraza 2024-04-16 15:07:58 -05:00
parent 42dbdaddf5
commit 62694965d0
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -323,7 +323,8 @@ func GetProxyReady(pod corev1.Pod) bool {
// GetProxyVersion returns the container proxy's version, if any
func GetProxyVersion(pod corev1.Pod) string {
for _, container := range pod.Spec.Containers {
containers := append(pod.Spec.InitContainers, pod.Spec.Containers...)
for _, container := range containers {
if container.Name == ProxyContainerName {
if strings.Contains(container.Image, "@") {
// Proxy container image is specified with digest instead of