Este conteúdo não está disponível no idioma selecionado.
Chapter 1. Add-ons overview
Red Hat Advanced Cluster Management for Kubernetes add-ons can improve some areas of performance and add functionality to enhance your applications. The following sections provide a summary of the add-ons that are available for Red Hat Advanced Cluster Management:
1.1. Enabling klusterlet add-ons on clusters for cluster management
After you install Red Hat Advanced Cluster Management for Kubernetes and then create or import clusters with multicluster engine operator you can enable the klusterlet add-ons for those managed clusters. The klusterlet add-ons are not enabled by default if you created or imported clusters unless you create or import with the Red Hat Advanced Cluster Management console. See the following available klusterlet add-ons:
- application-manager
- cert-policy-controller
- config-policy-controller
- iam-policy-controller
- governance-policy-framework
- search-collector
Complete the following steps to enable the klusterlet add-ons for the managed clusters after Red Hat Advanced Cluster Management is installed:
- Create a YAML file that is similar to the following - KlusterletAddonConfig, with the- specvalue that represents the add-ons:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Thepolicy-controlleradd-on is divided into two add-ons: Thegovernance-policy-frameworkand theconfig-policy-controller. As a result, thepolicyControllercontrols thegovernance-policy-frameworkand theconfig-policy-controllermanagedClusterAddons.
 
- 
						Save the file as klusterlet-addon-config.yaml.
- Apply the YAML by running the following command on the hub cluster: - oc apply -f klusterlet-addon-config.yaml - oc apply -f klusterlet-addon-config.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To verify whether the enabled - managedClusterAddonsare created after the- KlusterletAddonConfigis created, run the following command:- oc get managedclusteraddons -n <cluster namespace> - oc get managedclusteraddons -n <cluster namespace>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
1.2. Configuring nodeSelectors and tolerations for klusterlet add-ons
In Red Hat Advanced Cluster Management, you can configure nodeSelector and tolerations for 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
Complete the following steps:
- 
						Use the AddonDeploymentConfigAPI to create a configuration to specify thenodeSelectorandtolerationsin the namespace that you used for your Red Hat Advanced Cluster Management installation.
- Create a file named - addondeploymentconfig.yamlthat is based on the following template:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - A completed - AddOnDeploymentfile might resemble the following example:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Run the following command to apply the file that you created: - oc apply -f addondeploymentconfig - oc apply -f addondeploymentconfig- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Use the configuration that you created as the global default configuration for your add-on by running the following command: - oc patch clustermanagementaddons <addon-name> --type='json' -p='[{"op":"add", "path":"/spec/supportedConfigs", "value":[{"group":"addon.open-cluster-management.io","resource":"addondeploymentconfigs", "defaultConfig":{"name":"deploy-config","namespace":"open-cluster-management-hub"}}]}]'- oc patch clustermanagementaddons <addon-name> --type='json' -p='[{"op":"add", "path":"/spec/supportedConfigs", "value":[{"group":"addon.open-cluster-management.io","resource":"addondeploymentconfigs", "defaultConfig":{"name":"deploy-config","namespace":"open-cluster-management-hub"}}]}]'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 
								Replace addon-namewith your add-on name.
- 
								Replace config-namewith the name of theAddonDeploymentConfigthat you just created.
- 
								Replace config-namespacewith the namespace of theAddonDeploymentConfigthat you just created.
 
- 
								Replace 
				The nodeSelector and tolerations that you specified are applied to all of your add-on on each of the managed clusters.
			
				You can also override the global default AddonDeploymentConfig configuration for your add-on on a certain managed cluster by using following steps:
			
- 
						Use the AddonDeploymentConfigAPI to create another configuration to specify thenodeSelectorandtolerationson the hub cluster.
- Link the new configuration that you created to your add-on - ManagedClusterAddonon a managed cluster.- oc -n <managed-cluster> patch managedclusteraddons <addon-name> --type='json' -p='[{"op":"add", "path":"/spec/configs", "value":[ {"group":"addon.open-cluster-management.io","resource":"addondeploymentconfigs","namespace":"<config-namespace>","name":"<config-name>"} ]}]'- oc -n <managed-cluster> patch managedclusteraddons <addon-name> --type='json' -p='[{"op":"add", "path":"/spec/configs", "value":[ {"group":"addon.open-cluster-management.io","resource":"addondeploymentconfigs","namespace":"<config-namespace>","name":"<config-name>"} ]}]'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 
								Replace managed-clusterwith your managed cluster name
- 
								Replace addon-namewith your add-on name
- 
								Replace config-namespacewith the namespace of theAddonDeploymentConfigthat you just created
- 
								Replace config-namewith the name of theAddonDeploymentConfigthat you just created
 
- 
								Replace 
				The new configuration that you referenced in the add-on ManagedClusterAddon overrides the global default configuration that you previously defined in the ClusterManagementAddon add-on.
			
1.3. Enabling cluster-wide proxy on existing cluster add-ons
				You can configure the KlusterletAddonConfig in the cluster namespace to add the proxy environment variables to all the klusterlet add-on pods of the managed Red Hat OpenShift Container Platform clusters. Complete the following steps to configure the KlusterletAddonConfig to add the three environment variables to the pods of the klusterlet add-ons:
			
- Edit the - KlusterletAddonConfigfile that is in the namespace of the cluster that needs the proxy. You can use the console to find the resource, or you can edit from the terminal with the following command:- oc -n <my-cluster-name> edit klusterletaddonconfig <my-cluster-name> - oc -n <my-cluster-name> edit klusterletaddonconfig <my-cluster-name>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Note: If you are working with only one cluster, you do not need - <my-cluster-name>at the end of your command. See the following command:- oc -n <my-cluster-name> edit klusterletaddonconfig - oc -n <my-cluster-name> edit klusterletaddonconfig- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Edit the - .spec.proxyConfigsection of the file so it resembles the following example. The- spec.proxyConfigis an optional section:- spec proxyConfig: httpProxy: "<proxy_not_secure>" httpsProxy: "<proxy_secure>" noProxy: "<no_proxy>"- spec proxyConfig: httpProxy: "<proxy_not_secure>"- 1 - httpsProxy: "<proxy_secure>"- 2 - noProxy: "<no_proxy>"- 3 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Replaceproxy_not_securewith the address of the proxy server forhttprequests. For example, usehttp://192.168.123.145:3128.
- 2
- Replaceproxy_securewith the address of the proxy server forhttpsrequests. For example, usehttps://192.168.123.145:3128.
- 3
- Replaceno_proxywith a comma delimited list of IP addresses, hostnames, and domain names where traffic is not routed through the proxy. For example, use.cluster.local,.svc,10.128.0.0/14,example.com.
 - If the OpenShift Container Platform cluster is created with cluster wide proxy configured on the hub cluster, the cluster wide proxy configuration values are added to the pods of the klusterlet add-ons as environment variables when the following conditions are met: - 
								The .spec.policyController.proxyPolicyin theaddonsection is enabled and set toOCPGlobalProxy.
- The - .spec.applicationManager.proxyPolicyis enabled and set to- CustomProxy.- Note: The default value of - proxyPolicyin the- addonsection is- Disabled.- See the following examples of - proxyPolicyentries:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
Important: Global proxy settings do not impact alert forwarding. To set up alert forwarding for Red Hat Advanced Cluster Management hub clusters with a cluster-wide proxy, see Forwarding alerts for more details.