Skip to content

Commit 1b99ae1

Browse files
authored
Merge pull request openshift#71 from awgreene/default-containerPorts
Default containerPort to 443
2 parents 69e6f9b + 63792c8 commit 1b99ae1

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

crds/operators.coreos.com_clusterserviceversions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8704,6 +8704,7 @@ spec:
87048704
containerPort:
87058705
type: integer
87068706
format: int32
8707+
default: 443
87078708
maximum: 65535
87088709
minimum: 1
87098710
conversionCRDs:

crds/zz_defs.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/operators/v1alpha1/clusterserviceversion_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ type WebhookDescription struct {
175175
DeploymentName string `json:"deploymentName,omitempty"`
176176
// +kubebuilder:validation:Maximum=65535
177177
// +kubebuilder:validation:Minimum=1
178+
// +kubebuilder:default=443
178179
ContainerPort int32 `json:"containerPort,omitempty"`
179180
TargetPort *intstr.IntOrString `json:"targetPort,omitempty"`
180181
Rules []admissionregistrationv1.RuleWithOperations `json:"rules,omitempty"`
@@ -191,9 +192,6 @@ type WebhookDescription struct {
191192

192193
// GetValidatingWebhook returns a ValidatingWebhook generated from the WebhookDescription
193194
func (w *WebhookDescription) GetValidatingWebhook(namespace string, namespaceSelector *metav1.LabelSelector, caBundle []byte) admissionregistrationv1.ValidatingWebhook {
194-
if w.ContainerPort == 0 {
195-
w.ContainerPort = 443
196-
}
197195
return admissionregistrationv1.ValidatingWebhook{
198196
Name: w.GenerateName,
199197
Rules: w.Rules,
@@ -218,9 +216,6 @@ func (w *WebhookDescription) GetValidatingWebhook(namespace string, namespaceSel
218216

219217
// GetMutatingWebhook returns a MutatingWebhook generated from the WebhookDescription
220218
func (w *WebhookDescription) GetMutatingWebhook(namespace string, namespaceSelector *metav1.LabelSelector, caBundle []byte) admissionregistrationv1.MutatingWebhook {
221-
if w.ContainerPort == 0 {
222-
w.ContainerPort = 443
223-
}
224219
return admissionregistrationv1.MutatingWebhook{
225220
Name: w.GenerateName,
226221
Rules: w.Rules,

0 commit comments

Comments
 (0)