Hot reload configuration changes

The Akamai Distribution of the OpenTelemetry Collector for Akamai Cloud Pulse (the collector) supports hot-reloading of its configuration using signals such as SIGHUP. Hot reloading allows configuration updates to be applied without stopping and restarting the collector, minimizing service disruption in production environments.

Before applying configuration changes, validate the updated configuration to ensure it’s valid. Applying an invalid configuration may cause configuration errors or prevent the collector from operating as expected.

Step 1: Validate configuration changes

Before reloading the collector, validate the updated configuration file.

Run the following command:

./aclp-collector_v<binary-version>\_linux_amd64 validate --config=\<path/to/config.yaml>

If the configuration is valid, the command completes successfully. If issues are detected, the validation command reports them so they can be corrected before the updated configuration is applied.

After the configuration has been validated and the collector is running, apply the updated configuration using a SIGHUP signal. The procedure differs depending on the deployment method: Linux binary, Docker file, or Helm chart.

Step 2: Hot reload

Follow the hot reload instructions for the appropriate collector deployment method.

Hot reload in binary mode

  1. Update the collector configuration file.

  2. Find the process ID (PID) of the running collector:

    ps aux | grep aclp-collector_v<binary-version>\_linux_amd64
  3. Send a SIGHUP signal to the collector process:

    kill -HUP <collector-pid>

The collector reloads the updated configuration without requiring a restart.

Hot reload in Docker

  1. Update the collector configuration file.

  2. Send a SIGHUP signal to the running container:

    docker kill --signal=SIGHUP <container-name>

    The collector reloads the updated configuration without requiring a restart.

Hot reload in Kubernetes

  1. Update the collector configuration file.

  2. Retrieve the running pods:

    kubectl get pods
  3. Inspect the collector process running inside the pod and identify the process ID (PID):

    kubectl exec -it <pod-name> -n <namespace> -- sh
    > ps aux | grep aclp-collector
    > exit
  4. Update and apply the ConfigMap:

    kubectl create configmap <configmap-name> --from-file=config.yaml=config.yaml -o yaml --dry-run=client | 
    kubectl apply -f -
  5. Send a SIGHUP signal to the collector process:

    kubectl exec -n <namespace> <pod-name> -- kill -HUP <pid>