Giter Club home page Giter Club logo

Comments (2)

deads2k avatar deads2k commented on June 22, 2024

The Kind is hardcoded because AdmissionReview is the only valid thing to send to an admission webhook endpoint. The Resource (the URL) can be different, but the Kind (the data format) is always an AdmissionReview

from generic-admission-server.

tamalsaha avatar tamalsaha commented on June 22, 2024

I tried adding a second webhook. Here is my code:
tamalsaha/kubernetes-namespace-reservation@4fbcd77

But I am getting the following error message:

[restful] WebService with duplicate root path detected:

[restful] 2018/02/10 21:44:23 log.go:33: [restful] WebService with duplicate root path detected:['&{/apis/admission.online.openshift.io/v1beta1 0xc420411e80 [{POST [application/json application/yaml application/vnd.kubernetes.protobuf] [*/*] /apis/admission.online.openshift.io/v1beta1/seconds 0xf192d0 [] seconds [apis admission.online.openshift.io v1beta1 seconds] 0xc4202ff680 create an AdmissionReview  createAdmissionReview [0xc42000e690 0xc42000e6a0] map[200:{200 OK {{ } <nil> <nil>} false} 201:{201 Created {{ } <nil> <nil>} false} 202:{202 Accepted {{ } <nil> <nil>} false}] {{ } <nil> <nil>} {{ } <nil> <nil>} map[x-kubernetes-action:post x-kubernetes-group-version-kind:{admission.k8s.io v1beta1 AdmissionReview}]} {GET [application/json application/yaml application/vnd.kubernetes.protobuf] [application/json application/yaml application/vnd.kubernetes.protobuf] /apis/admission.online.openshift.io/v1beta1/ 0xf22290 [] / [apis admission.online.openshift.io v1beta1] 0xc4202ffdc0 get available resources  getAPIResources [] map[] <nil> {{ }  []} map[]}] [application/json application/yaml application/vnd.kubernetes.protobuf application/json;stream=watch application/vnd.kubernetes.protobuf;stream=watch] [*/*] [] [] API at /apis/admission.online.openshift.io/v1beta1 admission.online.openshift.io/v1beta1 <nil> false {{0 0} 0 0 0 0}}']

This seems to be coming from the go-restful library: https://github.com/emicklei/go-restful/blob/master/container.go#L100

How do I add 2 separate AdmissionReview kind as 2 different resource in the same apiVersion?

from generic-admission-server.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.