Native Scheduler: Application Container Log Storage and Rotation


#1

The replicated-operator streams logs from running application containers to /var/lib/replicated-operator/logs. This may be disabled for any container.

The operator respects the following limits by performing log rotation whenever a new file is added to the log storage directory.

  • Individual files have a size limit of 16MB. The operator will create a new file under /var/lib/replicated-operator/logs and continue streaming the container logs there once this limit is reached.
  • Each container has a limit of 10 files in /var/lib/replicated-operator/logs. When this limit is reached the oldest file for the container will be deleted. This can be configured with the APP_LOG_MAX_FILES_PER_CONTAINER env var in /etc/default/replicated-operator or /etc/sysconfig/replicated-operator.
  • The entire logs directory has a limit of 500MB. When this limit is reached the oldest files will be deleted. Use the APP_LOG_SIZE env var to configure.