kubernetes: k8s.io/kubernetes/pkg/kubelet/server Index | Files | Directories

package server

import "k8s.io/kubernetes/pkg/kubelet/server"

Package server contains functions related to serving Kubelet's external interface.

Index

Package Files

auth.go doc.go server.go

func ListenAndServeKubeletReadOnlyServer Uses

func ListenAndServeKubeletReadOnlyServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, enableCAdvisorJSONEndpoints bool)

ListenAndServeKubeletReadOnlyServer initializes a server to respond to HTTP network requests on the Kubelet.

func ListenAndServeKubeletServer Uses

func ListenAndServeKubeletServer(
    host HostInterface,
    resourceAnalyzer stats.ResourceAnalyzer,
    address net.IP,
    port uint,
    tlsOptions *TLSOptions,
    auth AuthInterface,
    enableCAdvisorJSONEndpoints,
    enableDebuggingHandlers,
    enableContentionProfiling,
    redirectContainerStreaming bool,
    criHandler http.Handler)

ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet.

func ListenAndServePodResources Uses

func ListenAndServePodResources(socket string, podsProvider podresources.PodsProvider, devicesProvider podresources.DevicesProvider)

ListenAndServePodResources initializes a gRPC server to serve the PodResources service

func NewNodeAuthorizerAttributesGetter Uses

func NewNodeAuthorizerAttributesGetter(nodeName types.NodeName) authorizer.RequestAttributesGetter

NewNodeAuthorizerAttributesGetter creates a new authorizer.RequestAttributesGetter for the node.

type AuthInterface Uses

type AuthInterface interface {
    authenticator.Request
    authorizer.RequestAttributesGetter
    authorizer.Authorizer
}

AuthInterface contains all methods required by the auth filters

func NewKubeletAuth Uses

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 Uses

type HostInterface interface {
    stats.Provider
    GetVersionInfo() (*cadvisorapi.VersionInfo, error)
    GetCachedMachineInfo() (*cadvisorapi.MachineInfo, error)
    GetRunningPods() ([]*v1.Pod, error)
    RunInContainer(name string, uid types.UID, container string, cmd []string) ([]byte, error)
    GetKubeletContainerLogs(ctx context.Context, podFullName, containerName string, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error
    ServeLogs(w http.ResponseWriter, req *http.Request)
    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 Uses

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 Uses

type Server struct {
    // contains filtered or unexported fields
}

Server is a http.Handler which exposes kubelet functionality over HTTP.

func NewServer Uses

func NewServer(
    host HostInterface,
    resourceAnalyzer stats.ResourceAnalyzer,
    auth AuthInterface,
    enableCAdvisorJSONEndpoints,
    enableDebuggingHandlers,
    enableContentionProfiling,
    redirectContainerStreaming bool,
    criHandler http.Handler) Server

NewServer initializes and configures a kubelet.Server object to handle HTTP requests.

func (*Server) InstallAuthFilter Uses

func (s *Server) InstallAuthFilter()

InstallAuthFilter installs authentication filters with the restful Container.

func (*Server) InstallDebuggingDisabledHandlers Uses

func (s *Server) InstallDebuggingDisabledHandlers()

InstallDebuggingDisabledHandlers registers the HTTP request patterns that provide better error message

func (*Server) InstallDebuggingHandlers Uses

func (s *Server) InstallDebuggingHandlers(criHandler http.Handler)

InstallDebuggingHandlers registers the HTTP request patterns that serve logs or run commands/containers

func (*Server) InstallDefaultHandlers Uses

func (s *Server) InstallDefaultHandlers(enableCAdvisorJSONEndpoints bool)

InstallDefaultHandlers registers the default set of supported HTTP request patterns with the restful Container.

func (*Server) ServeHTTP Uses

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP responds to HTTP requests on the Kubelet.

type TLSOptions Uses

type TLSOptions struct {
    Config   *tls.Config
    CertFile string
    KeyFile  string
}

TLSOptions holds the TLS options.

Directories

PathSynopsis
metrics
portforwardPackage portforward contains server-side logic for handling port forwarding requests.
remotecommandPackage remotecommand contains functions related to executing commands in and attaching to pods.
statsPackage stats handles exporting Kubelet and container stats.
stats/testing
streaming

Package server imports 55 packages (graph) and is imported by 93 packages. Updated 2019-09-16. Refresh now. Tools for package owners.