From fa4a5005e790e2be95099a2ba213216f8882fc27 Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:44:15 +0000 Subject: [PATCH] fix: kubebuilder alpha generate command to allow re-create projects with webhooks for external-apis --- pkg/cli/alpha/internal/generate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cli/alpha/internal/generate.go b/pkg/cli/alpha/internal/generate.go index 192670e43c5..8f58fd7f476 100644 --- a/pkg/cli/alpha/internal/generate.go +++ b/pkg/cli/alpha/internal/generate.go @@ -361,6 +361,10 @@ func createWebhook(resource resource.Resource) error { // Gets flags for webhook creation. func getWebhookResourceFlags(resource resource.Resource) []string { var args []string + if resource.IsExternal() { + args = append(args, "--external-api-path", resource.Path) + args = append(args, "--external-api-domain", resource.Domain) + } if resource.HasValidationWebhook() { args = append(args, "--programmatic-validation") }