Skip to content

Commit

Permalink
operator: fix upgradeImages
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hj-johannes-lee committed Oct 4, 2024
1 parent 53efaae commit acc52d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func UpgradeImages(ctx context.Context, image *string, initimage *string) (upgra
}

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

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

Expand Down

0 comments on commit acc52d9

Please sign in to comment.