Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Registry = NewRegistry()
Functions ¶
This section is empty.
Types ¶
type AdmissionWebhook ¶
type AdmissionWebhook struct {
// contains filtered or unexported fields
}
AdmissionWebhook is a admission webhook based on the registered strategies in the given registry
func NewAdmissionWebhook ¶
func NewAdmissionWebhook(registry *StrategyRegistry) *AdmissionWebhook
func (*AdmissionWebhook) Mutate ¶
func (w *AdmissionWebhook) Mutate(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
func (*AdmissionWebhook) Validate ¶
func (w *AdmissionWebhook) Validate(ar *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse
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.