Skip to content

Commit

Permalink
Merge pull request #4501 from camilamacedo86/fix-generate-external
Browse files Browse the repository at this point in the history
🐛 fix: kubebuilder alpha generate command to allow re-create projects with webhooks for external-apis
  • Loading branch information
k8s-ci-robot authored Jan 19, 2025
2 parents 8c048ff + fa4a500 commit c559069
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cli/alpha/internal/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit c559069

Please sign in to comment.