mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #130010 from tallclair/automated-cherry-pick-of-#129739-upstream-release-1.32
Automated cherry pick of #129739: Kubelet server handler cleanup
This commit is contained in:
commit
b53c36d327
@ -472,17 +472,6 @@ func (s *Server) InstallDefaultHandlers() {
|
|||||||
s.restfulCont.Handle(proberMetricsPath,
|
s.restfulCont.Handle(proberMetricsPath,
|
||||||
compbasemetrics.HandlerFor(p, compbasemetrics.HandlerOpts{ErrorHandling: compbasemetrics.ContinueOnError}),
|
compbasemetrics.HandlerFor(p, compbasemetrics.HandlerOpts{ErrorHandling: compbasemetrics.ContinueOnError}),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Only enable checkpoint API if the feature is enabled
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.ContainerCheckpoint) {
|
|
||||||
s.addMetricsBucketMatcher("checkpoint")
|
|
||||||
ws = &restful.WebService{}
|
|
||||||
ws.Path(checkpointPath).Produces(restful.MIME_JSON)
|
|
||||||
ws.Route(ws.POST("/{podNamespace}/{podID}/{containerName}").
|
|
||||||
To(s.checkpoint).
|
|
||||||
Operation("checkpoint"))
|
|
||||||
s.restfulCont.Add(ws)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// InstallDebuggingHandlers registers the HTTP request patterns that serve logs or run commands/containers
|
// InstallDebuggingHandlers registers the HTTP request patterns that serve logs or run commands/containers
|
||||||
@ -577,6 +566,17 @@ func (s *Server) InstallDebuggingHandlers() {
|
|||||||
To(s.getRunningPods).
|
To(s.getRunningPods).
|
||||||
Operation("getRunningPods"))
|
Operation("getRunningPods"))
|
||||||
s.restfulCont.Add(ws)
|
s.restfulCont.Add(ws)
|
||||||
|
|
||||||
|
// Only enable checkpoint API if the feature is enabled
|
||||||
|
if utilfeature.DefaultFeatureGate.Enabled(features.ContainerCheckpoint) {
|
||||||
|
s.addMetricsBucketMatcher("checkpoint")
|
||||||
|
ws = &restful.WebService{}
|
||||||
|
ws.Path(checkpointPath).Produces(restful.MIME_JSON)
|
||||||
|
ws.Route(ws.POST("/{podNamespace}/{podID}/{containerName}").
|
||||||
|
To(s.checkpoint).
|
||||||
|
Operation("checkpoint"))
|
||||||
|
s.restfulCont.Add(ws)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// InstallDebuggingDisabledHandlers registers the HTTP request patterns that provide better error message
|
// InstallDebuggingDisabledHandlers registers the HTTP request patterns that provide better error message
|
||||||
|
Loading…
Reference in New Issue
Block a user