Skip to content

Commit

Permalink
Merge pull request #257 from fluxcd/slice-bounds-range-image-name
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddeco authored Nov 8, 2021
2 parents 60ce659 + bdf73cb commit ab1b200
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/update/setters.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package update

import (
"fmt"
"strings"

"github.com/go-logr/logr"
"github.com/google/go-containerregistry/pkg/name"
Expand Down Expand Up @@ -159,7 +160,7 @@ func UpdateWithSetters(tracelog logr.Logger, inpath, outpath string, policies []
// annoyingly, neither the library imported above, nor an
// alternative I found, will yield the original image name;
// this is an easy way to get it
name := image[:len(image)-len(tag)-1]
name := strings.TrimRight(image, ":"+tag)

imageSetter := fmt.Sprintf("%s:%s", policy.GetNamespace(), policy.GetName())
tracelog.Info("adding setter", "name", imageSetter)
Expand Down

0 comments on commit ab1b200

Please sign in to comment.