Documentation ¶
Index ¶
Constants ¶
View Source
const ( // audit template name AuditCordonNode = "cordonNode" AuditUncordonNode = "uncordonNode" AuditLabelNode = "labelNode" AuditUnLabelNode = "unLabelNode" AuditDrainNode = "drainNode" AuditOfflineNode = "offlineNode" AuditOnlineNode = "onlineNode" AuditUpdateResource = "updateK8SResource" AuditCreateResource = "createK8SResource" AuditDeleteResource = "deleteK8SResource" AuditKubectlShell = "kubectlShell" AuditRestartWorkload = "restartWorkload" // audit template params AuditClusterName = "clusterName" AuditNamespace = "namespace" AuditResourceType = "resourceType" AuditResourceName = "name" AuditTargetLabel = "targetLabel" AuditCommands = "commands" )
Variables ¶
View Source
var (
OutOfLengthSize = errors.New("cmd length out of buffer limit")
)
Functions ¶
func NewDispatcher ¶
func NewDispatcher(auditReqChan chan *cmdWithTimestamp, closeChan chan struct{}) *dispatcher
Types ¶
type Auditor ¶
type Auditor struct {
// contains filtered or unexported fields
}
func NewAuditor ¶
NewAuditor return a steve Auditor with bundle. bdl needs withCoreServices to create audit events.
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(bdl *bundle.Bundle) *Authenticator
NewAuthenticator return a steve Authenticator with bundle. bdl need withCoreServices to check permission.
func (*Authenticator) AuthMiddleware ¶
func (a *Authenticator) AuthMiddleware(next http.Handler) http.Handler
AuthMiddleware authenticate for steve server by bundle.
type Chain ¶
type Chain []mux.MiddlewareFunc
type ShellHandler ¶
type ShellHandler struct {
// contains filtered or unexported fields
}
func NewShellHandler ¶
func NewShellHandler(ctx context.Context) *ShellHandler
NewShellHandler create a new ShellHandler
func (*ShellHandler) HandleShell ¶
func (s *ShellHandler) HandleShell(next http.Handler) http.Handler
HandleShell forwards the request to cluster-agent pod
Click to show internal directories.
Click to hide internal directories.