package server
import "k8s.io/kubernetes/pkg/kubelet/server"
Package server contains functions related to serving Kubelet's external interface.
Index ¶
- func ListenAndServeKubeletReadOnlyServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, runtime kubecontainer.Runtime)
- func ListenAndServeKubeletServer( host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, tlsOptions *TLSOptions, auth AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool, runtime kubecontainer.Runtime, criHandler http.Handler)
- func NewNodeAuthorizerAttributesGetter(nodeName types.NodeName) authorizer.RequestAttributesGetter
- type AuthInterface
- type HostInterface
- type KubeletAuth
- type Server
- func NewServer( host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, auth AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool, runtime kubecontainer.Runtime, criHandler http.Handler) Server
- func (s *Server) InstallAuthFilter()
- func (s *Server) InstallDebuggingDisabledHandlers()
- func (s *Server) InstallDebuggingHandlers(criHandler http.Handler)
- func (s *Server) InstallDefaultHandlers()
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- type TLSOptions
Functions ¶
func ListenAndServeKubeletReadOnlyServer ¶
func ListenAndServeKubeletReadOnlyServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, runtime kubecontainer.Runtime)
ListenAndServeKubeletReadOnlyServer initializes a server to respond to HTTP network requests on the Kubelet.
func ListenAndServeKubeletServer ¶
func ListenAndServeKubeletServer( host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, tlsOptions *TLSOptions, auth AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool, runtime kubecontainer.Runtime, criHandler http.Handler)
ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet.
func NewNodeAuthorizerAttributesGetter ¶
func NewNodeAuthorizerAttributesGetter(nodeName types.NodeName) authorizer.RequestAttributesGetter
Types ¶
type AuthInterface ¶
type AuthInterface interface { authenticator.Request authorizer.RequestAttributesGetter authorizer.Authorizer }
AuthInterface contains all methods required by the auth filters
func NewKubeletAuth ¶
func NewKubeletAuth(authenticator authenticator.Request, authorizerAttributeGetter authorizer.RequestAttributesGetter, authorizer authorizer.Authorizer) AuthInterface
NewKubeletAuth returns a kubelet.AuthInterface composed of the given authenticator, attribute getter, and authorizer
type HostInterface ¶
type HostInterface interface { stats.StatsProvider GetVersionInfo() (*cadvisorapi.VersionInfo, error) GetCachedMachineInfo() (*cadvisorapi.MachineInfo, error) GetRunningPods() ([]*v1.Pod, error) RunInContainer(name string, uid types.UID, container string, cmd []string) ([]byte, error) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error AttachContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error GetKubeletContainerLogs(podFullName, containerName string, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error ServeLogs(w http.ResponseWriter, req *http.Request) PortForward(name string, uid types.UID, port int32, stream io.ReadWriteCloser) error StreamingConnectionIdleTimeout() time.Duration ResyncInterval() time.Duration GetHostname() string LatestLoopEntryTime() time.Time GetExec(podFullName string, podUID types.UID, containerName string, cmd []string, streamOpts remotecommandserver.Options) (*url.URL, error) GetAttach(podFullName string, podUID types.UID, containerName string, streamOpts remotecommandserver.Options) (*url.URL, error) GetPortForward(podName, podNamespace string, podUID types.UID, portForwardOpts portforward.V4Options) (*url.URL, error) }
HostInterface contains all the kubelet methods required by the server. For testability.
type KubeletAuth ¶
type KubeletAuth struct { // authenticator identifies the user for requests to the Kubelet API authenticator.Request // authorizerAttributeGetter builds authorization.Attributes for a request to the Kubelet API authorizer.RequestAttributesGetter // authorizer determines whether a given authorization.Attributes is allowed authorizer.Authorizer }
KubeletAuth implements AuthInterface
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a http.Handler which exposes kubelet functionality over HTTP.
func NewServer ¶
func NewServer( host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, auth AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool, runtime kubecontainer.Runtime, criHandler http.Handler) Server
NewServer initializes and configures a kubelet.Server object to handle HTTP requests.
func (*Server) InstallAuthFilter ¶
func (s *Server) InstallAuthFilter()
InstallAuthFilter installs authentication filters with the restful Container.
func (*Server) InstallDebuggingDisabledHandlers ¶
func (s *Server) InstallDebuggingDisabledHandlers()
InstallDebuggingDisabledHandlers registers the HTTP request patterns that provide better error message
func (*Server) InstallDebuggingHandlers ¶
InstallDebuggingHandlers registers the HTTP request patterns that serve logs or run commands/containers
func (*Server) InstallDefaultHandlers ¶
func (s *Server) InstallDefaultHandlers()
InstallDefaultHandlers registers the default set of supported HTTP request patterns with the restful Container.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP responds to HTTP requests on the Kubelet.
type TLSOptions ¶
Source Files ¶
auth.go doc.go server.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubelet/server/portforward | package portforward contains server-side logic for handling port forwarding requests. |
pkg/kubelet/server/remotecommand | package remotecommand contains functions related to executing commands in and attaching to pods. |
pkg/kubelet/server/stats | Package stats handles exporting Kubelet and container stats. |
pkg/kubelet/server/stats/testing | |
pkg/kubelet/server/streaming |
- Version
- v1.9.8-beta.0
- Published
- Apr 18, 2018
- Platform
- js/wasm
- Imports
- 43 packages
- Last checked
- 8 minutes ago –
Tools for package owners.