Comments (2)
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.
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)
- NewCommandStartAdmissionServer hardcoded the server short/long description HOT 4
- Add support out of cluster client config HOT 14
- Object in admissionSpec is nil HOT 4
- Add documentation explaining how to deploy webhooks that use this library
- Add documentation explaining how this library works
- Supporting conversion webhooks HOT 6
- Is there established precedent for handling cert rotation? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-admission-server.