File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,15 @@ import (
18
18
19
19
// InClusterConfig is a variable that holds the function to get the in-cluster config
20
20
// 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
+ }
22
30
23
31
type CloseWatchKubeConfig func () error
24
32
@@ -28,7 +36,7 @@ type Kubernetes struct {
28
36
CloseWatchKubeConfig CloseWatchKubeConfig
29
37
scheme * runtime.Scheme
30
38
parameterCodec * runtime.ParameterCodec
31
- clientSet * kubernetes.Clientset
39
+ clientSet kubernetes.Interface
32
40
discoveryClient * discovery.DiscoveryClient
33
41
deferredDiscoveryRESTMapper * restmapper.DeferredDiscoveryRESTMapper
34
42
dynamicClient * dynamic.DynamicClient
You can’t perform that action at this time.
0 commit comments