Skip to content

Deserializing JSON into AdmissionReview Object #1247

Description

@rnemeth90

I am creating an admission controller to handle tainting new nodes in AKS. The "k8s.io/api/admission/v1beta1" for go defines a v1beta1.AdmissionReview struct. Does this c# library have a similar class? I'm not seeing anything in the documentation or examples, and I'm not sure what type I should deserialize the admission review into. I have a .NET Core web api with a simple controller action expecting a POST request:

        [HttpPost]
        [Route("node/mutate")]
        public async Task<IActionResult> Mutate([FromBody]object admissionRequest)
        {
            // what can I deserialize admissionRequest into? 

            return Json(admissionRequest);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions