Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validating binding does not support receiving an array of ValidatingResponse #418

Open
mshanmu opened this issue Aug 3, 2022 · 0 comments

Comments

@mshanmu
Copy link

mshanmu commented Aug 3, 2022

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:

  1. Create a hook binary with Validating binding
  2. Create multiple objects for the same CRD type
  3. 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):

Hook script

Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant