@@ -175,6 +175,7 @@ type WebhookDescription struct {
175
175
DeploymentName string `json:"deploymentName,omitempty"`
176
176
// +kubebuilder:validation:Maximum=65535
177
177
// +kubebuilder:validation:Minimum=1
178
+ // +kubebuilder:default=443
178
179
ContainerPort int32 `json:"containerPort,omitempty"`
179
180
TargetPort * intstr.IntOrString `json:"targetPort,omitempty"`
180
181
Rules []admissionregistrationv1.RuleWithOperations `json:"rules,omitempty"`
@@ -191,9 +192,6 @@ type WebhookDescription struct {
191
192
192
193
// GetValidatingWebhook returns a ValidatingWebhook generated from the WebhookDescription
193
194
func (w * WebhookDescription ) GetValidatingWebhook (namespace string , namespaceSelector * metav1.LabelSelector , caBundle []byte ) admissionregistrationv1.ValidatingWebhook {
194
- if w .ContainerPort == 0 {
195
- w .ContainerPort = 443
196
- }
197
195
return admissionregistrationv1.ValidatingWebhook {
198
196
Name : w .GenerateName ,
199
197
Rules : w .Rules ,
@@ -218,9 +216,6 @@ func (w *WebhookDescription) GetValidatingWebhook(namespace string, namespaceSel
218
216
219
217
// GetMutatingWebhook returns a MutatingWebhook generated from the WebhookDescription
220
218
func (w * WebhookDescription ) GetMutatingWebhook (namespace string , namespaceSelector * metav1.LabelSelector , caBundle []byte ) admissionregistrationv1.MutatingWebhook {
221
- if w .ContainerPort == 0 {
222
- w .ContainerPort = 443
223
- }
224
219
return admissionregistrationv1.MutatingWebhook {
225
220
Name : w .GenerateName ,
226
221
Rules : w .Rules ,
0 commit comments