Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Scheme = runtime.NewScheme() Codecs = serializer.NewCodecFactory(Scheme) )
Functions ¶
This section is empty.
Types ¶
type AdmissionHook ¶
type AdmissionHook interface {
// Initialize is called as a post-start hook
Initialize(kubeClientConfig *restclient.Config, stopCh <-chan struct{}) error
}
type AdmissionServer ¶
type AdmissionServer struct {
GenericAPIServer *genericapiserver.GenericAPIServer
}
AdmissionServer contains state for a Kubernetes cluster master/api server.
type CompletedConfig ¶
type CompletedConfig struct {
// contains filtered or unexported fields
}
func (CompletedConfig) New ¶
func (c CompletedConfig) New() (*AdmissionServer, error)
New returns a new instance of AdmissionServer from the given config.
type Config ¶
type Config struct {
GenericConfig *genericapiserver.RecommendedConfig
ExtraConfig ExtraConfig
}
func (*Config) Complete ¶
func (c *Config) Complete() CompletedConfig
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
type ExtraConfig ¶
type ExtraConfig struct {
AdmissionHooks []AdmissionHook
}
type MutatingAdmissionHook ¶
type MutatingAdmissionHook interface {
AdmissionHook
// MutatingResource is the resource to use for hosting your admission webhook. If the hook implements
// ValidatingAdmissionHook as well, the two resources for validating and mutating admission must be different.
// Note: this is (usually) not the same as the payload resource!
MutatingResource() (plural schema.GroupVersionResource, singular string)
// Admit is called to decide whether to accept the admission request. The returned AdmissionResponse may
// use the Patch field to mutate the object from the passed AdmissionRequest.
Admit(admissionSpec *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
}
type ValidatingAdmissionHook ¶
type ValidatingAdmissionHook interface {
AdmissionHook
// ValidatingResource is the resource to use for hosting your admission webhook. If the hook implements
// MutatingAdmissionHook as well, the two resources for validating and mutating admission must be different.
// Note: this is (usually) not the same as the payload resource!
ValidatingResource() (plural schema.GroupVersionResource, singular string)
// Validate is called to decide whether to accept the admission request. The returned AdmissionResponse
// must not use the Patch field.
Validate(admissionSpec *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
}
Click to show internal directories.
Click to hide internal directories.