mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +00:00
Allow disabling non-necessary kubelet and apiserver endpoints
This commit is contained in:
@@ -121,12 +121,16 @@ func (g *APIGroup) InstallREST(mux mux, paths ...string) {
|
||||
// InstallSupport registers the APIServer support functions into a mux.
|
||||
func InstallSupport(mux mux) {
|
||||
healthz.InstallHandler(mux)
|
||||
mux.Handle("/logs/", http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))))
|
||||
mux.Handle("/proxy/minion/", http.StripPrefix("/proxy/minion", http.HandlerFunc(handleProxyMinion)))
|
||||
mux.HandleFunc("/version", handleVersion)
|
||||
mux.HandleFunc("/", handleIndex)
|
||||
}
|
||||
|
||||
// InstallLogsSupport registers the APIServer log support function into a mux.
|
||||
func InstallLogsSupport(mux mux) {
|
||||
mux.Handle("/logs/", http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))))
|
||||
}
|
||||
|
||||
// handleVersion writes the server's version information.
|
||||
func handleVersion(w http.ResponseWriter, req *http.Request) {
|
||||
writeRawJSON(http.StatusOK, version.Get(), w)
|
||||
|
Reference in New Issue
Block a user