Skip to content
28 changes: 20 additions & 8 deletions search/custom_search_console.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
[#custom-search-console]
== Customizing the search console
[#customize-search-console]
= Customizing the search console

Customize your search results and limits. Complete the following tasks to perform the customization:
Customize your search console to specify how you want data and search results to be displayed.

*Required access:* Cluster administrator
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a RHACM administrator access role? To make these changes user doesn't need full cluster admin. They only need to be admin on the ACM namespaces multicluster-engine and open-cluster-management

Copy link
Contributor Author

@dockerymick dockerymick Dec 15, 2025

Choose a reason for hiding this comment

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

We can specify that, thanks! I am not sure we should mention mce in this file. We do have mce-acm integrations docs tho. Let me get some clarity from Brandi

Copy link
Contributor

Choose a reason for hiding this comment

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

I have not see an ACM admin role, no we normally just writing Cluster administrator. @dockerymick


.Prerequisites

- Are there any prereqs?
Copy link
Contributor

Choose a reason for hiding this comment

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

No prereqs, just ACM installed.



.Procedure

Complete the following tasks to perform the customization:

. Customize the search result limit from the {ocp-short} console.
.. Update the `console-mce-config` in the `multicluster-engine` namespace. These settings apply to all users and might affect performance. View the following performance parameter descriptions:
Expand All @@ -10,15 +21,16 @@ Customize your search results and limits. Complete the following tasks to perfor
- `SEARCH_RESULT_LIMIT` - The maximum amount of search results displayed in the console. Default value is `1000`. To remove this limit set to `-1`.
- `SEARCH_AUTOCOMPLETE_LIMIT` - The maximum number of suggestions retrieved for the search bar typeahead. Default value is `10,000`. To remove this limit set to `-1`.

.. Run the following `patch` command from the {ocp-short} console to change the search result to 100 items:
.. Change the search result to `100` items by running the following `patch` command from the {ocp-short} console:

+
[source,bash]
----
oc patch configmap console-mce-config -n multicluster-engine --type merge -p '{"data":{"SEARCH_RESULT_LIMIT":"100"}}'
----

. To add, edit, or remove suggested searches, create a config map named `console-search-config` and configure the `suggestedSearches` section. Suggested searches that are listed are also displayed from the console. It is required to have an `id, name, and searchText` for each search object. View the following config map example:
. To add, edit, or remove suggested searches, create a config map named `console-search-config` and configure the `suggestedSearches` section. Suggested searches that are listed are also displayed from the console. It is required to have an `id, name, and searchText` for each search object.
.. Add the namespace where search is enabled. View the following config map example:

+
[source,yaml]
Expand All @@ -27,7 +39,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: console-search-config
namespace: <acm-namespace> <1>
namespace: <acm-namespace>
data:
suggestedSearches: |-
[
Expand Down Expand Up @@ -57,5 +69,5 @@ data:
}
]
----
+
<1> Add the namespace where search is enabled.

. Specify your search query by selecting the *Advanced search* drop-down button to filter the _Column_, _Operator_, and _Value_ options or add a search constraint.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this line is out of context here?

127 changes: 127 additions & 0 deletions search/custom_search_service.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
[#customize-search-service]
= Customizing the Search service

Customize the Search service to improve search results. Set up persistent storage, fine-tune for performance and scalability, or modify certain behaviors through environment variables. Access the search configuration options from the search operator which watches the `search-v2-operator` custom resource, reconciles the changes, and updates active pods.
Copy link
Contributor

Choose a reason for hiding this comment

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

Customize the Search service to improve search results.

This statement is a little misleading because search results won't change. Typically users will need configure search to fine-tune to their specific environments or scale needs. The next sentence includes some specific reasons.


.Prerequisites

- Are there any prereqs?
.Procedure

Complete the following steps to customize the Search service:

. Modify the default values in the `search-v2-operator` custom resource.
.. To view details of the custom resource, run the following command:

+
[source,bash]
----
oc get search search-v2-operator -n <acm-namespace> -o yaml
----

.. Configure a persistent volume claim for your clusters that are in production. If the empty directory size is limited for your PostgreSQL database, save your PostgreSQL data on a persistent volume claim to improve search performance.

+
*Notes:*

- When you install {acm-short}, the PostgreSQL database is configured to save the PostgreSQL data in an empty directory (`emptyDir`) volume.
- To receive information-only alerts about search storage, consider setting up the persistent volume claim for search.
Copy link
Contributor

Choose a reason for hiding this comment

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

The alert is generated by us to remind users when the PVC is not configured.

Here's more context about the alert, see the Status section "SearchPVCNotPresent"
Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The image isn't displaying

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

.. To back up your search data, select a storage class from your {acm-short} hub cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. To back up your search data, select a storage class from your {acm-short} hub cluster.
.. To persist the search data, select a storage class from your {acm-short} hub cluster.

There's no backup. The difference is where the data is stored memory vs. persistent volume. The benefit is that memory is volatile and a persistent volume is well "persistent".

.. For example, create a persistent volume claim if you select the `gp2` storageclass and mount the claim to the `search-postgres` pod. Your configuration might resemble the following example:

+
[source,yaml]
----
apiVersion: search.open-cluster-management.io/v1alpha1
kind: Search
metadata:
name: search-v2-operator
namespace: open-cluster-management
labels:
cluster.open-cluster-management.io/backup: ""
spec:
dbStorage:
size: 10Gi
storageClassName: gp2
----

.. Modify the storage size if you need to. By default, the storage size is `10Gi`. For example, `20Gi` might be sufficient for about 200 managed clusters.

. Optimize cost by tuning the pod memory or CPU requirements, replica count, and update log levels for any of the four search pods: `indexer`, `database`, `queryapi`, or `collector`.

.. Update the `deployment` section of the `search-v2-operator` custom resource. There are four deployments managed by the `search-v2-operator`, which can be updated individually.
.. Apply resources for the `indexer`, `database`, `queryapi`, or `collector` pod.
.. Add multiple environment variables in the `envVar` section to specify a value for each variable that you name.
.. Specify a value for each variable that you name by adding multiple environment variables in the `envVar` specification.
.. Add the `- -v=3` argument for the `queryapi` specification to control the log level verbosity for any of the four pods.
Your `search-v2-operator` custom resource might resemble the following file:

+
[source,yaml]
----
apiVersion: search.open-cluster-management.io/v1alpha1
kind: Search
metadata:
name: search-v2-operator
namespace: open-cluster-management
spec:
deployments:
collector:
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
indexer:
replicaCount: 3
database:
envVar:
- name: POSTGRESQL_EFFECTIVE_CACHE_SIZE
value: 1024MB
- name: POSTGRESQL_SHARED_BUFFERS
value: 512MB
- name: WORK_MEM
value: 128MB
queryapi:
arguments:
- -v=3
----

. Apply memory resources for the `indexer` pod. See the following example:

+
[source,yaml]
----
indexer:
resources:
limits:
memory: 5Gi
requests:
memory: 1Gi
----

. Define the node placement for search pods.
.. Update the `Placement` resource of search pods by using the `nodeSelector` parameter, or the `tolerations` parameter. View the following example configuration:

+
[source,yaml]
----
spec:
dbStorage:
size: 10Gi
deployments:
collector: {}
database: {}
indexer: {}
queryapi: {}
nodeSelector:
node-role.kubernetes.io/infra: ""
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/infra
operator: Exists
----
1 change: 1 addition & 0 deletions search/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include::modules/common-attributes.adoc[]
include::search_intro.adoc[leveloffset=+1]
include::search_console.adoc[leveloffset=+2]
include::create_search_collection.adoc[leveloffset=+2]
include::custom_search_service.adoc[leveloffset=+2]
include::custom_search_console.adoc[leveloffset=+2]
include::query_search_console.adoc[leveloffset=+2]
include::search_klusterlet_addon.adoc[leveloffset=+2]
122 changes: 3 additions & 119 deletions search/search_console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

For {acm}, search provides visibility into your Kubernetes resources across all of your clusters. Search also indexes the Kubernetes resources and the relationships to other resources.

* <<search-components,Search components>>
* <<search-customization,Search customization and configurations>>
* <<search-operations,Search operations and data types>>
Search is configured by default on the hub cluster. When you provision or manually import a managed cluster, the `klusterlet-addon-search` is enabled.

[#search-components]
== Search components

The search architecture is composed of the following components:
Expand Down Expand Up @@ -63,120 +60,6 @@ Provides access to all cluster data in the `search-indexer` through GraphQL and
| Stores collected data from all managed clusters in an instance of the PostgreSQL database.
|===

Search is configured by default on the hub cluster. When you provision or manually import a managed cluster, the `klusterlet-addon-search` is enabled. If you want to disable search on your managed cluster, see link:../add-ons/modify_endpoint.adoc#modify-klusterlet-add-ons[Modifying the klusterlet add-ons settings of your cluster] for more information.

[#search-customization]
== Search customization and configurations

You can modify the default values in the `search-v2-operator` custom resource. To view details of the custom resource, run the following command:

[source,bash]
----
oc get search search-v2-operator -o yaml
----

The search operator watches the `search-v2-operator` custom resource, reconciles the changes and updates active pods. View the following descriptions of the configurations:

- PostgreSQL database storage:
+
When you install {acm-short}, the PostgreSQL database is configured to save the PostgreSQL data in an empty directory (`emptyDir`) volume. If the empty directory size is limited, you can save the PostgreSQL data on a Persistent Volume Claim (PVC) to improve search performance. You can select a storageclass from your {acm-short} hub cluster to back up your search data. For example, if you select the `gp2` storageclass your configuration might resemble the following example:

+
[source,yaml]
----
apiVersion: search.open-cluster-management.io/v1alpha1
kind: Search
metadata:
name: search-v2-operator
namespace: open-cluster-management
labels:
cluster.open-cluster-management.io/backup: ""
spec:
dbStorage:
size: 10Gi
storageClassName: gp2
----
+
This configuration creates a PVC named `gp2-search` and is mounted to the `search-postgres` pod. By default, the storage size is `10Gi`. You can modify the storage size. For example, `20Gi` might be sufficient for about 200 managed clusters.

+
- Optimize cost by tuning the pod memory or CPU requirements, replica count, and update log levels for any of the four search pods (`indexer`, `database`, `queryapi`, or `collector` pod). Update the `deployment` section of the `search-v2-operator` custom resource. There are four deployments managed by the `search-v2-operator`, which can be updated individually. Your `search-v2-operator` custom resource might resemble the following file:

+
[source,yaml]
----
apiVersion: search.open-cluster-management.io/v1alpha1
kind: Search
metadata:
name: search-v2-operator
namespace: open-cluster-management
spec:
deployments:
collector:
resources: <1>
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
indexer:
replicaCount: 3
database: <2>
envVar:
- name: POSTGRESQL_EFFECTIVE_CACHE_SIZE
value: 1024MB
- name: POSTGRESQL_SHARED_BUFFERS
value: 512MB
- name: WORK_MEM
value: 128MB
queryapi:
arguments: <3>
- -v=3
----
+
<1> You can apply resources to an `indexer`, `database`, `queryapi`, or `collector` pod.
<2> You can add multiple environment variables in the `envVar` section to specify a value for each variable that you name.
<3> You can control the log level verbosity for any of the previous four pods by adding the `- -v=3` argument.
+
See the following example where memory resources are applied to the indexer pod:
+
[source,yaml]
----
indexer:
resources:
limits:
memory: 5Gi
requests:
memory: 1Gi
----

- You can define the node placement for search pods.
+
You can update the `Placement` resource of search pods by using the `nodeSelector` parameter, or the `tolerations` parameter. View the following example configuration:

+
[source,yaml]
----
spec:
dbStorage:
size: 10Gi
deployments:
collector: {}
database: {}
indexer: {}
queryapi: {}
nodeSelector:
node-role.kubernetes.io/infra: ""
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/infra
operator: Exists
----

- Specify your search query by selecting the *Advanced search* drop-down button to filter the _Column_, _Operator_, and _Value_ options or add a search constraint.

[#search-operations]
== Search operations and data types

Specify your search query by using search operations as conditions. Characters such as `+>, >=, <, <=, !=+` are supported. See the following search operation table:
Expand Down Expand Up @@ -206,7 +89,8 @@ Specify your search query by using search operations as conditions. Characters s
| Partial string match.
|===

[#additional-resources-search]

== Additional resources

- For more topics about the {acm} console, see link:../console/console_intro.adoc#web-console[Web console].
- If you want to disable search on your managed cluster, see link:../add-ons/modify_endpoint.adoc#modify-klusterlet-add-ons[Modifying the klusterlet add-ons settings of your cluster] for more information.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- If you want to disable search on your managed cluster, see link:../add-ons/modify_endpoint.adoc#modify-klusterlet-add-ons[Modifying the klusterlet add-ons settings of your cluster] for more information.
- If you want to disable the Search service on your managed cluster, see link:../add-ons/modify_endpoint.adoc#modify-klusterlet-add-ons[Modifying the klusterlet add-ons settings of your cluster] for more information.

3 changes: 2 additions & 1 deletion search/search_intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Learn about the {acm-short} Search service. Use Search to query resource data fr

* xref:../search/search_console.adoc#search-service[Search service]
* xref:../search/create_search_collection.adoc#create-search-collection[Creating search configurable collection]
* xref:../search/custom_search_console.adoc#custom-search-console[Customizing search]
* xref:../search/custom_search_service.adoc#custom-search-console[Customizing the Search service]
* xref:../search/custom_search_console.adoc#custom-search-console[Customizing the search console]
Copy link
Contributor

Choose a reason for hiding this comment

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

Capitalization inconsistency Search vs. search.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used a capital "s" when referring to the service because we capitalize the names of a feature. If we are simply writing the word "search" as a verb, I use a lowercase "s". Maybe we can say "Customizing the console for Search", since there is not an independent search console.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, it just looks odd when looking at both lines together.
I like "Customizing the console for Search", and as you point out it's also more accurate.

* xref:../search/query_search_console.adoc#query-console[Querying in the console]
* xref:../search/search_klusterlet_addons.adoc#update-klusterlet-search[Updating klusterlet-addon-search deployments]