Skip to content

Commit

Permalink
include webhook update knative.dev/pkg which includes webhook fixes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso authored Jun 25, 2020
1 parent a61a678 commit 115a31a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
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/apiserver v0.17.0
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/utils v0.0.0-20200124190032-861946025e34
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9
knative.dev/pkg v0.0.0-20200625173728-dfb81cf04a7c
knative.dev/test-infra v0.0.0-20200519161858-554a95a37986
sigs.k8s.io/yaml v1.2.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,8 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC
knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY=
knative.dev/pkg v0.0.0-20200519155757-14eb3ae3a5a7 h1:9S2r59HZJF9nKvoRLg5zJzx6XpVlVyvVRqz/C/h6h2s=
knative.dev/pkg v0.0.0-20200519155757-14eb3ae3a5a7/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9 h1:bN9gghp5Osuw1bgKrvMaA+oiAvPuYmzSbRo54/EFSxI=
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
knative.dev/pkg v0.0.0-20200625173728-dfb81cf04a7c h1:QZYml0nrYQFvfDDSUV+J2PKcPuI3EisK3ePoe1Qdvq0=
knative.dev/pkg v0.0.0-20200625173728-dfb81cf04a7c/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
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=
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
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 admissionv1beta1.AdmissionReview
response := admissionv1beta1.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
4 changes: 4 additions & 0 deletions vendor/knative.dev/pkg/webhook/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func conversionHandler(rootLogger *zap.SugaredLogger, stats StatsReporter, c Con

ctx := logging.WithLogger(r.Context(), logger)
response := apixv1beta1.ConversionReview{
// Use the same type meta as the request - this is required by the K8s API
// note: v1beta1 & v1 ConversionReview shapes are identical so even though
// we're using v1 types we still support v1beta1 conversion requests
TypeMeta: review.TypeMeta,
Response: c.Convert(ctx, review.Request),
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9
# knative.dev/pkg v0.0.0-20200625173728-dfb81cf04a7c
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
knative.dev/pkg/apis
Expand Down

0 comments on commit 115a31a

Please sign in to comment.