-
Notifications
You must be signed in to change notification settings - Fork 387
Remove Much of the HTTP API Surface Area #84
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.
If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
|
2 similar comments
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.
If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.
If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
|
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.
LGTM
|
||
port := strconv.Itoa(s.port) | ||
log.Println("Server started on port " + port) | ||
err := http.ListenAndServe(":"+port, nil) | ||
log.Println(err.Error()) | ||
} | ||
|
||
func healthZHandler(w http.ResponseWriter, r *http.Request) { | ||
w.WriteHeader(http.StatusOK) |
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.
Consider adding a TODO here to do some actual health checking?
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.
@vaikas-google I'll add an issue for it instead. cool with you?
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.
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.
I strongly prefer issues over TODOs in the code personally.
In accordance with kubernetes-retired#54, this patch attempts to only remove the API surface area. It won’t refactor any code. Fixes kubernetes-retired#54
|
k8sHandler: k8sHandler, | ||
controller: c, | ||
port: port, | ||
k8sHandler: k8sHandler, | ||
}, nil | ||
} | ||
|
||
// Start starts the server and begins listening on a TCP port. | ||
func (s *Server) Start() { | ||
router := mux.NewRouter() |
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.
@arschles can I suggest adding router.StrictSlash(true)
after this line?
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.
yep, good idea. added
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.
Thanks @arschles.
LGTM (again). |
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.
LGTM
|
||
port := strconv.Itoa(s.port) | ||
log.Println("Server started on port " + port) | ||
err := http.ListenAndServe(":"+port, nil) | ||
log.Println(err.Error()) | ||
} | ||
|
||
func healthZHandler(w http.ResponseWriter, r *http.Request) { | ||
w.WriteHeader(http.StatusOK) |
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.
I strongly prefer issues over TODOs in the code personally.
LGTM |
In accordance with #54, this patch attempts to only remove the API surface area. It won’t refactor any code.
Fixes #54