From 3ae7ad24beed85373a735ca28e16d20d5c979b97 Mon Sep 17 00:00:00 2001 From: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:08:01 -0500 Subject: [PATCH] Document `resourceRequirements` add-on configuration ref: https://issues.redhat.com/browse/ACM-18034 Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com> --- add-ons/addon_overview.adoc | 2 +- ...ions_addons.adoc => configure_addons.adoc} | 26 +++++++++++++++---- add-ons/main.adoc | 2 +- .../cluster_lifecycle/adv_config_cluster.adoc | 2 +- clusters/release_notes/mce_known_issues.adoc | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) rename add-ons/{configure_nodeselector_tolerations_addons.adoc => configure_addons.adoc} (71%) diff --git a/add-ons/addon_overview.adoc b/add-ons/addon_overview.adoc index 7bd81f8f7d..5abdc11ba2 100644 --- a/add-ons/addon_overview.adoc +++ b/add-ons/addon_overview.adoc @@ -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] diff --git a/add-ons/configure_nodeselector_tolerations_addons.adoc b/add-ons/configure_addons.adoc similarity index 71% rename from add-ons/configure_nodeselector_tolerations_addons.adoc rename to add-ons/configure_addons.adoc index c82fb3d294..d2e35fce13 100644 --- a/add-ons/configure_nodeselector_tolerations_addons.adoc +++ b/add-ons/configure_addons.adoc @@ -1,7 +1,7 @@ -[#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 @@ -9,7 +9,6 @@ In {acm-short}, you can configure nodeSelector and tolerations for the following * config-policy-controller * governance-policy-framework * hypershift-addon -* iam-policy-controller * managed-serviceaccount * observability-controller * search-collector @@ -17,9 +16,16 @@ In {acm-short}, you can configure nodeSelector and tolerations for the following * 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: + @@ -34,12 +40,22 @@ spec: nodePlacement: nodeSelector: node-selector <3> tolerations: tolerations <4> + resourceRequirements: <5> + - containerID: "::" <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 `` with the kind of workload, like "deployment". Replace `` with the name of the workload. Replace `` 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: + diff --git a/add-ons/main.adoc b/add-ons/main.adoc index 10542d8182..29b8998fa7 100644 --- a/add-ons/main.adoc +++ b/add-ons/main.adoc @@ -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] \ No newline at end of file diff --git a/clusters/cluster_lifecycle/adv_config_cluster.adoc b/clusters/cluster_lifecycle/adv_config_cluster.adoc index a0d323804f..358411e71f 100644 --- a/clusters/cluster_lifecycle/adv_config_cluster.adoc +++ b/clusters/cluster_lifecycle/adv_config_cluster.adoc @@ -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) diff --git a/clusters/release_notes/mce_known_issues.adoc b/clusters/release_notes/mce_known_issues.adoc index 92343f722f..0b6ddd81d4 100644 --- a/clusters/release_notes/mce_known_issues.adoc +++ b/clusters/release_notes/mce_known_issues.adoc @@ -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