Help Center/ Application Operations Management/ FAQs (2.0)/ Infrastructure Monitoring/ Why Can't AOM Detect Workloads After the Pod YAML File Is Deployed Using Helm?
Updated on 2025-02-12 GMT+08:00

Why Can't AOM Detect Workloads After the Pod YAML File Is Deployed Using Helm?

Symptom

After a pod is deployed using Helm, AOM cannot find the corresponding workload.

Possible Cause

On the workload page of the CCE console, find the record of the pod deployed using Helm, and compare its YAML file with the YAML file of the pod directly deployed on the CCE console. It is found that the YAML file of the pod deployed using Helm does not contain required environment parameters.

Figure 1 Comparing YAML files

Solution 1

  1. Log in to the CCE console and click a target cluster.
  2. Choose Workloads in the navigation pane, and select the workload (pod deployed using Helm) whose metrics have not been reported to AOM.
  3. Choose More > Edit YAML in the Operation column where the target workload is located.
  4. In the displayed dialog box, locate spec.template.spec.containers.
  5. Add environment parameters to the end of the image field, as shown in Figure 2.

    env:
         - name: PAAS_APP_NAME
           value: XXXXXXXXXXXX
         - name: PAAS_NAMESPACE
           value: XXXXXXXXXX
         - name: PAAS_PROJECT_ID
           value: 2a***********************cf
    • PAAS_APP_NAME: application name, that is, the name of the workload to be deployed.
    • PAAS_NAMESPACE: namespace of the CCE cluster where the workload to be deployed is located. To obtain the namespace, go to the namespace page on the CCE cluster details page.
    • PAAS_PROJECT_ID: project ID of the tenant. To obtain the project ID, see Obtaining the Project ID.

      Replace the values of the preceding environment parameters based on site requirements.

    Figure 2 Adding environment parameters

  6. Click Confirm.

Solution 2

Add the following environment parameters to the YAML file for deploying the pod using Helm and then deploy the pod again.
env:
     - name: PAAS_APP_NAME
       value: XXXXXXXXXXXX
     - name: PAAS_NAMESPACE
       value: XXXXXXXXXX
     - name: PAAS_PROJECT_ID
       value: 2a***********************cf
  • PAAS_APP_NAME: application name, that is, the name of the workload to be deployed.
  • PAAS_NAMESPACE: namespace of the CCE cluster where the workload to be deployed is located. To obtain the namespace, go to the namespace page on the CCE cluster details page.
  • PAAS_PROJECT_ID: project ID of the tenant. To obtain the project ID, see Obtaining the Project ID.

    Replace the values of the preceding environment parameters based on site requirements.

Figure 3 Adding environment parameters