Skip to content

Commit

Permalink
fix webhook injector
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikykun authored and shaofan-hs committed Aug 17, 2023
1 parent 0b61e50 commit 9a75786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/server/generic/generic_validating_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var _ inject.Client = &ValidatingHandler{}
// InjectClient injects the client into the ValidatingHandler
func (h *ValidatingHandler) InjectClient(c client.Client) error {
h.Client = c
for i := range MutatingTypeHandlerMap {
for i := range ValidatingTypeHandlerMap {
if _, err := inject.ClientInto(h.Client, ValidatingTypeHandlerMap[i]); err != nil {
return err
}
Expand All @@ -63,7 +63,7 @@ var _ admission.DecoderInjector = &ValidatingHandler{}
// InjectDecoder injects the decoder into the ValidatingHandler
func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error {
h.Decoder = d
for i := range MutatingTypeHandlerMap {
for i := range ValidatingTypeHandlerMap {
if _, err := admission.InjectDecoderInto(d, ValidatingTypeHandlerMap[i]); err != nil {
return err
}
Expand Down

0 comments on commit 9a75786

Please sign in to comment.