Monitoring user workload in a disconnected environment
When the --enable-uwm-telemetry-remote-write option is enabled, user workload monitoring is enabled and it can remotely write telemetry metrics from control planes.
Resolving user workload monitoring issues
If you installed multicluster engine Operator on OpenShift Container Platform clusters that are not connected to the internet, when you try to run the user workload monitoring feature, it might fail with an error.
For example, when you try to run the user workload monitoring feature by entering the following command, it fails with an error:
$ oc get events -n hypershiftLAST SEEN TYPE REASON OBJECT MESSAGE
4m46s Warning ReconcileError deployment/operator Failed to ensure UWM telemetry remote write: cannot get telemeter client secret: Secret "telemeter-client" not foundTo resolve the error, you must disable the user workload monitoring option by creating a config map in the local-cluster namespace. You can create the config map either before or after you enable the add-on. The add-on agent reconfigures the HyperShift Operator.
Procedure
- Create the following config map:yaml
kind: ConfigMap apiVersion: v1 metadata: name: hypershift-operator-install-flags namespace: local-cluster data: installFlagsToAdd: "" installFlagsToRemove: "--enable-uwm-telemetry-remote-write" - Apply the config map by running the following command:terminal
$ oc apply -f <filename>.yaml
Verifying the status of the hosted control plane feature
The hosted control plane feature is enabled by default. However, if you are not sure that it is enabled, you can run a command to verify its status.
Procedure
- If the feature is disabled and you want to enable it, enter the following command. Replace
<multiclusterengine>with the name of your multicluster engine Operator instance:terminal$ oc patch mce <multiclusterengine> --type=merge -p \ '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}'When you enable the feature, the
hypershift-addonmanaged cluster add-on is installed in thelocal-clustermanaged cluster, and the add-on agent installs the HyperShift Operator on the multicluster engine Operator hub cluster. - Confirm that the
hypershift-addonmanaged cluster add-on is installed by entering the following command:terminal$ oc get managedclusteraddons -n local-cluster hypershift-addonExample outputNAME AVAILABLE DEGRADED PROGRESSING hypershift-addon True False - To avoid a timeout during this process, enter the following commands:
- To avoid a timeout when the condition is
Degraded, enter the following command:terminal$ oc wait --for=condition=Degraded=True managedclusteraddons/hypershift-addon \ -n local-cluster --timeout=5m - To avoid a timeout when the condition is
Available, enter the following command:terminal$ oc wait --for=condition=Available=True managedclusteraddons/hypershift-addon \ -n local-cluster --timeout=5mWhen the process is complete, the
hypershift-addonmanaged cluster add-on and the HyperShift Operator are installed, and thelocal-clustermanaged cluster is available to host and manage hosted clusters.
- To avoid a timeout when the condition is
Configuring the hypershift-addon managed cluster add-on to run on an infrastructure node
By default, no node placement preference is specified for the hypershift-addon managed cluster add-on. Consider running the add-ons on the infrastructure nodes, because by doing so, you can prevent incurring billing costs against subscription counts and separate maintenance and management tasks.
Procedure
- Log in to the hub cluster.
- Open the
hypershift-addon-deploy-configadd-on deployment configuration specification for editing by entering the following command:terminal$ oc edit addondeploymentconfig hypershift-addon-deploy-config \ -n multicluster-engine - Add the
nodePlacementfield to the specification, as shown in the following example:yamlapiVersion: addon.open-cluster-management.io/v1alpha1 kind: AddOnDeploymentConfig metadata: name: hypershift-addon-deploy-config namespace: multicluster-engine spec: nodePlacement: nodeSelector: node-role.kubernetes.io/infra: "" tolerations: - effect: NoSchedule key: node-role.kubernetes.io/infra operator: Exists - Save the changes. The
hypershift-addonmanaged cluster add-on is deployed on an infrastructure node for new and existing managed clusters.