Skip to content

Commit acc52d9

Browse files
operator: fix upgradeImages
For sha256 image tags, it has not been working properly. Fix it to make it work both semantic and sha256. Signed-off-by: Hyeongju Johannes Lee <[email protected]>
1 parent 53efaae commit acc52d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controllers/reconciler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func UpgradeImages(ctx context.Context, image *string, initimage *string) (upgra
160160
}
161161

162162
if parts := strings.SplitN(*s, ":", 2); len(parts) == 2 && len(parts[0]) > 0 {
163-
name, version := parts[0], parts[1]
163+
name, version := strings.Split(parts[0], "@")[0], parts[1]
164164

165165
envVarValue := os.Getenv(strings.ReplaceAll(strings.ToUpper(filepath.Base(name)), "-", "_") + "_SHA")
166166

0 commit comments

Comments
 (0)