Documentation ¶
Index ¶
- Variables
- type StrategyAdmissionHook
- func (w *StrategyAdmissionHook) Admit(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
- func (w *StrategyAdmissionHook) Initialize(cfg *rest.Config, stopCh <-chan struct{}) error
- func (w *StrategyAdmissionHook) MutatingResource() (plural schema.GroupVersionResource, singular string)
- func (w *StrategyAdmissionHook) Validate(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
- func (w *StrategyAdmissionHook) ValidatingResource() (plural schema.GroupVersionResource, singular string)
- type StrategyRegistry
Constants ¶
This section is empty.
Variables ¶
View Source
var Registry = NewRegistry()
Functions ¶
This section is empty.
Types ¶
type StrategyAdmissionHook ¶ added in v1.2.0
type StrategyAdmissionHook struct {
// contains filtered or unexported fields
}
StrategyAdmissionHook is a admission webhook based on the registered strategies in the given registry
func NewStrategyAdmissionHook ¶ added in v1.2.0
func NewStrategyAdmissionHook(registry *StrategyRegistry) *StrategyAdmissionHook
func (*StrategyAdmissionHook) Admit ¶ added in v1.2.0
func (w *StrategyAdmissionHook) Admit(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
func (*StrategyAdmissionHook) Initialize ¶ added in v1.2.0
func (w *StrategyAdmissionHook) Initialize(cfg *rest.Config, stopCh <-chan struct{}) error
func (*StrategyAdmissionHook) MutatingResource ¶ added in v1.2.0
func (w *StrategyAdmissionHook) MutatingResource() (plural schema.GroupVersionResource, singular string)
func (*StrategyAdmissionHook) Validate ¶ added in v1.2.0
func (w *StrategyAdmissionHook) Validate(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
func (*StrategyAdmissionHook) ValidatingResource ¶ added in v1.2.0
func (w *StrategyAdmissionHook) ValidatingResource() (plural schema.GroupVersionResource, singular string)
type StrategyRegistry ¶
StrategyRegistry maintain the map of resource GVK to its CreateUpdateStrategy TODO: automate the registration of ValidatingAdmissionWebhook and MutatingAdmissionWebhook based on this registry
func NewRegistry ¶
func NewRegistry() StrategyRegistry
func (*StrategyRegistry) Get ¶
func (r *StrategyRegistry) Get(kind metav1.GroupVersionKind) (registry.CreateUpdateStrategy, bool)
func (*StrategyRegistry) Register ¶
func (r *StrategyRegistry) Register(strategy registry.CreateUpdateStrategy)
Click to show internal directories.
Click to hide internal directories.