Listen for HTTP server on 8080/TCP and HTTPS server on 8443/TCP

parent f520bb88
Pipeline #55770260 failed with stages
in 2 minutes and 19 seconds
......@@ -17,7 +17,10 @@ const (
defaultNginxImage = "nginx:latest"
// Default port names used by the nginx container and the ClusterIP service
defaultHTTPPortName = "http"
defaultHTTPPort = int32(8080)
defaultHTTPPortName = "http"
defaultHTTPSPort = int32(8443)
defaultHTTPSPortName = "https"
// Mount path where nginx.conf will be placed
......@@ -70,7 +73,7 @@ func NewDeployment(n *v1alpha1.Nginx) (*appv1.Deployment, error) {
Ports: []corev1.ContainerPort{
{
Name: defaultHTTPPortName,
ContainerPort: int32(80),
ContainerPort: defaultHTTPPort,
Protocol: corev1.ProtocolTCP,
},
},
......@@ -239,7 +242,7 @@ func setupTLS(secret *v1alpha1.TLSSecret, dep *appv1.Deployment) {
dep.Spec.Template.Spec.Containers[0].Ports = append(dep.Spec.Template.Spec.Containers[0].Ports, corev1.ContainerPort{
Name: defaultHTTPSPortName,
ContainerPort: int32(443),
ContainerPort: defaultHTTPSPort,
Protocol: corev1.ProtocolTCP,
})
dep.Spec.Template.Spec.Containers[0].ReadinessProbe = &corev1.Probe{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment