pod-security-admissionk8s.io/pod-security-admission/cmd/webhook/server Index | Files | Directories

package server

import "k8s.io/pod-security-admission/cmd/webhook/server"

Package server implements a Server object for running the admission controller as a webhook server.

Index

Functions

func NewServerCommand

func NewServerCommand() *cobra.Command

NewSchedulerCommand creates a *cobra.Command object with default parameters and registryOptions

Types

type Config

type Config struct {
	SecureServing     *apiserver.SecureServingInfo
	InsecureServing   *apiserver.DeprecatedInsecureServingInfo
	KubeConfig        *restclient.Config
	PodSecurityConfig *admissionapi.PodSecurityConfiguration
}

Config holds the loaded options.Options used to set up the webhook server.

func LoadConfig

func LoadConfig(opts *options.Options) (*Config, error)

LoadConfig loads the Config from the Options.

type Server

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

func Setup

func Setup(c *Config) (*Server, error)

Setup creates an Admission object to handle the admission logic.

func (*Server) HandleValidate

func (s *Server) HandleValidate(w http.ResponseWriter, r *http.Request)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Source Files

scheme.go server.go

Directories

PathSynopsis
cmd/webhook/server/options
Version
v0.32.2 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
35 packages
Last checked
2 months ago

Tools for package owners.