initInjector adds migration wait initContainers if needed.
(ctx context.Context, req admission.Request)
| 52 | |
| 53 | // initInjector adds migration wait initContainers if needed. |
| 54 | func (hook *initInjector) Handle(ctx context.Context, req admission.Request) admission.Response { |
| 55 | resp, err := hook.handleInner(ctx, req) |
| 56 | if err != nil { |
| 57 | return admission.Errored(http.StatusInternalServerError, err) |
| 58 | } |
| 59 | return *resp |
| 60 | } |
| 61 | |
| 62 | func (hook *initInjector) handleInner(ctx context.Context, req admission.Request) (*admission.Response, error) { |
| 63 | log := ctrl.Log.WithName("webhooks").WithName("InitInjector") |