diff --git a/pkg/util/vclustervalues/values.go b/pkg/util/vclustervalues/values.go index 27b3e01f2..8a39279bc 100644 --- a/pkg/util/vclustervalues/values.go +++ b/pkg/util/vclustervalues/values.go @@ -98,9 +98,9 @@ func mergeMaps(a, b map[string]interface{}) map[string]interface{} { } func getK8sImageVersionFromValues(values string) string { - vclusterIdx := strings.Index(values, "vcluster:") // k0s, k3s + vclusterIdx := strings.Index(values, "vcluster:\n") // k0s, k3s if vclusterIdx == -1 { - vclusterIdx = strings.Index(values, "api:") // k8s, eks + vclusterIdx = strings.Index(values, "api:\n") // k8s, eks } imageAnchor := "image:" imageIdx := strings.Index(values[vclusterIdx:], imageAnchor)