Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions config/core/webhooks/configmap-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: config.webhook.serving.knative.dev
labels:
serving.knative.dev/release: devel
webhooks:
- admissionReviewVersions:
- v1beta1
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: webhook
Expand Down
5 changes: 2 additions & 3 deletions config/core/webhooks/defaulting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: webhook.serving.knative.dev
labels:
serving.knative.dev/release: devel
webhooks:
- admissionReviewVersions:
- v1beta1
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: webhook
Expand Down
5 changes: 2 additions & 3 deletions config/core/webhooks/resource-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: validation.webhook.serving.knative.dev
labels:
serving.knative.dev/release: devel
webhooks:
- admissionReviewVersions:
- v1beta1
- admissionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: webhook
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
knative.dev/caching v0.0.0-20200606210318-787aec80f71c
knative.dev/networking v0.0.0-20200623230227-53e376c3ec4c
knative.dev/pkg v0.0.0-20200623204627-e0a0d63a9e86
knative.dev/pkg v0.0.0-20200624155427-5be32bbb99ab
knative.dev/test-infra v0.0.0-20200623231727-6d5d6aeb457c
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,8 @@ knative.dev/pkg v0.0.0-20200611204322-2ddcfef739a2/go.mod h1:rA+FklsrVahwF4a+D63
knative.dev/pkg v0.0.0-20200619020725-7df8fc5d7743/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e h1:fmsw4i/We4S9yyaZadL2z8DKDIz7XzcY/v4yPGUmUA4=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623204627-e0a0d63a9e86 h1:Ihxd/dMGFtVxrURj7NknkQlA7QmgCh63o10eQ8BlO/4=
knative.dev/pkg v0.0.0-20200623204627-e0a0d63a9e86/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200624155427-5be32bbb99ab h1:Alotvu0cJmIfbSitcmcCe39M2WZ430DO9GnsidpR7CM=
knative.dev/pkg v0.0.0-20200624155427-5be32bbb99ab/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/sample-controller v0.0.0-20200510050845-bf7c19498b7e/go.mod h1:D2ZDLrR9Dq9LiiVN7TatzI7WMcEPgk1MHbbhgBKE6W8=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
Expand Down
8 changes: 7 additions & 1 deletion vendor/knative.dev/pkg/webhook/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ func admissionHandler(rootLogger *zap.SugaredLogger, stats StatsReporter, c Admi

ctx := logging.WithLogger(r.Context(), logger)

var response admissionv1.AdmissionReview
response := admissionv1.AdmissionReview{
// Use the same type meta as the request - this is required by the K8s API
// note: v1beta1 & v1 AdmissionReview shapes are identical so even though
// we're using v1 types we still support v1beta1 admission requests
TypeMeta: review.TypeMeta,
}

reviewResponse := c.Admit(ctx, review.Request)
var patchType string
if reviewResponse.PatchType != nil {
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ knative.dev/networking/pkg/client/injection/informers/networking/v1alpha1/server
knative.dev/networking/pkg/client/injection/reconciler/networking/v1alpha1/serverlessservice
knative.dev/networking/pkg/client/istio/listers/networking/v1alpha3
knative.dev/networking/pkg/client/listers/networking/v1alpha1
# knative.dev/pkg v0.0.0-20200623204627-e0a0d63a9e86
# knative.dev/pkg v0.0.0-20200624155427-5be32bbb99ab
## explicit
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
Expand Down