Validating binding does not support receiving an array of ValidatingResponse
mshanmu opened this issue · 0 comments
As per https://github.com/flant/shell-operator/blob/main/BINDING_VALIDATING.md document, hook might receive multiple binding contexts, but there is no way to return multiple ValidatingResponse objects back to shell-operator
Expected behavior (what you expected to happen):
Supports array of ValidatingResponse objects
Actual behavior (what actually happened):
{"binding":"validation.conditions.com","event":"kubernetesValidating","hook":"webhook_validation","level":"error","msg":"Hook failed. Will retry after delay. Failed count is 1. Error: got bad validating response: json: cannot unmarshal array into Go value of type types.ValidatingResponse","queue":"","task":"HookRun","time":"2022-08-03T19:35:10Z"}
Steps to reproduce:
- Create a hook binary with Validating binding
- Create multiple objects for the same CRD type
- Notice multiple binding contexts are returned
Environment:
- Shell-operator version:1.0.10
- Kubernetes version:1.24.2
- Installation type (kubectl apply, helm chart, etc.):
Anything else we should know?:
Additional information for debugging (if necessary):