Resource ratio updates in UMA deployment
search cancel

Resource ratio updates in UMA deployment

book

Article ID: 452346

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

We have several pods in our Dev OpenShift cluster that keep crashing due to resource limits / requests.
Example:

ReplicaSet
Generated from replicaset-controller
Error creating: pods is forbidden: [cpu max limit to request ratio per Container is 4, but provided ratio is 10.000000, memory max limit to request ratio per Container is 2, but provided ratio is 10.000000]

This appears to have been caused the the UMA autoattach (logs attached).

Where in the deployment can we make the adjustments, and would using the below values cause an issue with the UMA?

Compliant values:
 
  • CPU: request  25m , limit  100m  → ratio = 4x (at max allowed)
  • Memory: request  50Mi , limit  100Mi  → ratio = 2x (at max allowed)

Resolution

 modify the caaiops-probe-autoattach-configmap for this sidecar contianer.

  1. java-sidecarconfig.yaml

  2. mule-sidecarconfig.yaml

  3. nginx-sidecarconfig.yaml

4.nodejs-sidecarconfig.yaml

  1. php-sidecarconfig.yaml

Ex: nodejs-sidecarconfig.yaml. Highlighted the portion that needs to be changed.

nodejs-sidecarconfig.yaml: |
containers:

  • name: nodejs-probe-autoattach
    image: example.example.com/ca-uma-agent:26.1.1.35
    imagePullPolicy: IfNotPresent
    command: ["sh", "-c", "/nodeprobe/probe-init-script.sh"]
    resources:
    requests:
    memory: 50Mi
    cpu: 25m
    limits: {Modified this section to satisfy the LimitRange constaring of 4:2 for cpu and memory}
    memory: 100Mi
    cpu: 100m
    volumeMounts:

    • name: probe-shared-files
      mountPath: /nodejs-probe
  • name: application-container
    env:

    • name: COLLECTOR_AGENT_HOST
      valueFrom:
      fieldRef:
      fieldPath: spec.nodeName

    • name: COLLECTOR_AGENT_PORT
      value: "5005"

    • name: CA_APM_PROBENAME
      valueFrom:
      fieldRef:
      fieldPath: metadata.name

    • name: CA_APM_APPNAME
      valueFrom:
      fieldRef:
      fieldPath: metadata.name

    • name: LOG_ENABLE_CONSOLE_MODE
      value: "enabled"

    • name: apmenv_introscope_agent_pod_namespace
      valueFrom:
      fieldRef:
      fieldPath: metadata.namespace

    • name: apmenv_introscope_agent_pod_name
      valueFrom:
      fieldRef:
      fieldPath: metadata.name

    • name: apmenv_introscope_agent_pod_ipaddress
      valueFrom:
      fieldRef:
      fieldPath: status.podIP

    • name: NODE_OPTIONS
      value: "-r /nodejs-probe/nodeprobe/node_modules/ca-apm-probe/bin/nodejs-instrumentation.js"

    resources:
    requests:
    memory: 50Mi
    cpu: 25m
    limits: {Modified this section to satisfy the LimitRange constaring of 4:2 for cpu and memory}
    memory: 100Mi
    cpu: 100m
    volumeMounts:

    • name: probe-shared-files
      mountPath: /nodejs-probe

volumes:

  • name: probe-shared-files
    emptyDir: {}