Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg committed Nov 25, 2024
1 parent 037b48e commit b3545a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (r *MCORenderer) renderClusterManagementAddOn(
}

// Add default platform configs
if r.cr.Spec.Capabilities.Platform != nil {
if r.cr.Spec.Capabilities != nil && r.cr.Spec.Capabilities.Platform != nil {
if r.cr.Spec.Capabilities.Platform.Logs.Collection.Enabled {
cma.Spec.SupportedConfigs = append(cma.Spec.SupportedConfigs, addonapiv1alpha1.ConfigMeta{
ConfigGroupResource: addonapiv1alpha1.ConfigGroupResource{
Expand Down Expand Up @@ -234,7 +234,7 @@ func (r *MCORenderer) renderClusterManagementAddOn(

}

if r.cr.Spec.Capabilities.UserWorkloads != nil {
if r.cr.Spec.Capabilities != nil && r.cr.Spec.Capabilities.UserWorkloads != nil {
if r.cr.Spec.Capabilities.UserWorkloads.Metrics.Collection.Enabled {
cma.Spec.SupportedConfigs = append(cma.Spec.SupportedConfigs, addonapiv1alpha1.ConfigMeta{
ConfigGroupResource: addonapiv1alpha1.ConfigGroupResource{
Expand Down

0 comments on commit b3545a0

Please sign in to comment.