Files
im_server/deploy/argocd/im-server-test

im-server-test ArgoCD patch

The live StatefulSet is owned by the ArgoCD Application im-server-test. Copy statefulset-performance-patch.yaml into that application's Git source and reference it from the test overlay:

patches:
  - path: statefulset-performance-patch.yaml

Also include backend-debug-metrics-rbac.yaml as a resource in the test overlay. It grants the existing argocd/backend-debug service account namespaced read access to Pod metrics so the load-test collector can run kubectl top pods -n im-server-system:

resources:
  - backend-debug-metrics-rbac.yaml

After ArgoCD sync, verify the effective configuration:

kubectl -n im-server-system get statefulset im-server -o jsonpath='{.spec.template.spec.containers[0].resources}'
kubectl -n im-server-system get statefulset im-server -o jsonpath='{.spec.template.spec.containers[0].livenessProbe.httpGet.path}'
kubectl -n im-server-system get statefulset im-server -o jsonpath='{.spec.template.spec.containers[0].env}'
kubectl auth can-i list pods.metrics.k8s.io \
  --as=system:serviceaccount:argocd:backend-debug \
  -n im-server-system

Expected values are requests 1 CPU / 512Mi, limits 2 CPU / 1Gi, and liveness path /livez. The MySQL pool environment must be MYSQL_MAX_OPEN_CONNS=24, MYSQL_MAX_IDLE_CONNS=8, MYSQL_REGISTRY_MAX_OPEN_CONNS=4, and MYSQL_REGISTRY_MAX_IDLE_CONNS=2. The application repository's deploy workflow waits for reconciliation and fails if ArgoCD restores different values.