Skip to content

Commit

Permalink
make webhook scaffolding work with old project
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed Dec 14, 2018
1 parent 2103ee7 commit 45ff91c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/kubebuilder/pkg/scaffold"
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
"sigs.k8s.io/kubebuilder/pkg/scaffold/manager"
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
"sigs.k8s.io/kubebuilder/pkg/scaffold/webhook"
)
Expand Down Expand Up @@ -58,6 +59,7 @@ Scaffolds webhook handlers based on group, version, kind and other user inputs.
}

err := (&scaffold.Scaffold{}).Execute(input.Options{},
&manager.Webhook{},
&webhook.AdmissionHandler{Resource: o.res, Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}},
&webhook.AdmissionWebhookBuilder{Resource: o.res, Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}},
&webhook.AdmissionWebhooks{Resource: o.res, Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}},
Expand Down

0 comments on commit 45ff91c

Please sign in to comment.