Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 0 deletions internal/controller/plugin/plugin_controller_flux.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (r *PluginReconciler) EnsureFluxCreated(ctx context.Context, plugin *greenh
WithDriftDetection(&helmv2.DriftDetection{
Mode: helmv2.DriftDetectionEnabled,
}).
WithSuspend(release.Spec.Suspend).
WithKubeConfig(fluxmeta.SecretKeyReference{
Name: plugin.Spec.ClusterName,
Key: greenhouseapis.GreenHouseKubeConfigKey,
Expand Down
7 changes: 7 additions & 0 deletions internal/flux/helm_release_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type HelmReleaseBuilder interface {
WithUpgrade(upgrade *helmv2.Upgrade) *helmReleaseBuilder
WithRollback(rollback *helmv2.Rollback) *helmReleaseBuilder
WithDriftDetection(driftDetection *helmv2.DriftDetection) *helmReleaseBuilder
WithSuspend(suspend bool) *helmReleaseBuilder
WithTest(test *helmv2.Test) *helmReleaseBuilder
WithUninstall(uninstall *helmv2.Uninstall) *helmReleaseBuilder
WithDependsOn(dependencies []fluxmeta.NamespacedObjectReference) *helmReleaseBuilder
Expand Down Expand Up @@ -177,6 +178,12 @@ func (b *helmReleaseBuilder) WithDriftDetection(driftDetection *helmv2.DriftDete
return b
}

// WithSuspend sets the suspend flag for the Helm release.
func (b *helmReleaseBuilder) WithSuspend(suspend bool) *helmReleaseBuilder {
b.spec.Suspend = suspend
return b
}

// WithTest sets the test configuration for the Helm release.
func (b *helmReleaseBuilder) WithTest(test *helmv2.Test) *helmReleaseBuilder {
if test == nil {
Expand Down
Loading