Skip to content

Commit 263affa

Browse files
committed
Fix post-renderer conflict of overlapping hooks and templates
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
1 parent 31fb5ba commit 263affa

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

go.mod

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ go 1.26.0
44

55
replace github.com/fluxcd/helm-controller/api => ./api
66

7-
// TODO: Remove this after Helm 4.1.4 comes out.
8-
// This fixes the following bugs:
9-
// - https://github.com/helm/helm/issues/31867
10-
// - https://github.com/helm/helm/issues/31935
11-
replace helm.sh/helm/v4 => github.com/fluxcd/helm/v4 v4.1.4-flux.1
7+
// TODO: Remove this after Helm 4.2 comes out.
8+
replace helm.sh/helm/v4 => github.com/fluxcd/helm/v4 v4.1.4-flux.3
129

1310
// Replace digest lib to master to gather access to BLAKE3.
1411
// xref: https://github.com/opencontainers/go-digest/pull/66

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
146146
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
147147
github.com/fluxcd/cli-utils v0.37.2-flux.1 h1:tQ588ghtRN+E+kHq415FddfqA9v4brn/1WWgrP6rQR0=
148148
github.com/fluxcd/cli-utils v0.37.2-flux.1/go.mod h1:LcWSu1NYET8d8U7O326RhEm5JkQXCMK6ITu4G1CT02c=
149-
github.com/fluxcd/helm/v4 v4.1.4-flux.1 h1:ntm0bY/1VrqfsJbxlmAVxryGJoFcM5AySHiow/K2268=
150-
github.com/fluxcd/helm/v4 v4.1.4-flux.1/go.mod h1:5dSo8rRgn3OTkDAc/k0Ipw5/Q+BlqKIKZwa0XwSiINI=
149+
github.com/fluxcd/helm/v4 v4.1.4-flux.3 h1:KAKl2gfut/3PVmpRVpD+eIAwh6wx/BklULfRl3VDjf0=
150+
github.com/fluxcd/helm/v4 v4.1.4-flux.3/go.mod h1:5dSo8rRgn3OTkDAc/k0Ipw5/Q+BlqKIKZwa0XwSiINI=
151151
github.com/fluxcd/pkg/apis/acl v0.9.0 h1:wBpgsKT+jcyZEcM//OmZr9RiF8klL3ebrDp2u2ThsnA=
152152
github.com/fluxcd/pkg/apis/acl v0.9.0/go.mod h1:TttNS+gocsGLwnvmgVi3/Yscwqrjc17+vhgYfqkfrV4=
153153
github.com/fluxcd/pkg/apis/event v0.25.0 h1:zdwytvDhG+fk+Ywl5DOtv7TklkrVgM21WHm1f+YhleE=

internal/action/install.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121
"fmt"
2222

23+
"helm.sh/helm/v4/pkg/action"
2324
helmaction "helm.sh/helm/v4/pkg/action"
2425
helmchartutil "helm.sh/helm/v4/pkg/chart/common"
2526
helmchart "helm.sh/helm/v4/pkg/chart/v2"
@@ -108,6 +109,7 @@ func newInstall(config *helmaction.Configuration, obj *v2.HelmRelease, opts []In
108109
}
109110

110111
install.PostRenderer = postrender.BuildPostRenderers(obj)
112+
install.PostRenderStrategy = action.PostRenderStrategyNoHooks
111113

112114
for _, opt := range opts {
113115
opt(install)

internal/action/upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"errors"
2222
"fmt"
2323

24+
"helm.sh/helm/v4/pkg/action"
2425
helmaction "helm.sh/helm/v4/pkg/action"
2526
helmchartutil "helm.sh/helm/v4/pkg/chart/common"
2627
helmchart "helm.sh/helm/v4/pkg/chart/v2"
@@ -126,6 +127,7 @@ func newUpgrade(config *helmaction.Configuration, obj *v2.HelmRelease, opts []Up
126127
}
127128

128129
upgrade.PostRenderer = postrender.BuildPostRenderers(obj)
130+
upgrade.PostRenderStrategy = action.PostRenderStrategyNoHooks
129131

130132
for _, opt := range opts {
131133
opt(upgrade)

0 commit comments

Comments
 (0)