add cache-control headers to kube-apiserver

This commit is contained in:
David Eads
2019-08-26 09:39:29 -04:00
parent 18d7f8839d
commit f589c1213c
7 changed files with 117 additions and 1 deletions

View File

@@ -17,10 +17,11 @@ limitations under the License.
package app
import (
"github.com/prometheus/client_golang/prometheus"
"net/http"
goruntime "runtime"
"github.com/prometheus/client_golang/prometheus"
genericapifilters "k8s.io/apiserver/pkg/endpoints/filters"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
apiserver "k8s.io/apiserver/pkg/server"
@@ -46,6 +47,7 @@ func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.Aut
handler = genericapifilters.WithAuthentication(handler, authenticationInfo.Authenticator, failedHandler, nil)
}
handler = genericapifilters.WithRequestInfo(handler, requestInfoResolver)
handler = genericapifilters.WithCacheControl(handler)
handler = genericfilters.WithPanicRecovery(handler)
return handler