Skip to content

Commit

Permalink
Merge pull request #532 from mengqiy/webhook_work_with_old_project
Browse files Browse the repository at this point in the history
make webhook scaffolding work with old project
  • Loading branch information
k8s-ci-robot committed Dec 17, 2018
2 parents fcb2c85 + 45ff91c commit 3f80c24
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 3f80c24

Please sign in to comment.