-
Notifications
You must be signed in to change notification settings - Fork 984
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
Karpenter controller & webhook pods logs in json format #1637
Comments
Here's a related issue: #1465 You can configure the zap logging via the kubectl get configmap config-logging -n karpenter In the zap-logger-config section, you can change apiVersion: v1
data:
zap-logger-config: |
{
"level": "debug",
"development": false,
"disableStacktrace": true,
"disableCaller": true,
"sampling": {
"initial": 100,
"thereafter": 100
},
"outputPaths": ["stdout"],
"errorOutputPaths": ["stderr"],
"encoding": "json",
"encoderConfig": {
"timeKey": "time",
"levelKey": "level",
"nameKey": "logger",
"callerKey": "caller",
"messageKey": "message",
"stacktraceKey": "stacktrace",
"levelEncoder": "capital",
"timeEncoder": "iso8601"
}
}
kind: ConfigMap
metadata:
annotations:
meta.helm.sh/release-name: karpenter
meta.helm.sh/release-namespace: karpenter
creationTimestamp: "2022-03-21T15:18:55Z"
labels:
app.kubernetes.io/instance: karpenter
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: karpenter
app.kubernetes.io/version: 0.8.1
helm.sh/chart: karpenter-0.8.1
name: config-logging
namespace: karpenter and then your logs will look like this:
|
@bwagner5 Thanks for the pointer. This is great, but from the yaml file, I see that the Are there plans to make this configurable? Or the other option that we currently have is to clone the repo and maintain a custom version of the chart with this change in the configmap. |
Good suggestion, it has been merged! :D should be released next week |
Is there a way to set the format of controller & webhook pods in json format? Currently its like this:
But we are looking to push the logs to elasticsearch through fluentd to keep track of the node scaling events, and this requires the logs to be in json format.
The text was updated successfully, but these errors were encountered: