fix log initialization
InitLogs unconditionally disables contextual logging, while ValidateAndApply
checks the feature gate for that. InitLogs must come first, otherwise
    --feature-gates=ContextualLogging=true
doesn't work.
			
			
This commit is contained in:
		
							parent
							
								
									f9a7c7f73f
								
							
						
					
					
						commit
						b9c0d91da7
					
				| 
						 | 
				
			
			@ -569,12 +569,11 @@ func main() {
 | 
			
		|||
	featureGate.AddFlag(pflag.CommandLine)
 | 
			
		||||
	kube_flag.InitFlags()
 | 
			
		||||
 | 
			
		||||
	logs.InitLogs()
 | 
			
		||||
	if err := logsapi.ValidateAndApply(loggingConfig, featureGate); err != nil {
 | 
			
		||||
		klog.Fatalf("Failed to validate and apply logging configuration: %v", err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	logs.InitLogs()
 | 
			
		||||
 | 
			
		||||
	healthCheck := metrics.NewHealthCheck(*maxInactivityTimeFlag, *maxFailingTimeFlag)
 | 
			
		||||
 | 
			
		||||
	klog.V(1).Infof("Cluster Autoscaler %s", version.ClusterAutoscalerVersion)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue