Skip to content

Commit

Permalink
Document resourceRequirements add-on configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaiducek committed Feb 20, 2025
1 parent 4d12f4d commit 3ae7ad2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion add-ons/addon_overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
With {acm} klusterlet add-ons, you can further configure your managed clusters to improve performance and add functionality to your applications. See the following enablement options:

* xref:../add-ons/klusterlet_managed.adoc#add-ons-klusterlet[Enabling klusterlet add-ons on clusters for cluster management]
* xref:../add-ons/configure_nodeselector_tolerations_addons.adoc#configure-nodeselector-tolerations-addons[Configuring nodeSelectors and tolerations for klusterlet add-ons]
* xref:../add-ons/configure_addons.adoc#configure-addons[Configuring klusterlet add-ons]
* xref:../add-ons/cluster_wide_proxy.adoc#enable-cluster-wide-proxy-addon[Enabling cluster-wide proxy on existing cluster add-ons]
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
[#configure-nodeselector-tolerations-addons]
= Configuring nodeSelectors and tolerations for klusterlet add-ons
[#configure-addons]
= Configuring klusterlet add-ons

In {acm-short}, you can configure nodeSelector and tolerations for the following klusterlet add-ons:
In {acm-short}, you can configure the following klusterlet add-ons:

* application-manager
* cert-policy-controller
* cluster-proxy
* config-policy-controller
* governance-policy-framework
* hypershift-addon
* iam-policy-controller
* managed-serviceaccount
* observability-controller
* search-collector
* submariner
* volsync
* work-manager
// This note only applies to ACM 2.13 and should be removed in ACM 2.14.
*NOTE:* Configuring `resourceRequirements` is only available for the following add-ons:

* cert-policy-controller
* config-policy-controller
* governance-policy-framework
Complete the following steps:

. Use the `AddonDeploymentConfig` API to create a configuration to specify the `nodeSelector` and `tolerations` on a certain namespace on the hub cluster.
. Use the `AddonDeploymentConfig` API to create an add-on configuration in any namespace on the hub cluster.

. Create a file named `addondeploymentconfig.yaml` that is based on the following template:
+
Expand All @@ -34,12 +40,22 @@ spec:
nodePlacement:
nodeSelector: node-selector <3>
tolerations: tolerations <4>
resourceRequirements: <5>
- containerID: "<workload-kind>:<workload-name>:<container-name>" <6>
resources:
requests:
memory: 75Mi
limits:
memory: 150Mi
----
+
<1> Replace `config-name` with the name of the `AddonDeploymentConfig` that you just created.
<2> Replace `config-namespace` with the namespace of the `AddonDeploymentConfig` that you just created.
<3> Replace `node-selector` with your node selector.
<4> Replace `tolerations` with your tolerations.
// The note here only applies to ACM 2.13 and should be removed in ACM 2.14.
<5> (*NOTE:* Configuring `resourceRequirements` is only available for policy add-ons.) List resource requirements here to override the `resources` of the add-on workload containers. If an add-on container matches more than one of the items in the list, the last matching configuration is applied.
<6> Replace `<workload-kind>` with the kind of workload, like "deployment". Replace `<workload-name>` with the name of the workload. Replace `<container-name>` with the name of the container. For any of these values, a `*` wildcard can be used to apply the configuration to all objects managed by the add-on. For example, `*:*:*` would apply to every container of every workload kind in any add-on to which this configuration is attached.
+
A completed `AddOnDeployment` file might resemble the following example:
+
Expand Down
2 changes: 1 addition & 1 deletion add-ons/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ include::modules/common-attributes.adoc[]

include::addon_overview.adoc[leveloffset=+1]
include::klusterlet_managed.adoc[leveloffset=+2]
include::configure_nodeselector_tolerations_addons.adoc[leveloffset=+2]
include::configure_addons.adoc[leveloffset=+2]
include::cluster_wide_proxy.adoc[leveloffset=+2]
2 changes: 1 addition & 1 deletion clusters/cluster_lifecycle/adv_config_cluster.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ metadata:
open-cluster-management/tolerations: '[{"key":"dedicated","operator":"Equal","value":"acm","effect":"NoSchedule"}]'
----

. To make sure your content is deployed to the correct nodes, complete the steps in link:../../add-ons/configure_nodeselector_tolerations_addons.adoc#configure-nodeselector-tolerations-addons[Configuring nodeSelectors and tolerations for klusterlet add-ons].
. To make sure your content is deployed to the correct nodes, complete the steps in link:../../add-ons/configure_addons.adoc#configure-addons[Configuring klusterlet add-ons].

[#custom-server-url-ca]
== Customizing the server URL and CA bundle of the hub cluster API server when importing a managed cluster (Technology Preview)
Expand Down
2 changes: 1 addition & 1 deletion clusters/release_notes/mce_known_issues.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ If the `managed-serviceaccount` add-on is required, you can work around the issu

. Update the `managed-serviceaccount` `ManagedClusterAddon` in the local cluster namespace to use the `addonDeploymentConfig` custom resource you created.

See link:../../add-ons/configure_nodeselector_tolerations_addons.adoc#configure-nodeselector-tolerations-addons[Configuring nodeSelectors and tolerations for klusterlet add-ons] to learn more about how to use the `addonDeploymentConfig` custom resource to configure `tolerations` and `nodeSelector` for add-ons.
See link:../../add-ons/configure_addons.adoc#configure-addons[Configuring klusterlet add-ons] to learn more about how to use the `addonDeploymentConfig` custom resource to configure `tolerations` and `nodeSelector` for add-ons.

[#nodes-shut-down-bmh]
=== Nodes shut down after removing `BareMetalHost` resource
Expand Down

0 comments on commit 3ae7ad2

Please sign in to comment.