Add configurable log format to values.yaml and propagate it to listener (#2686)

This commit is contained in:
Nikola Jokic
2023-07-05 21:06:42 +02:00
committed by GitHub
parent 2fee26ddce
commit 6fe8008640
7 changed files with 124 additions and 39 deletions

View File

@@ -182,12 +182,18 @@ func main() {
}
listenerPullPolicy := os.Getenv("CONTROLLER_MANAGER_LISTENER_IMAGE_PULL_POLICY")
if ok := actionsgithubcom.SetListenerImagePullPolicy(listenerPullPolicy); ok {
if actionsgithubcom.SetListenerImagePullPolicy(listenerPullPolicy) {
log.Info("AutoscalingListener image pull policy changed", "ImagePullPolicy", listenerPullPolicy)
} else {
log.Info("Using default AutoscalingListener image pull policy", "ImagePullPolicy", actionsgithubcom.DefaultScaleSetListenerImagePullPolicy)
}
if actionsgithubcom.SetListenerLoggingParameters(logLevel, logFormat) {
log.Info("AutoscalingListener logging parameters changed", "LogLevel", logLevel, "LogFormat", logFormat)
} else {
log.Info("Using default AutoscalingListener logging parameters", "LogLevel", actionsgithubcom.DefaultScaleSetListenerLogLevel, "LogFormat", actionsgithubcom.DefaultScaleSetListenerLogFormat)
}
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
NewCache: newCache,