Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion internal/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ func Program(args []string) error {
}
for _, modify := range c.Images.Modify {
if modify.From != "" {

if strings.HasPrefix(r, modify.From) {
delete(m, i)

Expand Down
6 changes: 5 additions & 1 deletion pkg/helm/chartOption.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ func (co ChartOption) Run(ctx context.Context, setters ...Option) (ChartData, er
for _, mod := range c.Images.Modify {
if mod.FromValuePath != "" {
slog.Info("modifying chart value", slog.String("HelmValuesPath", mod.FromValuePath), slog.String("new", mod.To))
err := replaceValue(strings.Split(mod.FromValuePath, "."), mod.To, chart.Values)

to := mod.To
versionToken := "{.version}"
to = strings.Replace(to, versionToken, c.Version, 1)
err := replaceValue(strings.Split(mod.FromValuePath, "."), to, chart.Values)
if err != nil {
return err
}
Expand Down
Loading