Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 4, 2020 06:13
Show Gist options
  • Select an option

  • Save ihcsim/b5f50b33b245967e96cddd75ef6cc162 to your computer and use it in GitHub Desktop.

Select an option

Save ihcsim/b5f50b33b245967e96cddd75ef6cc162 to your computer and use it in GitHub Desktop.
// getExec handles requests to run a command inside a container.
func (s *Server) getExec(request *restful.Request, response *restful.Response) {
// ...
podFullName := kubecontainer.GetPodFullName(pod)
url, err := s.host.GetExec(podFullName, params.podUID, params.containerName, params.cmd, *streamOpts)
if err != nil {
streaming.WriteError(err, response.ResponseWriter)
return
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment