Per the below documentation link, there are ways to override UMA autoattach configuration through annotations.
What annotation should we use for overriding available memory threshold?
Release : SAAS
Component : Integration with APM
Annotations are defined at the Kubernetes Object (Pod, Deployment , Node etc ) level
key
|
Default Value
|
Description
|
---|---|---|
ca.broadcom.com/ca.apm.monitoring.enabled |
true
|
Determine if APM Monitoring is turned on or off . Entire APM monitoring will be turned off if this is set to "false" |
ca.broadcom.com/autoattach.enabled |
In whitelist mode, this needs to be set true to enable monitoring. Without this, no Pods will be monitored In blacklist mode, this needs to be set false to skip monitoring. Without this, all Pods will be monitored |
For Memory:
Enable/add the env "apmenv_autoattach_free_memory_threshold" in the uma yaml and set the value lesser than 50 and redeploy UMA.
To avoid redeploying UMA, this property can be set as annotation on the user application pod or application deployment or application namespace and this doesn't require any restart of UMA or user application.
Annotating the application namespace or deployment will apply the new property on all pods in the namespace or pods of the deployment.
(note there can be some delay of max 5-6 min on UMA side in reading this annotation from the cluster and in applying the new property settings)
ca.broadcom.com/autoattach.java.attach.overrides: autoattach.free.memory.threshold=20
e.g:
kubectl annotate pod pod-12345-abcd ca.broadcom.com/autoattach.java.attach.overrides=autoattach.free.memory.threshold=20 -n appns
For openshift:
oc annotate pod pod-12345-abcd ca.broadcom.com/autoattach.java.attach.overrides=autoattach.free.memory.threshold=20 -n appns