Skip to content

Docs: Update Kubernetes Admission Controller tutorial to support latest API version #2467

Closed
@bsctl

Description

The OPA example in the kubernetes tutorial is not working with "apiVersion": "admission.k8s.io/v1". It seems OPA is not honouring the requirements of setting the response UID, here.

At a minimum, the response stanza must contain the following fields:
uid, copied from the request.uid sent to the webhook
allowed, either set to true or false

Expected Behavior

Actual Behavior

When I try to create a resource, getting the following error from APIs server

Error from server (InternalError): Internal error occurred: failed calling webhook "tenants.capsule.k8s": expected response.uid="cd9de821-b2b7-4c3e-8b2b-2db653f72960", got ""

Steps to Reproduce the Problem

If this is a bug report please provide as much detail as possible so that we can
reproduce the problem. Examples:

  • OPA version openpolicyagent/opa:0.20.5
  • Example query, input, data, and policy that OPA was given
  • Example output that OPA returned
  • For server and CLI, the flags/configuration that you provided to OPA
  • For server, any relevant log messages from OPA
  • For Go and Wasm, the arguments you invoked OPA with

Additional Info

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions