Skip to content

Commit

Permalink
Merge pull request #71 from awgreene/default-containerPorts
Browse files Browse the repository at this point in the history
Default containerPort to 443
  • Loading branch information
awgreene authored Oct 27, 2020
2 parents 69e6f9b + 63792c8 commit 1b99ae1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions crds/operators.coreos.com_clusterserviceversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8704,6 +8704,7 @@ spec:
containerPort:
type: integer
format: int32
default: 443
maximum: 65535
minimum: 1
conversionCRDs:
Expand Down
14 changes: 7 additions & 7 deletions crds/zz_defs.go

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions pkg/operators/v1alpha1/clusterserviceversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ type WebhookDescription struct {
DeploymentName string `json:"deploymentName,omitempty"`
// +kubebuilder:validation:Maximum=65535
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=443
ContainerPort int32 `json:"containerPort,omitempty"`
TargetPort *intstr.IntOrString `json:"targetPort,omitempty"`
Rules []admissionregistrationv1.RuleWithOperations `json:"rules,omitempty"`
Expand All @@ -191,9 +192,6 @@ type WebhookDescription struct {

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

// GetMutatingWebhook returns a MutatingWebhook generated from the WebhookDescription
func (w *WebhookDescription) GetMutatingWebhook(namespace string, namespaceSelector *metav1.LabelSelector, caBundle []byte) admissionregistrationv1.MutatingWebhook {
if w.ContainerPort == 0 {
w.ContainerPort = 443
}
return admissionregistrationv1.MutatingWebhook{
Name: w.GenerateName,
Rules: w.Rules,
Expand Down

0 comments on commit 1b99ae1

Please sign in to comment.