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
15 changes: 14 additions & 1 deletion bundle/manifests/observability.openshift.io_uiplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,21 @@ spec:
- enabled
- thanosQuerier
type: object
clusterHealthAnalyzer:
description: ClusterHealthAnalyzer feature flag enablement
properties:
enabled:
description: Indicates if the cluster-health-analyzer features
should be enabled.
type: boolean
required:
- enabled
type: object
incidents:
description: Incidents feature flag enablement
description: |-
Incidents feature flag enablement

Deprecated: Use clusterHealthAnalyzer instead
properties:
enabled:
description: Indicates if incidents-related feature(s) should
Expand Down
15 changes: 14 additions & 1 deletion deploy/crds/common/observability.openshift.io_uiplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,21 @@ spec:
- enabled
- thanosQuerier
type: object
clusterHealthAnalyzer:
description: ClusterHealthAnalyzer feature flag enablement
properties:
enabled:
description: Indicates if the cluster-health-analyzer features
should be enabled.
type: boolean
required:
- enabled
type: object
incidents:
description: Incidents feature flag enablement
description: |-
Incidents feature flag enablement

Deprecated: Use clusterHealthAnalyzer instead
properties:
enabled:
description: Indicates if incidents-related feature(s) should
Expand Down
40 changes: 39 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5450,11 +5450,20 @@ Monitoring contains configuration for the monitoring console plugin.
ACM points to the alertmanager and thanosQuerier instance services of which it should create a proxy to.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b><a href="#uipluginspecmonitoringclusterhealthanalyzer">clusterHealthAnalyzer</a></b></td>
<td>object</td>
<td>
ClusterHealthAnalyzer feature flag enablement<br/>
</td>
<td>false</td>
</tr><tr>
<td><b><a href="#uipluginspecmonitoringincidents">incidents</a></b></td>
<td>object</td>
<td>
Incidents feature flag enablement<br/>
Incidents feature flag enablement

Deprecated: Use clusterHealthAnalyzer instead<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -5563,13 +5572,42 @@ ThanosQuerier points to the thanos-querier service of which it should create a p
</table>


### UIPlugin.spec.monitoring.clusterHealthAnalyzer
<sup><sup>[↩ Parent](#uipluginspecmonitoring)</sup></sup>



ClusterHealthAnalyzer feature flag enablement

<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody><tr>
<td><b>enabled</b></td>
<td>boolean</td>
<td>
Indicates if the cluster-health-analyzer features should be enabled.<br/>
</td>
<td>true</td>
</tr></tbody>
</table>


### UIPlugin.spec.monitoring.incidents
<sup><sup>[↩ Parent](#uipluginspecmonitoring)</sup></sup>



Incidents feature flag enablement

Deprecated: Use clusterHealthAnalyzer instead

<table>
<thead>
<tr>
Expand Down
15 changes: 15 additions & 0 deletions pkg/apis/uiplugin/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ type MonitoringConfig struct {
// Incidents feature flag enablement
//
// +kubebuilder:validation:Optional
// Deprecated: Use clusterHealthAnalyzer instead
// +deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has the +deprecated marker any meaning? I don't see it mentioned in https://book.kubebuilder.io/reference/markers/crd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not. Definitely not a kubebuilder marker. I thought this is the "official" way in Go, but it's probably not.

Incidents *IncidentsReference `json:"incidents,omitempty"`

// ClusterHealthAnalyzer feature flag enablement
//
// +kubebuilder:validation:Optional
ClusterHealthAnalyzer ClusterHealthAnalyzerReference `json:"clusterHealthAnalyzer,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be a pointer if optional

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this was missed and fixed in the consequent PR.

}

// AdvancedClusterManagementReference is used to configure references to the alertmanager and thanosQuerier that should be used
Expand Down Expand Up @@ -221,6 +228,14 @@ type IncidentsReference struct {
Enabled bool `json:"enabled"`
}

// ClusterHealthAnalyzerReference is used to configure the cluster health analyzer features.
type ClusterHealthAnalyzerReference struct {
// Indicates if the cluster-health-analyzer features should be enabled.
//
// +kubebuilder:validation:Required
Enabled bool `json:"enabled"`
}

// UIPluginSpec is the specification for desired state of UIPlugin.
//
// +kubebuilder:validation:XValidation:rule="self.type == 'TroubleshootingPanel' || !has(self.troubleshootingPanel)", message="Troubleshooting Panel configuration is only supported with the TroubleshootingPanel type"
Expand Down
16 changes: 16 additions & 0 deletions pkg/apis/uiplugin/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.