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
3 changes: 3 additions & 0 deletions api/v1alpha1/plugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ const (
// PluginOptionValueInvalidReason is set when option values could not be converted to Helm values
PluginOptionValueInvalidReason greenhousemetav1alpha1.ConditionReason = "PluginOptionValueInvalid"

// PluginHelmTemplateFailedReason is set when templating the Helm chart for the Plugin failed.
PluginHelmTemplateFailedReason greenhousemetav1alpha1.ConditionReason = "PluginHelmTemplateFailed"

// FluxHelmReleaseConfigInvalidReason is set when the generated Flux HelmRelease manifest is invalid and cannot be applied to the cluster.
FluxHelmReleaseConfigInvalidReason greenhousemetav1alpha1.ConditionReason = "FluxHelmReleaseConfigInvalid"

Expand Down
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 @@ -180,6 +180,7 @@ func (r *PluginReconciler) ensureHelmRelease(

helmRelease, err := helm.TemplateHelmChartFromPluginOptionValues(ctx, r.Client, restClientGetter, &pluginDefinitionSpec, plugin, optionValues)
if err != nil {
plugin.SetCondition(greenhousemetav1alpha1.FalseCondition(greenhousev1alpha1.HelmReleaseCreatedCondition, greenhousev1alpha1.PluginHelmTemplateFailedReason, err.Error()))
return fmt.Errorf("failed to template helm chart for Plugin %s: %w", plugin.Name, err)
}

Expand Down
Loading