-
Notifications
You must be signed in to change notification settings - Fork 521
CLOUDP-253916 - readinessProbe: send to stdout as well, give option for compression and reduce default size #1561
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
Conversation
|
|
||
| func initLogger(l *lumberjack.Logger) { | ||
| log := zap.New(zapcore.NewCore( | ||
| consoleCore := zapcore.NewCore( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sending the same information to the console/stdout means that kubectl describe will show if the readinessProbe has failed. This was the prior reason we used panics. Now - no panics are needed for the same level of information.
| zap.DebugLevel) | ||
|
|
||
| cores := []zapcore.Core{consoleCore} | ||
| if config.ReadBoolWitDefault(config.WithAgentFileLogging, "true") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can now also just deactivate the logging to the file
| Filename: readinessProbeLogFilePath(), | ||
| MaxBackups: readIntOrDefault(readinessProbeLoggerBackups, 5), | ||
| MaxSize: readInt(readinessProbeLoggerMaxSize), | ||
| MaxSize: readIntOrDefault(readinessProbeLoggerMaxSize, 5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prior to that we set 0, which will default to 100mb. That means the readinessProbe might will up to 5x100mb=500mb of logs. Note - those logs are not that useful, while still filling up the disk
mircea-cosbuc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary:
example output with the console/stdout logger
All Submissions:
closes #XXXXin your comment to auto-close the issue that your PR fixes (if such).