Allow disabling both webhook ports in cloud-provider

This commit is contained in:
Julian Tölle 2023-08-18 12:27:54 +02:00
parent 5929d49f87
commit 8291b847d5
No known key found for this signature in database
GPG Key ID: 23645912EA28C2DB

View File

@ -263,7 +263,7 @@ func (o *CloudControllerManagerOptions) Validate(allControllers []string, disabl
if o.WebhookServing != nil {
errors = append(errors, o.WebhookServing.Validate()...)
if o.WebhookServing.BindPort == o.SecureServing.BindPort {
if o.WebhookServing.BindPort == o.SecureServing.BindPort && o.WebhookServing.BindPort != 0 {
errors = append(errors, fmt.Errorf("--webhook-secure-port cannot be the same value as --secure-port"))
}
}