File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,15 @@ import (
1818
1919// InClusterConfig is a variable that holds the function to get the in-cluster config 
2020// Exposed for testing 
21- var  InClusterConfig  =  rest .InClusterConfig 
21+ var  InClusterConfig  =  func () (* rest.Config , error ) {
22+ 	// TODO use kubernetes.default.svc instead of resolved server 
23+ 	// Currently running into: `http: server gave HTTP response to HTTPS client` 
24+ 	inClusterConfig , err  :=  rest .InClusterConfig ()
25+ 	if  inClusterConfig  !=  nil  {
26+ 		inClusterConfig .Host  =  "https://kubernetes.default.svc" 
27+ 	}
28+ 	return  inClusterConfig , err 
29+ }
2230
2331type  CloseWatchKubeConfig  func () error 
2432
@@ -28,7 +36,7 @@ type Kubernetes struct {
2836	CloseWatchKubeConfig         CloseWatchKubeConfig 
2937	scheme                       * runtime.Scheme 
3038	parameterCodec               * runtime.ParameterCodec 
31- 	clientSet                    * kubernetes.Clientset 
39+ 	clientSet                    kubernetes.Interface 
3240	discoveryClient              * discovery.DiscoveryClient 
3341	deferredDiscoveryRESTMapper  * restmapper.DeferredDiscoveryRESTMapper 
3442	dynamicClient                * dynamic.DynamicClient 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments