-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop using insecure serving. #1694
Conversation
pkg/localkube/apiserver.go
Outdated
// hostport := net.JoinHostPort(lk.APIServerInsecureAddress.String(), strconv.Itoa(lk.APIServerInsecurePort)) | ||
// addr := "http://" + path.Join(hostport, "healthz") | ||
return noop | ||
// return healthCheck(addr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to get turned back on over the new address.
Codecov Report
@@ Coverage Diff @@
## master #1694 +/- ##
==========================================
+ Coverage 36.76% 37.29% +0.52%
==========================================
Files 51 51
Lines 3321 3365 +44
==========================================
+ Hits 1221 1255 +34
- Misses 1920 1928 +8
- Partials 180 182 +2
Continue to review full report at Codecov.
|
pkg/localkube/kubelet.go
Outdated
@@ -29,7 +30,8 @@ func StartKubeletServer(lk LocalkubeServer) func() error { | |||
config := options.NewKubeletServer() | |||
|
|||
// Master details | |||
config.APIServerList = []string{lk.GetAPIServerInsecureURL()} | |||
config.KubeConfig = flag.NewStringFlag("/var/lib/localkube/kubeconfig") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be pointing at util.DefaultKubeConfigPath
?
Fixes #1628 |
30c76bd
to
a3563b3
Compare
5016ce2
to
511cb9c
Compare
This is ready for a final look. |
config.InsecureServing.BindAddress = lk.APIServerInsecureAddress | ||
config.InsecureServing.BindPort = lk.APIServerInsecurePort | ||
// 0 turns off insecure serving. | ||
config.InsecureServing.BindPort = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also change the default to be 0 as this option might want to be configured by users. I am not sure if this is something users might rely on, the insecure api-server but I am seeing issues with the --none driver currently
This is mostly done. I want to add an integration test to verify nothing is serving on 8080.
I had to modify addon-manager.yaml to pass in the kubeconfig, I'm not sure how other environments do this. I wasn't able to find any examples.