mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	add warning log for csr controllers
This commit is contained in:
		@@ -39,7 +39,9 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error) {
 | 
					func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error) {
 | 
				
			||||||
	if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}] {
 | 
						gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}
 | 
				
			||||||
 | 
						if !ctx.AvailableResources[gvr] {
 | 
				
			||||||
 | 
							klog.Warningf("Resource %s is not available now", gvr.String())
 | 
				
			||||||
		return nil, false, nil
 | 
							return nil, false, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" {
 | 
						if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" {
 | 
				
			||||||
@@ -102,7 +104,9 @@ func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, error) {
 | 
					func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, error) {
 | 
				
			||||||
	if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}] {
 | 
						gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}
 | 
				
			||||||
 | 
						if !ctx.AvailableResources[gvr] {
 | 
				
			||||||
 | 
							klog.Warningf("Resource %s is not available now", gvr.String())
 | 
				
			||||||
		return nil, false, nil
 | 
							return nil, false, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user