Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle for registryctl access log #20439

Open
Patrick-Clausen opened this issue May 16, 2024 · 0 comments
Open

Toggle for registryctl access log #20439

Patrick-Clausen opened this issue May 16, 2024 · 0 comments

Comments

@Patrick-Clausen
Copy link

Is your feature request related to a problem? Please describe.
I am trying to reduce unneeded logging inside my kubernetes cluster, and one of the offenders is registryctl which emits a log messages any time Kubernetes performs a health check:

IP.IP.IP.IP - - [16/May/2024:12:23:12 +0000] "GET /api/health HTTP/1.1" 200 9
IP.IP.IP.IP - - [16/May/2024:12:23:12 +0000] "GET /api/health HTTP/1.1" 200 9
IP.IP.IP.IP - - [16/May/2024:12:23:19 +0000] "GET /api/health HTTP/1.1" 200 9
IP.IP.IP.IP - - [16/May/2024:12:23:22 +0000] "GET /api/health HTTP/1.1" 200 9

Describe the solution you'd like
A configuration option for registryctl's configuration file to disable the access log:

log:
  accesslog:
    enabled: false
  level: debug

backwards compatible alternative:

log_level: debug
access_log_enabled: false

Describe the main design/architecture of your solution
Upgrade the Configuration model https://github.com/goharbor/harbor/blob/main/src/registryctl/config/config.go#L33 to one of the models above, use boolean to decide whether the LoggingHandler should be added: https://github.com/goharbor/harbor/blob/main/src/registryctl/handlers/handler.go#L40

Describe the development plan you've considered
It seems to be a small change, although I'm unfamiliar with the project, so not sure how relevant it is. I am open to contributing with it myself.

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants