Skip to content

Commit c559069

Browse files
authored
Merge pull request #4501 from camilamacedo86/fix-generate-external
🐛 fix: kubebuilder alpha generate command to allow re-create projects with webhooks for external-apis
2 parents 8c048ff + fa4a500 commit c559069

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cli/alpha/internal/generate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ func createWebhook(resource resource.Resource) error {
361361
// Gets flags for webhook creation.
362362
func getWebhookResourceFlags(resource resource.Resource) []string {
363363
var args []string
364+
if resource.IsExternal() {
365+
args = append(args, "--external-api-path", resource.Path)
366+
args = append(args, "--external-api-domain", resource.Domain)
367+
}
364368
if resource.HasValidationWebhook() {
365369
args = append(args, "--programmatic-validation")
366370
}

0 commit comments

Comments
 (0)