Skip to content

Orkes-conductor-community helm installation nginx access log management #199

@bijay-shah

Description

@bijay-shah

Is your feature request related to a problem? Please describe.
The nginx access log is enabled by default which writes to /var/log/nginx/access.log. The problem is logrotate/cron binary is absent in the container as well as the default nginx logrotate config seems invalid.

/etc/logrotate.d # cat nginx 
/var/log/nginx/*.log {
        missingok
        sharedscripts
        postrotate
                /etc/init.d/nginx --quiet --ifstarted reopen -> This nginx binary does not exist.
        endscript
}

This causes the log the grow exponentially and pod is evicted once it reaches threshold and even might cause disk pressure issues in nodes itself. I saw the access.log grow to 27gb in just few weeks.

Describe the solution you'd like

  • First, real solution is to update the image so that log rotation works for the nginx logs.
  • Second, straight forward solution is to allow the access logging to be disabled from helm values file in case one does not need the logging.

Describe alternatives you've considered
For now we are using a manual patch to disable the access logging before startup script run as follows.

kubectl -n $namespace patch deployment $deployment_name --type='json' -p='[
  {
    "op": "replace",
    "path": "/spec/template/spec/containers/0/args",
    "value": ["-c", "sed -i \"s|access_log.*|access_log off;|\" /etc/nginx/nginx.conf && /app/startup.sh"]
  }
]

Additional context
Tested in latest tag : 1.1.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions