Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Remove Much of the HTTP API Surface Area #84

Merged
merged 2 commits into from
Dec 2, 2016

Conversation

arschles
Copy link
Contributor

@arschles arschles commented Dec 1, 2016

In accordance with #54, this patch attempts to only remove the API surface area. It won’t refactor any code.

Fixes #54

@arschles arschles added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 1, 2016
@arschles arschles self-assigned this Dec 1, 2016
@k8s-ci-robot
Copy link
Contributor

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
@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 1, 2016
Copy link
Contributor

@vaikas vaikas left a 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)
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#85

Copy link
Contributor

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
@krancour
Copy link
Contributor

krancour commented Dec 1, 2016

LGTM

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()
Copy link
Contributor

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?

http://www.gorillatoolkit.org/pkg/mux#Router.StrictSlash

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, good idea. added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arschles.

@krancour
Copy link
Contributor

krancour commented Dec 1, 2016

LGTM (again).

Copy link
Contributor

@pmorie pmorie left a 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)
Copy link
Contributor

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.

@duglin
Copy link
Contributor

duglin commented Dec 2, 2016

LGTM

@duglin duglin merged commit 49b3fe1 into kubernetes-retired:master Dec 2, 2016
@arschles arschles deleted the healthz branch May 9, 2017 21:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants