Configure multiple Contrail API workers¶
Available since MOSK 21.5 TechPreview
Starting from the MOSK 21.5 release, six workers of the
contrail-api
service are used by default on the Tungsten Fabric
MOSK deployments. In the previous MOSK
releases, only one worker of this service was used. If required, you can
change the default configuration using the instruction below.
To configure the number of Contrail API workers on a TF deployment:
Specify the required number of workers in the
CONFIG_API_WORKER_COUNT
environment variable in theTFOperator
custom resource (CR):spec: controllers: tf-config: api: containers: - env: - name: CONFIG_API_WORKER_COUNT value: "7" name: api
Wait until all
tf-config-*
pods are restarted.Verify the number of workers inside the running API container:
kubectl -n tf exec -ti tf-config-rclzq -c api -- ps aux --width 500 kubectl -n tf exec -ti tf-config-rclzq -c api -- ls /etc/contrail/
Verify that the ps output lists one API process with PID
"1"
and the number of workers set in theTFOperator
CR.In
/etc/contrail/
, verify that the number of configuration filescontrail-api-X.conf
matches the number of workers set in theTFOperator
CR.