Skip to content

Commit

Permalink
Name the watchdog's port "http"
Browse files Browse the repository at this point in the history
HTTP is used by some services meshes as metadata when
routing. No harm change.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Sep 17, 2020
1 parent 4cbd76b commit 811e554
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/handlers/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func makeDeploymentSpec(request types.FunctionDeployment, existingSecrets map[st
return nil, err
}

isEnableServiceLinks := false
enableServiceLinks := false

deploymentSpec := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -216,7 +216,11 @@ func makeDeploymentSpec(request types.FunctionDeployment, existingSecrets map[st
Name: request.Service,
Image: request.Image,
Ports: []apiv1.ContainerPort{
{ContainerPort: factory.Config.RuntimeHTTPPort, Protocol: corev1.ProtocolTCP},
{
Name: "http",
ContainerPort: factory.Config.RuntimeHTTPPort,
Protocol: corev1.ProtocolTCP,
},
},
Env: envVars,
Resources: *resources,
Expand All @@ -231,7 +235,9 @@ func makeDeploymentSpec(request types.FunctionDeployment, existingSecrets map[st
ServiceAccountName: serviceAccount,
RestartPolicy: corev1.RestartPolicyAlways,
DNSPolicy: corev1.DNSClusterFirst,
EnableServiceLinks: &isEnableServiceLinks,
// EnableServiceLinks injects ENV vars about every other service within
// the namespace.
EnableServiceLinks: &enableServiceLinks,
},
},
},
Expand Down

0 comments on commit 811e554

Please sign in to comment.