|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * hosted_control_planes/hcp-prepare/hcp-override-resource-util.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="hcp-override_{context}"] |
| 7 | += Overriding resource utilization measurements for a hosted cluster |
| 8 | + |
| 9 | +You can override the resource utilization measurements based on the type and pace of your cluster workload. Complete the following steps: |
| 10 | + |
| 11 | +.Procedure |
| 12 | + |
| 13 | +. Create the `ConfigMap` resource by running the following command: |
| 14 | ++ |
| 15 | +[source,terminal] |
| 16 | +---- |
| 17 | +$ oc create -f <your-config-map-file.yaml> |
| 18 | +---- |
| 19 | ++ |
| 20 | +Replace `<your-config-map-file.yaml>` with the name of your YAML file that contains your `hcp-sizing-baseline` config map. |
| 21 | + |
| 22 | +. Create the `hcp-sizing-baseline` config map in the `local-cluster` namespace to specify the measurements you want to override. Your config map might resemble the following YAML file: |
| 23 | ++ |
| 24 | +[source,yaml] |
| 25 | +---- |
| 26 | +kind: ConfigMap |
| 27 | +apiVersion: v1 |
| 28 | +metadata: |
| 29 | + name: hcp-sizing-baseline |
| 30 | + namespace: local-cluster |
| 31 | +data: |
| 32 | + incrementalCPUUsagePer1KQPS: "9.0" |
| 33 | + memoryRequestPerHCP: "18" |
| 34 | + minimumQPSPerHCP: "50.0" |
| 35 | +---- |
| 36 | + |
| 37 | +. Delete the `hypershift-addon-agent` deployment to restart the `hypershift-addon-agent` pod by running the following command: |
| 38 | ++ |
| 39 | +[source,terminal] |
| 40 | +---- |
| 41 | +$ oc delete deployment hypershift-addon-agent -n open-cluster-management-agent-addon |
| 42 | +---- |
| 43 | + |
| 44 | +.Verification |
| 45 | + |
| 46 | +* Observe the `hypershift-addon-agent` pod logs. Verify that the overridden measurements are updated in the config map by running the following command: |
| 47 | ++ |
| 48 | +[source,terminal] |
| 49 | +---- |
| 50 | +$ oc logs hypershift-addon-agent -n open-cluster-management-agent-addon |
| 51 | +---- |
| 52 | ++ |
| 53 | +Your logs might resemble the following output: |
| 54 | ++ |
| 55 | +.Example output |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +2024-01-05T19:41:05.392Z INFO agent.agent-reconciler agent/agent.go:793 setting cpuRequestPerHCP to 5 |
| 59 | +2024-01-05T19:41:05.392Z INFO agent.agent-reconciler agent/agent.go:802 setting memoryRequestPerHCP to 18 |
| 60 | +2024-01-05T19:53:54.070Z INFO agent.agent-reconciler agent/hcp_capacity_calculation.go:141 The worker nodes have 12.000000 vCPUs |
| 61 | +2024-01-05T19:53:54.070Z INFO agent.agent-reconciler agent/hcp_capacity_calculation.go:142 The worker nodes have 49.173369 GB memory |
| 62 | +---- |
| 63 | ++ |
| 64 | +If the overridden measurements are not updated properly in the `hcp-sizing-baseline` config map, you might see the following error message in the `hypershift-addon-agent` pod logs: |
| 65 | ++ |
| 66 | +.Example error |
| 67 | +[source,terminal] |
| 68 | +---- |
| 69 | +2024-01-05T19:53:54.052Z ERROR agent.agent-reconciler agent/agent.go:788 failed to get configmap from the hub. Setting the HCP sizing baseline with default values. {"error": "configmaps \"hcp-sizing-baseline\" not found"} |
| 70 | +---- |
0 commit comments