File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import (
4242	_ "k8s.io/client-go/plugin/pkg/client/auth" 
4343	"k8s.io/klog/v2" 
4444	"k8s.io/klog/v2/textlogger" 
45+ 	"k8s.io/utils/ptr" 
4546	ctrl "sigs.k8s.io/controller-runtime" 
4647	crcache "sigs.k8s.io/controller-runtime/pkg/cache" 
4748	"sigs.k8s.io/controller-runtime/pkg/certwatcher" 
@@ -203,8 +204,14 @@ func main() {
203204		HealthProbeBindAddress : probeAddr ,
204205		LeaderElection :         enableLeaderElection ,
205206		LeaderElectionID :       "catalogd-operator-lock" ,
206- 		WebhookServer :          webhookServer ,
207- 		Cache :                  cacheOptions ,
207+ 		// Recommended Leader Election values 
208+ 		// https://github.com/openshift/enhancements/blob/61581dcd985130357d6e4b0e72b87ee35394bf6e/CONVENTIONS.md#handling-kube-apiserver-disruption 
209+ 		LeaseDuration : ptr .To (137  *  time .Second ),
210+ 		RenewDeadline : ptr .To (107  *  time .Second ),
211+ 		RetryPeriod :   ptr .To (26  *  time .Second ),
212+ 
213+ 		WebhookServer : webhookServer ,
214+ 		Cache :         cacheOptions ,
208215	})
209216	if  err  !=  nil  {
210217		setupLog .Error (err , "unable to create manager" )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments