Skip to content

Commit 3fdf72c

Browse files
IvoGomank-fabryczny
authored andcommitted
refactor(pluginpreset): create a dedicated PluginSpec
Some fields (ClusterName, WaitFor) of the PluginSpec are not used by the PluginPreset With the upcoming changes of moving expression evaluation to the PluginPreset controller this will also effect the PluginOptionValues. This change brings a dedicated PluginSpec for PluginPresets and prepares the types for PluginOptionValues. The usage of the new PluginPresetPluginOptionValue will be implemented separately. Fields such as ClusterName, WaitFor are removed, both from types and webhook validation. Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com> Signed-off-by: Klaudiusz Fabryczny <klaudiusz.fabryczny@sap.com>
1 parent 25506d7 commit 3fdf72c

3 files changed

Lines changed: 1 addition & 6 deletions

File tree

charts/manager/crds/greenhouse.sap_pluginpresets.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Greenhouse contributors
2-
# SPDX-License-Identifier: Apache-2.0
3-
41
---
52
apiVersion: apiextensions.k8s.io/v1
63
kind: CustomResourceDefinition

charts/manager/crds/greenhouse.sap_plugins.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Greenhouse contributors
2-
# SPDX-License-Identifier: Apache-2.0
3-
41
---
52
apiVersion: apiextensions.k8s.io/v1
63
kind: CustomResourceDefinition

internal/controller/plugin/pluginpreset_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ func pluginSpecFromPluginPreset(preset *greenhousev1alpha1.PluginPreset, cluster
502502
DisplayName: preset.Spec.Plugin.DisplayName,
503503
OptionValues: preset.Spec.Plugin.OptionValues,
504504
ReleaseNamespace: preset.Spec.Plugin.ReleaseNamespace,
505+
ReleaseName: preset.Spec.Plugin.ReleaseName,
505506
DeletionPolicy: preset.Spec.Plugin.DeletionPolicy,
506507
IgnoreDifferences: preset.Spec.Plugin.IgnoreDifferences,
507508
// Set the cluster name to the name of the cluster. The PluginSpec contained in the PluginPreset does not have a cluster name.

0 commit comments

Comments
 (0)