dra-example-driver icon indicating copy to clipboard operation
dra-example-driver copied to clipboard

add example of validating admission webhook

Open pohly opened this issue 1 year ago • 2 comments

In Kubernetes 1.31, custom configuration parameters will get embedded inside ResourceClaim and ResourceClaimTemplate. They are clearly marked as belonging to a certain DRA driver, so an admission webhook provided together with that driver can check those configuration parameters early instead much later in the NodePrepareResources call.

While writing a webhook is documented elsewhere, having an example that is specific to these types is still valuable.

pohly avatar Jun 13 '24 06:06 pohly

/help

pohly avatar Jun 13 '24 06:06 pohly

@pohly: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Jun 13 '24 06:06 k8s-ci-robot

/assign

nojnhuh avatar Jan 14 '25 23:01 nojnhuh

Given that VAP is GA would it be worth doing this via an Admission Validation Policy rather than a webhook?

If it’s just validating that feature is GA so we could get away with needing a webhook.

kannon92 avatar Mar 01 '25 17:03 kannon92

The CEL expressions in the VAP would have to parse the vendor configuration data, then check it. This is not going to work (CEL too limited).

pohly avatar Mar 01 '25 20:03 pohly